diff options
Diffstat (limited to 'src/libpts/plugins/imv_attestation/attest_db.h')
-rw-r--r-- | src/libpts/plugins/imv_attestation/attest_db.h | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/src/libpts/plugins/imv_attestation/attest_db.h b/src/libpts/plugins/imv_attestation/attest_db.h index 6669a76a7..80a8f4cd4 100644 --- a/src/libpts/plugins/imv_attestation/attest_db.h +++ b/src/libpts/plugins/imv_attestation/attest_db.h @@ -34,21 +34,38 @@ typedef struct attest_db_t attest_db_t; struct attest_db_t { /** - * Set software product to be queried + * Set functional component to be queried * - * @param product software product + * @param comp functional component * @param create if TRUE create database entry if it doesn't exist * @return TRUE if successful */ - bool (*set_product)(attest_db_t *this, char *product, bool create); + bool (*set_component)(attest_db_t *this, char *comp, bool create); /** - * Set primary key of the software product to be queried + * Set primary key of the functional component to be queried * - * @param pid primary key of software product + * @param fid primary key of functional component * @return TRUE if successful */ - bool (*set_pid)(attest_db_t *this, int pid); + bool (*set_cid)(attest_db_t *this, int fid); + + /** + * Set directory to be queried + * + * @param dir directory + * @param create if TRUE create database entry if it doesn't exist + * @return TRUE if successful + */ + bool (*set_directory)(attest_db_t *this, char *dir, bool create); + + /** + * Set primary key of the directory to be queried + * + * @param did primary key of directory + * @return TRUE if successful + */ + bool (*set_did)(attest_db_t *this, int did); /** * Set measurement file to be queried @@ -70,36 +87,36 @@ struct attest_db_t { /** * Set functional component to be queried * - * @param comp functional component + * @param key AIK * @param create if TRUE create database entry if it doesn't exist * @return TRUE if successful */ - bool (*set_component)(attest_db_t *this, char *comp, bool create); + bool (*set_key)(attest_db_t *this, char *key, bool create); /** - * Set primary key of the functional component to be queried + * Set primary key of the AIK to be queried * - * @param fid primary key of functional component + * @param kid primary key of AIK * @return TRUE if successful */ - bool (*set_cid)(attest_db_t *this, int fid); + bool (*set_kid)(attest_db_t *this, int kid); /** - * Set directory to be queried + * Set software product to be queried * - * @param dir directory + * @param product software product * @param create if TRUE create database entry if it doesn't exist * @return TRUE if successful */ - bool (*set_directory)(attest_db_t *this, char *dir, bool create); + bool (*set_product)(attest_db_t *this, char *product, bool create); /** - * Set primary key of the directory to be queried + * Set primary key of the software product to be queried * - * @param did primary key of directory + * @param pid primary key of software product * @return TRUE if successful */ - bool (*set_did)(attest_db_t *this, int did); + bool (*set_pid)(attest_db_t *this, int pid); /** * Set measurement hash algorithm @@ -109,6 +126,14 @@ struct attest_db_t { void (*set_algo)(attest_db_t *this, pts_meas_algorithms_t algo); /** + * Set owner [user/host] of an AIK + * + * @param owner user/host name + * @return TRUE if successful + */ + void (*set_owner)(attest_db_t *this, char *owner); + + /** * List all products stored in the database */ void (*list_products)(attest_db_t *this); @@ -124,11 +149,21 @@ struct attest_db_t { void (*list_components)(attest_db_t *this); /** + * List all AIKs stored in the database + */ + void (*list_keys)(attest_db_t *this); + + /** * List selected measurement hashes stored in the database */ void (*list_hashes)(attest_db_t *this); /** + * List selected component measurement stored in the database + */ + void (*list_measurements)(attest_db_t *this); + + /** * Add an entry to the database */ bool (*add)(attest_db_t *this); |