Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .wolfssl_known_macro_extras
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ BLAKE2B_SELFTEST
BLAKE2S_SELFTEST
BLOCKING
BSDKM_EXPORT_SYMS
ENABLED_BSDKM_REGISTER
BSP_DEFAULT_IO_CHANNEL_DEFINED
BSP_LED_0
BSP_LED_1
Expand Down Expand Up @@ -215,6 +214,7 @@ DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER
ECCSI_ORDER_MORE_BITS_THAN_PRIME
ECC_DUMP_OID
ECDHE_SIZE
ENABLED_BSDKM_REGISTER
ENABLE_SECURE_SOCKETS_LOGS
ESP32
ESP8266
Expand Down Expand Up @@ -281,10 +281,10 @@ HAVE_INTEL_QAT_SYNC
HAVE_INTEL_SPEEDUP
HAVE_MDK_RTX
HAVE_NETX_BSD
HAVE_PKCS7_ECC_RAW_SIGN_CALLBACK
HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK
HAVE_PKCS11_STATIC
HAVE_PKCS11_V3_STATIC
HAVE_PKCS7_ECC_RAW_SIGN_CALLBACK
HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK
HAVE_POCO_LIB
HAVE_RTP_SYS
HAVE_SECURE_GETENV
Expand Down Expand Up @@ -636,7 +636,6 @@ WC_NO_VERBOSE_RNG
WC_PKCS11_FIND_WITH_ID_ONLY
WC_PROTECT_ENCRYPTED_MEM
WC_RNG_BLOCKING
WC_RSA_DIRECT
WC_RSA_NONBLOCK
WC_RSA_NONBLOCK_TIME
WC_RSA_NO_FERMAT_CHECK
Expand Down
32 changes: 15 additions & 17 deletions src/ssl_api_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz,
const byte* pubKey, word32 pubSz, int label, int id, void* heap, int devId)
{
int ret = 0;
int type;
int type = 0;
void *pkey = NULL;

if (privKey == NULL) {
Expand Down Expand Up @@ -84,14 +84,12 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz,
type = DYNAMIC_TYPE_DILITHIUM;
break;
#endif
#if defined(HAVE_FALCON)
#if defined(HAVE_FALCON)
case FALCON_LEVEL1k:
case FALCON_LEVEL5k:
type = DYNAMIC_TYPE_FALCON;
break;
#endif
default:
type = 0;
#endif
}

ret = CreateDevPrivateKey(&pkey, privKey, privSz, type, label, id, heap,
Expand All @@ -108,12 +106,12 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz,
ret = wc_CryptoCb_RsaCheckPrivKey((RsaKey*)pkey, pubKey, pubSz);
break;
#endif
#ifdef HAVE_ECC
#ifdef HAVE_ECC
case ECDSAk:
ret = wc_CryptoCb_EccCheckPrivKey((ecc_key*)pkey, pubKey,
pubSz);
break;
#endif
#endif
#if defined(HAVE_DILITHIUM)
case ML_DSA_LEVEL2k:
case ML_DSA_LEVEL3k:
Expand All @@ -127,13 +125,13 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz,
WC_PQC_SIG_TYPE_DILITHIUM, pubKey, pubSz);
break;
#endif
#if defined(HAVE_FALCON)
#if defined(HAVE_FALCON)
case FALCON_LEVEL1k:
case FALCON_LEVEL5k:
ret = wc_CryptoCb_PqcSignatureCheckPrivKey(pkey,
WC_PQC_SIG_TYPE_FALCON, pubKey, pubSz);
break;
#endif
#endif
default:
ret = 0;
}
Expand All @@ -146,31 +144,31 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz,
#endif

switch (keyOID) {
#ifndef NO_RSA
#ifndef NO_RSA
case RSAk:
#ifdef WC_RSA_PSS
#ifdef WC_RSA_PSS
case RSAPSSk:
#endif
#endif
wc_FreeRsaKey((RsaKey*)pkey);
break;
#endif
#endif
#ifdef HAVE_ECC
case ECDSAk:
wc_ecc_free((ecc_key*)pkey);
break;
#endif
#if defined(HAVE_DILITHIUM)
#if defined(HAVE_DILITHIUM)
case ML_DSA_LEVEL2k:
case ML_DSA_LEVEL3k:
case ML_DSA_LEVEL5k:
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT
case DILITHIUM_LEVEL2k:
case DILITHIUM_LEVEL3k:
case DILITHIUM_LEVEL5k:
#endif
#endif
wc_dilithium_free((dilithium_key*)pkey);
break;
#endif
#endif
#if defined(HAVE_FALCON)
case FALCON_LEVEL1k:
case FALCON_LEVEL5k:
Expand Down
Loading