tpm2: Prevent HMAC creation & verification with sha1: no-sha1-hmac

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2024-09-04 11:00:38 -04:00 committed by Stefan Berger
parent 24afa414ff
commit d635ef81e2
3 changed files with 12 additions and 1 deletions

View File

@ -227,6 +227,14 @@ algorithms
=back
=item B<no-sha1-hmac>: (since v0.10)
=over 2
=item * Prevents creation and verification of an HMAC using SHA1
=back
=item B<fips-host>: (since v0.10)
=over 2

View File

@ -67,6 +67,9 @@ static const struct {
7),
ATTRIBUTE("no-sha1-hmac-verification", RUNTIME_ATTRIBUTE_NO_SHA1_HMAC_VERIFICATION,
7),
ATTRIBUTE("no-sha1-hmac", RUNTIME_ATTRIBUTE_NO_SHA1_HMAC_VERIFICATION |
RUNTIME_ATTRIBUTE_NO_SHA1_HMAC_CREATION,
7),
ATTRIBUTE("fips-host", RUNTIME_ATTRIBUTE_NO_UNPADDED_ENCRYPTION |
RUNTIME_ATTRIBUTE_NO_SHA1_SIGNING |
RUNTIME_ATTRIBUTE_NO_SHA1_VERIFICATION,

View File

@ -42,7 +42,7 @@
#ifndef RUNTIME_ATTRIBUTES_H
#define RUNTIME_ATTRIBUTES_H
#define NUM_ENTRIES_ATTRIBUTE_PROPERTIES 6
#define NUM_ENTRIES_ATTRIBUTE_PROPERTIES 7
#define RUNTIME_ATTRIBUTE_NO_UNPADDED_ENCRYPTION (1 << 0)
#define RUNTIME_ATTRIBUTE_NO_SHA1_SIGNING (1 << 1)