Skip to content

Commit 6686020

Browse files
committed
Allow user to prevent wc_PKCS7_EcdsaVerify from erroring out due to extentions we do not know about
1 parent 5a8411a commit 6686020

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

wolfcrypt/src/pkcs7.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4174,6 +4174,14 @@ static int wc_PKCS7_EcdsaVerify(wc_PKCS7* pkcs7, byte* sig, int sigSz,
41744174
}
41754175

41764176
InitDecodedCert(dCert, pkcs7->cert[i], pkcs7->certSz[i], pkcs7->heap);
4177+
4178+
/* This allows the user to not error out in the case of extensions that
4179+
* we are not aware of. */
4180+
#ifdef WC_ASN_UNKNOWN_EXT_CB
4181+
if (pkcs7->unknownExtCallback != NULL)
4182+
wc_SetUnknownExtCallback(dCert, pkcs7->unknownExtCallback);
4183+
#endif
4184+
41774185
/* not verifying, only using this to extract public key */
41784186
ret = ParseCert(dCert, CA_TYPE, NO_VERIFY, 0);
41794187
if (ret < 0) {

0 commit comments

Comments
 (0)