keys, trusted: seal with a TPM2 authorization policy
TPM2 supports authorization policies, which are essentially combinational logic statements repsenting the conditions where the data can be unsealed based on the TPM state. This patch enables to use authorization policies to seal trusted keys. Two following new options have been added for trusted keys: * 'policydigest=': provide an auth policy digest for sealing. * 'policyhandle=': provide a policy session handle for unsealing. If 'hash=' option is supplied after 'policydigest=' option, this will result an error because the state of the option would become mixed. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Acked-by: Peter Huewe <peterhuewe@gmx.de>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#define MAX_KEY_SIZE 128
|
||||
#define MAX_BLOB_SIZE 512
|
||||
#define MAX_PCRINFO_SIZE 64
|
||||
#define MAX_DIGEST_SIZE 64
|
||||
|
||||
struct trusted_key_payload {
|
||||
struct rcu_head rcu;
|
||||
@@ -37,6 +38,9 @@ struct trusted_key_options {
|
||||
unsigned char pcrinfo[MAX_PCRINFO_SIZE];
|
||||
int pcrlock;
|
||||
uint32_t hash;
|
||||
uint32_t digest_len;
|
||||
unsigned char policydigest[MAX_DIGEST_SIZE];
|
||||
uint32_t policyhandle;
|
||||
};
|
||||
|
||||
extern struct key_type key_type_trusted;
|
||||
|
Reference in New Issue
Block a user