tpm2: Allow to runtime-disable RSAES encryption scheme

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2023-06-26 08:08:46 -04:00 committed by Stefan Berger
parent 50fc1a383c
commit 83a18c67e7
2 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@ static const struct {
[TPM_ALG_NULL] = OTHER(true, "null", false, 1),
[TPM_ALG_SM4] = SYMMETRIC(ALG_SM4, "sm4", s_KeySizesSM4, true, 0), // not supported
[TPM_ALG_RSASSA] = SIGNING(ALG_RSASSA, "rsassa", true, 1),
[TPM_ALG_RSAES] = ENCRYPTING(ALG_RSAES, "rsaes", false, 1),
[TPM_ALG_RSAES] = ENCRYPTING(ALG_RSAES, "rsaes", true, 1),
[TPM_ALG_RSAPSS] = SIGNING(ALG_RSAPSS, "rsapss", true, 1),
[TPM_ALG_OAEP] = ENCRYPTING(ALG_OAEP, "oaep", false, 1), // never disable: CryptSecretEncrypt/Decrypt needs it
[TPM_ALG_ECDSA] = SIGNING(ALG_ECDSA, "ecdsa", false, 1),

View File

@ -3691,6 +3691,7 @@ TPMI_ALG_RSA_DECRYPT_Unmarshal(TPMI_ALG_RSA_DECRYPT *target, BYTE **buffer, INT3
#if ALG_OAEP
case TPM_ALG_OAEP:
#endif
// libtpms: allow decryption with these algorithms
break;
case TPM_ALG_NULL:
if (allowNull) {