tpm2: verify symmetric parms in tpm2_context_new()
authorDan Streetman <ddstreet@ieee.org>
Fri, 17 Feb 2023 17:59:18 +0000 (12:59 -0500)
committerDan Streetman <ddstreet@ieee.org>
Mon, 5 Jun 2023 23:58:14 +0000 (19:58 -0400)
commita47060bb34c912ea9909fcf617f7b553488b5daf
tree586542ab6eff271e6ea00f8f2b70ac5365723208
parent3a35d6cdd29f0303b9fffff2f34461b2be0cb1c7
tpm2: verify symmetric parms in tpm2_context_new()

This adds tpm2_get_capability_algs(), tpm2_supports_alg(), and
tpm2_test_parms(). These functions allow verifying that the TPM supports
specific algs and parameters.

When creating a new context, this checks if the TPM supports the symmetric algs
we use. If the TPM does not support the symmetric algs and parameters we
require, we log and return error.
src/shared/tpm2-util.c
src/shared/tpm2-util.h
src/test/test-tpm2.c