diff options
Diffstat (limited to 'src/libpts/plugins/imv_attestation/attest_db.h')
-rw-r--r-- | src/libpts/plugins/imv_attestation/attest_db.h | 75 |
1 files changed, 72 insertions, 3 deletions
diff --git a/src/libpts/plugins/imv_attestation/attest_db.h b/src/libpts/plugins/imv_attestation/attest_db.h index 9c9a9dcba..d0a48d844 100644 --- a/src/libpts/plugins/imv_attestation/attest_db.h +++ b/src/libpts/plugins/imv_attestation/attest_db.h @@ -14,16 +14,15 @@ */ /** - * * @defgroup attest_db_t attest_db - * @{ @ingroup attest_db + * @{ @ingroup libpts */ #ifndef ATTEST_DB_H_ #define ATTEST_DB_H_ #include <pts/pts_meas_algo.h> - +#include <os_info/os_info.h> #include <library.h> typedef struct attest_db_t attest_db_t; @@ -102,6 +101,23 @@ struct attest_db_t { bool (*set_kid)(attest_db_t *this, int kid); /** + * Set software package to be queried + * + * @param product software package + * @param create if TRUE create database entry if it doesn't exist + * @return TRUE if successful + */ + bool (*set_package)(attest_db_t *this, char *package, bool create); + + /** + * Set primary key of the software package to be queried + * + * @param gid primary key of software package + * @return TRUE if successful + */ + bool (*set_gid)(attest_db_t *this, int gid); + + /** * Set software product to be queried * * @param product software product @@ -119,6 +135,14 @@ struct attest_db_t { bool (*set_pid)(attest_db_t *this, int pid); /** + * Set software package version to be queried + * + * @param version software package version + * @return TRUE if successful + */ + bool (*set_version)(attest_db_t *this, char *version); + + /** * Set measurement hash algorithm * * @param algo hash algorithm @@ -126,6 +150,26 @@ struct attest_db_t { void (*set_algo)(attest_db_t *this, pts_meas_algorithms_t algo); /** + * Set that the IMA-specific SHA-1 template hash be computed + */ + void (*set_ima)(attest_db_t *this); + + /** + * Set that relative filenames are to be used + */ + void (*set_relative)(attest_db_t *this); + + /** + * Set the package security or blacklist state + */ + void (*set_package_state)(attest_db_t *this, os_package_state_t package_state); + + /** + * Set the sequence number + */ + void (*set_sequence)(attest_db_t *this, int seq_no); + + /** * Set owner [user/host] of an AIK * * @param owner user/host name @@ -134,11 +178,26 @@ struct attest_db_t { void (*set_owner)(attest_db_t *this, char *owner); /** + * Display all dates in UTC + */ + void (*set_utc)(attest_db_t *this); + + /** + * List all packages stored in the database + */ + void (*list_packages)(attest_db_t *this); + + /** * List all products stored in the database */ void (*list_products)(attest_db_t *this); /** + * List all directories stored in the database + */ + void (*list_directories)(attest_db_t *this); + + /** * List selected files stored in the database */ void (*list_files)(attest_db_t *this); @@ -149,6 +208,11 @@ struct attest_db_t { void (*list_components)(attest_db_t *this); /** + * List all devices stored in the database + */ + void (*list_devices)(attest_db_t *this); + + /** * List all AIKs stored in the database */ void (*list_keys)(attest_db_t *this); @@ -164,6 +228,11 @@ struct attest_db_t { void (*list_measurements)(attest_db_t *this); /** + * List sessions stored in the database + */ + void (*list_sessions)(attest_db_t *this); + + /** * Add an entry to the database */ bool (*add)(attest_db_t *this); |