]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: check TPM2B_PUBLIC "name" during PEM->TPM2B_PUBLIC conversion tests
authorDan Streetman <ddstreet@ieee.org>
Tue, 16 Jan 2024 18:49:45 +0000 (13:49 -0500)
committerDan Streetman <ddstreet@ieee.org>
Tue, 16 Jan 2024 19:27:52 +0000 (14:27 -0500)
commite2e8d8f2a2a710a7bfec8200022066717c739c0e
tree19be193c26821a67bcfad9a83bb80e309c67d61d
parent910caa2443c8558029eb048132d86c40bd11fdd1
test: check TPM2B_PUBLIC "name" during PEM->TPM2B_PUBLIC conversion tests

Check the calculated TPM2B_PUBLIC key "name" to verify our PEM->TPM2B_PUBLIC
function remains consistent with previous code. This is important as the
TPM2B_PUBLIC "name" is used in the Authorize policy and so any change to a key
"name" would break unsealing for previously-sealed objects (see bug #30546).

Note that the tpm2_tpm2b_public_from_openssl_pkey() function results in a
TPM2B_PUBLIC with the same "name" as using the tpm2-tools program
tpm2_loadexternal, at least as of tpm2-tools version 5.6.18, with the test keys
from TEST(tpm2b_public_from_openssl_pkey) in src/test/test-tpm2.
src/test/test-tpm2.c