guard use of dilithium_key->params on WC implementation

This commit is contained in:
Brett Nicholas
2024-11-12 16:06:07 -07:00
parent 0e6ac11d15
commit 6b1b6ece00

View File

@@ -9614,9 +9614,9 @@ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx,
} }
/* If expected security level not set in key, detect it from DER */ /* If expected security level not set in key, detect it from DER */
if (key->level == 0 || key->params == NULL if (key->level == 0
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT #ifdef WOLFSSL_WC_DILITHIUM
|| key->params->level == 0) || key->params == NULL
#endif #endif
) { ) {
int level; int level;
@@ -9885,9 +9885,9 @@ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx,
#if !defined(WOLFSSL_DILITHIUM_NO_ASN1) #if !defined(WOLFSSL_DILITHIUM_NO_ASN1)
/* If expected security level not set in key, detect it from DER */ /* If expected security level not set in key, detect it from DER */
if (key->level == 0 || key->params == NULL if (key->level == 0
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT #ifdef WOLFSSL_WC_DILITHIUM
|| key->params->level == 0) || key->params == NULL
#endif #endif
) { ) {
int level; int level;