summaryrefslogtreecommitdiffstats
path: root/src/shared/tpm2-util.h
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2023-07-14 13:23:55 +0200
committerDan Streetman <ddstreet@ieee.org>2023-08-04 16:57:07 +0200
commit75de375aafa78ccf2cd93a2c0a15d3bc4b0fe4b7 (patch)
treec8ef2c89c35e9fb679005bcc9d6ec86e4ac5edc3 /src/shared/tpm2-util.h
parenttpm2: move declared functions in header lower down (diff)
downloadsystemd-75de375aafa78ccf2cd93a2c0a15d3bc4b0fe4b7.tar.xz
systemd-75de375aafa78ccf2cd93a2c0a15d3bc4b0fe4b7.zip
tpm2: declare tpm2_log_debug_*() functions in tpm2_util.h
Allow other code to use the log debug functions; e.g. they are useful in test code.
Diffstat (limited to 'src/shared/tpm2-util.h')
-rw-r--r--src/shared/tpm2-util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h
index bf8135d0af..4916620a25 100644
--- a/src/shared/tpm2-util.h
+++ b/src/shared/tpm2-util.h
@@ -139,6 +139,12 @@ static inline int tpm2_digest_init(TPMI_ALG_HASH alg, TPM2B_DIGEST *digest) {
return tpm2_digest_many(alg, digest, NULL, 0, false);
}
+void tpm2_log_debug_tpml_pcr_selection(const TPML_PCR_SELECTION *l, const char *msg);
+void tpm2_log_debug_pcr_value(const Tpm2PCRValue *pcr_value, const char *msg);
+void tpm2_log_debug_buffer(const void *buffer, size_t size, const char *msg);
+void tpm2_log_debug_digest(const TPM2B_DIGEST *digest, const char *msg);
+void tpm2_log_debug_name(const TPM2B_NAME *name, const char *msg);
+
int tpm2_calculate_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name);
int tpm2_calculate_policy_auth_value(TPM2B_DIGEST *digest);
int tpm2_calculate_policy_authorize(const TPM2B_PUBLIC *public, const TPM2B_DIGEST *policy_ref, TPM2B_DIGEST *digest);