use X9.31 keygen by default in FIPS mode
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
9e43fe9a2b
commit
d0c9a90640
@ -69,6 +69,8 @@
|
|||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#ifdef OPENSSL_FIPS
|
#ifdef OPENSSL_FIPS
|
||||||
# include <openssl/fips.h>
|
# include <openssl/fips.h>
|
||||||
|
extern int FIPS_rsa_x931_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
|
||||||
|
BN_GENCB *cb);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
|
static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
|
||||||
@ -94,7 +96,7 @@ int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
|
|||||||
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
|
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
|
||||||
#ifdef OPENSSL_FIPS
|
#ifdef OPENSSL_FIPS
|
||||||
if (FIPS_mode())
|
if (FIPS_mode())
|
||||||
return FIPS_rsa_generate_key_ex(rsa, bits, e_value, cb);
|
return FIPS_rsa_x931_generate_key_ex(rsa, bits, e_value, cb);
|
||||||
#endif
|
#endif
|
||||||
return rsa_builtin_keygen(rsa, bits, e_value, cb);
|
return rsa_builtin_keygen(rsa, bits, e_value, cb);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user