Fully exclude the wc_DsaCheckPubKey function when building with NO_DSA_PUBKEY_CHECK.

This commit is contained in:
Kareem
2026-05-08 16:04:39 -07:00
parent b79870e1ba
commit a12ccca612
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -591,7 +591,8 @@ int test_wc_DsaCheckPubKey(void)
{
EXPECT_DECLS;
#if !defined(NO_DSA) && !defined(WC_FIPS_186_5_PLUS) && \
!defined(HAVE_SELFTEST) && !defined(HAVE_FIPS) && defined(WOLFSSL_PUBLIC_MP)
!defined(HAVE_SELFTEST) && !defined(HAVE_FIPS) && defined(WOLFSSL_PUBLIC_MP) \
&& !defined(NO_DSA_PUBKEY_CHECK)
DsaKey key;
int answer = -1;
int ret;
+2
View File
@@ -114,6 +114,7 @@ void wc_FreeDsaKey(DsaKey* key)
* return 0 on success, BAD_FUNC_ARG when the key fails validation, or a
* negative error code on internal failure.
*/
#ifndef NO_DSA_PUBKEY_CHECK
int wc_DsaCheckPubKey(DsaKey* key)
{
int err = MP_OKAY;
@@ -189,6 +190,7 @@ int wc_DsaCheckPubKey(DsaKey* key)
return err;
}
#endif /* !NO_DSA_PUBKEY_CHECK */
/* validate that (L,N) match allowed sizes from FIPS 186-4, Section 4.2.
* modLen - represents L, the size of p (prime modulus) in bits