summaryrefslogtreecommitdiff
path: root/board/cr50/tpm2/rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/tpm2/rsa.c')
-rw-r--r--board/cr50/tpm2/rsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/board/cr50/tpm2/rsa.c b/board/cr50/tpm2/rsa.c
index 526dc25c95..6345b70309 100644
--- a/board/cr50/tpm2/rsa.c
+++ b/board/cr50/tpm2/rsa.c
@@ -33,8 +33,10 @@ static int check_encrypt_params(TPM_ALG_ID padding_alg, TPM_ALG_ID hash_alg,
/* Unsupported hash algorithm. */
return 0;
*padding = PADDING_MODE_OAEP;
+ } else if (padding_alg == TPM_ALG_NULL) {
+ *padding = PADDING_MODE_NULL;
} else {
- return 0; /* NULL padding unsupported. */
+ return 0; /* Unsupported padding mode. */
}
return 1;
}