Skip to content

Commit 8a6c6eb

Browse files
add guard around public key validation on import
1 parent 6500444 commit 8a6c6eb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

wolfcrypt/src/pkcs7.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,9 +1021,11 @@ static int wc_PKCS7_CheckPublicKeyDer(PKCS7* pkcs7, int keyOID,
10211021

10221022
/* Try to decode public key and check with wc_ecc_check_key() */
10231023
ret = wc_EccPublicKeyDecode(key, &scratch, ecc, keySz);
1024+
#if defined(WOLFSSL_VALIDATE_ECC_IMPORT)
10241025
if (ret == 0) {
10251026
ret = wc_ecc_check_key(ecc);
10261027
}
1028+
#endif
10271029
wc_ecc_free(ecc);
10281030

10291031
break;

0 commit comments

Comments
 (0)