mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Fix missing RSA_MIN_SIZE
and RSA_MAX_SIZE
and case where HAVE_FIPS_VERSION
is not defined.
This commit is contained in:
@ -2891,7 +2891,8 @@ int wc_CheckProbablePrime(const byte* pRaw, word32 pRawSz,
|
||||
eRaw, eRawSz, nlen, isPrime, NULL);
|
||||
}
|
||||
|
||||
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS) && (HAVE_FIPS_VERSION >= 2))
|
||||
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS) && \
|
||||
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))
|
||||
/* Make an RSA key for size bits, with e specified, 65537 is a good e */
|
||||
int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
|
||||
{
|
||||
|
@ -70,6 +70,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
RSA_MIN_SIZE = 512,
|
||||
RSA_MAX_SIZE = 4096,
|
||||
};
|
||||
|
||||
/* avoid redefinition of structs */
|
||||
#if !defined(HAVE_FIPS) || \
|
||||
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))
|
||||
@ -94,9 +99,6 @@ enum {
|
||||
RSA_BLOCK_TYPE_1 = 1,
|
||||
RSA_BLOCK_TYPE_2 = 2,
|
||||
|
||||
RSA_MIN_SIZE = 512,
|
||||
RSA_MAX_SIZE = 4096,
|
||||
|
||||
RSA_MIN_PAD_SZ = 11, /* separator + 0 + pad value + 8 pads */
|
||||
|
||||
RSA_PSS_PAD_SZ = 8,
|
||||
|
Reference in New Issue
Block a user