]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2: add tpm2_get_name()
authorDan Streetman <ddstreet@ieee.org>
Wed, 14 Dec 2022 15:46:13 +0000 (10:46 -0500)
committerDan Streetman <ddstreet@ieee.org>
Fri, 26 May 2023 15:06:53 +0000 (11:06 -0400)
commitdbae4b9535ceb0a94affe34eab700900f4fbd93d
tree42494933978c8b188a9b18ab26daedd189505ce5
parent409a65f82901ace5799da0f22f10056105e062fa
tpm2: add tpm2_get_name()

This adds functions to get the "name" of a key. The key "name", as defined
by the TPM2 spec, includes its entire public area (with attribute fields),
not only its key fingerprint.

A function is added to calculate the name of a provided key public area,
as well as a function to get the name of a key which is present in the TPM.
src/shared/tpm2-util.c
src/shared/tpm2-util.h
src/test/test-tpm2.c