]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2: add tpm2_get_legacy_template() and tpm2_get_srk_template() 27712/head
authorDan Streetman <ddstreet@ieee.org>
Fri, 17 Feb 2023 17:59:18 +0000 (12:59 -0500)
committerDan Streetman <ddstreet@ieee.org>
Thu, 8 Jun 2023 10:08:04 +0000 (06:08 -0400)
commitf4f5b3a9de29874bcb2345196eb47ec90d02b67d
tree70864212941f263927ae62b22e940f7cde3c1662
parent98d6a80942337f07183bc4039ce32dc188f4d4cd
tpm2: add tpm2_get_legacy_template() and tpm2_get_srk_template()

Add functions to get either the 'legacy' or standard SRK template, for RSA or
ECC. The 'legacy' templates are those used with earlier code, where a transient
key was created to use for tpm sealing; the standard SRK is the persistent
shared key as defined in TCG guidance docs.

This also replaces tpm2_get_primary_template() with the new functions; that
function's use of flags is confusing and unnecessary.
src/shared/tpm2-util.c
src/shared/tpm2-util.h
src/test/test-tpm2.c