tpm2: add tpm2_get_pin_auth()
authorDan Streetman <ddstreet@ieee.org>
Sat, 15 Jul 2023 12:30:40 +0000 (08:30 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 16 Jul 2023 00:18:03 +0000 (01:18 +0100)
commitf230572f56a34fd7269c5fda4fb92be5ee0ea281
treee900c15325bdc3a9d7a1075ea497ecb690428eb5
parentfa5d2775126bfe699e76dbdfd04e9b9cfc120152
tpm2: add tpm2_get_pin_auth()

Add function to calculate the hash digest for a provided pin, and also verify
that the final byte in the digest is not 0. This is required because the TPM
will always remove all trailing 0's from an auth value before using it.

Fixes: #27716
src/shared/tpm2-util.c