summaryrefslogtreecommitdiffstats
path: root/src/shared/creds-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-08-17 17:28:05 +0200
committerLennart Poettering <lennart@poettering.net>2022-09-08 16:34:27 +0200
commit6a0779cbf9b4d45a64e6beb0fb3892835f4f2905 (patch)
tree082958b2e28f9626c935f91bbcb6d7397a1dfa6c /src/shared/creds-util.h
parenttpm2-util: extend TPM2 policies to optionally check PCR values against signed... (diff)
downloadsystemd-6a0779cbf9b4d45a64e6beb0fb3892835f4f2905.tar.xz
systemd-6a0779cbf9b4d45a64e6beb0fb3892835f4f2905.zip
creds-util: hook up new signed PCR policies
Diffstat (limited to 'src/shared/creds-util.h')
-rw-r--r--src/shared/creds-util.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/creds-util.h b/src/shared/creds-util.h
index 62e5c888ee..cf3d6c7dc6 100644
--- a/src/shared/creds-util.h
+++ b/src/shared/creds-util.h
@@ -52,7 +52,10 @@ int get_credential_user_password(const char *username, char **ret_password, bool
* for us to handle). */
#define CRED_AES256_GCM_BY_HOST SD_ID128_MAKE(5a,1c,6a,86,df,9d,40,96,b1,d5,a6,5e,08,62,f1,9a)
#define CRED_AES256_GCM_BY_TPM2_HMAC SD_ID128_MAKE(0c,7c,c0,7b,11,76,45,91,9c,4b,0b,ea,08,bc,20,fe)
+#define CRED_AES256_GCM_BY_TPM2_HMAC_WITH_PK SD_ID128_MAKE(fa,f7,eb,93,41,e3,41,2c,a1,a4,36,f9,5a,29,36,2f)
#define CRED_AES256_GCM_BY_HOST_AND_TPM2_HMAC SD_ID128_MAKE(93,a8,94,09,48,74,44,90,90,ca,f2,fc,93,ca,b5,53)
+#define CRED_AES256_GCM_BY_HOST_AND_TPM2_HMAC_WITH_PK \
+ SD_ID128_MAKE(af,49,50,a8,49,13,4e,b1,a7,38,46,30,4f,f3,0c,05)
#define CRED_AES256_GCM_BY_TPM2_ABSENT SD_ID128_MAKE(05,84,69,da,f6,f5,43,24,80,05,49,da,0f,8e,a2,fb)
/* Two special IDs to pick a general automatic mode (i.e. tpm2+host if TPM2 exists, only host otherwise) or
@@ -63,5 +66,5 @@ int get_credential_user_password(const char *username, char **ret_password, bool
#define _CRED_AUTO SD_ID128_MAKE(a2,19,cb,07,85,b2,4c,04,b1,6d,18,ca,b9,d2,ee,01)
#define _CRED_AUTO_INITRD SD_ID128_MAKE(02,dc,8e,de,3a,02,43,ab,a9,ec,54,9c,05,e6,a0,71)
-int encrypt_credential_and_warn(sd_id128_t with_key, const char *name, usec_t timestamp, usec_t not_after, const char *tpm2_device, uint32_t tpm2_pcr_mask, const void *input, size_t input_size, void **ret, size_t *ret_size);
-int decrypt_credential_and_warn(const char *validate_name, usec_t validate_timestamp, const char *tpm2_device, const void *input, size_t input_size, void **ret, size_t *ret_size);
+int encrypt_credential_and_warn(sd_id128_t with_key, const char *name, usec_t timestamp, usec_t not_after, const char *tpm2_device, uint32_t tpm2_hash_pcr_mask, const char *tpm2_pubkey_path, uint32_t tpm2_pubkey_pcr_mask, const void *input, size_t input_size, void **ret, size_t *ret_size);
+int decrypt_credential_and_warn(const char *validate_name, usec_t validate_timestamp, const char *tpm2_device, const char *tpm2_signature_path, const void *input, size_t input_size, void **ret, size_t *ret_size);