Merge pull request #7987 from bandi13/betterEngineFlagsFix

FIPS defines RSA_MIN_SIZE and users may want to override
This commit is contained in:
JacobBarthelmeh 2024-09-18 11:18:24 -06:00 committed by GitHub
commit b9908409d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -340,7 +340,7 @@ then
test -z "$enable_sha" && enable_sha=yes
test -z "$with_eccminsz" && with_eccminsz=192
test -z "$with_max_ecc_bits" && with_max_ecc_bits=1024
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"
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"
fi
# wolfEngine Options
@ -9458,7 +9458,7 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
AM_CFLAGS="$AM_CFLAGS -DWC_RSA_NO_PADDING"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP"
AM_CFLAGS="$AM_CFLAGS -DRSA_MIN_SIZE=1024"
AM_CFLAGS="$AM_CFLAGS -DHAVE_WOLFENGINE"
fi
if test "$ENABLED_WOLFENGINE" = "yes" && test "$ENABLED_FIPS" != "no"

View File

@ -103,7 +103,11 @@ RSA keys can be used to encrypt, decrypt, sign and verify data.
#endif
#ifndef RSA_MIN_SIZE
#define RSA_MIN_SIZE 2048
#if defined(HAVE_WOLFENGINE) || defined(HAVE_WOLFPROVIDER)
#define RSA_MIN_SIZE 1024
#else
#define RSA_MIN_SIZE 2048
#endif
#endif
#ifndef RSA_MAX_SIZE