From c32d9c826c1c1c8a05cf45774327f278a93d8cf6 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 1 Mar 2024 21:14:15 +0700 Subject: [PATCH] fix for check on hash with ECDSAk case --- wolfcrypt/src/pkcs7.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 55b56fda0..9414f8d06 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -2758,8 +2758,7 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, * hash must be known in order to create the surrounding ASN1 syntax * properly before writing out the content and generating the hash on the * fly and then creating the signature */ - if (pkcs7->getContentCb != NULL && hashBuf == NULL && - pkcs7->publicKeyOID == ECDSAk) { + if (hashBuf == NULL && pkcs7->publicKeyOID == ECDSAk) { WOLFSSL_MSG("Pre-calculated content hash is needed in this case"); return BAD_FUNC_ARG; }