mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 17:00:49 +02:00
Fully exclude the wc_DsaCheckPubKey function when building with NO_DSA_PUBKEY_CHECK.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user