Skip to content

Commit b990840

Browse files
Merge pull request #7987 from bandi13/betterEngineFlagsFix
FIPS defines RSA_MIN_SIZE and users may want to override
2 parents 87dc45b + bd77ee4 commit b990840

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ then
340340
test -z "$enable_sha" && enable_sha=yes
341341
test -z "$with_eccminsz" && with_eccminsz=192
342342
test -z "$with_max_ecc_bits" && with_max_ecc_bits=1024
343-
AM_CFLAGS="$AM_CFLAGS -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER"
343+
AM_CFLAGS="$AM_CFLAGS -DHAVE_WOLFPROVIDER -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER"
344344
fi
345345

346346
# wolfEngine Options
@@ -9458,7 +9458,7 @@ then
94589458
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
94599459
AM_CFLAGS="$AM_CFLAGS -DWC_RSA_NO_PADDING"
94609460
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP"
9461-
AM_CFLAGS="$AM_CFLAGS -DRSA_MIN_SIZE=1024"
9461+
AM_CFLAGS="$AM_CFLAGS -DHAVE_WOLFENGINE"
94629462
fi
94639463
94649464
if test "$ENABLED_WOLFENGINE" = "yes" && test "$ENABLED_FIPS" != "no"

wolfssl/wolfcrypt/rsa.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ RSA keys can be used to encrypt, decrypt, sign and verify data.
103103
#endif
104104

105105
#ifndef RSA_MIN_SIZE
106-
#define RSA_MIN_SIZE 2048
106+
#if defined(HAVE_WOLFENGINE) || defined(HAVE_WOLFPROVIDER)
107+
#define RSA_MIN_SIZE 1024
108+
#else
109+
#define RSA_MIN_SIZE 2048
110+
#endif
107111
#endif
108112

109113
#ifndef RSA_MAX_SIZE

0 commit comments

Comments
 (0)