X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fdh%2Fdh_gen.c;h=1d3cbe8a8927bc398b47afd83faedca8f77de691;hb=1d97c8435171a7af575f73c526d79e1ef0ee5960;hp=82e560068fa9bacdea3b4b5b6a5a08bcc0f89321;hpb=83c3410b94ae3c845142fdfb55e245273846ecf0;p=oweals%2Fopenssl.git diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c index 82e560068f..1d3cbe8a89 100644 --- a/crypto/dh/dh_gen.c +++ b/crypto/dh/dh_gen.c @@ -61,13 +61,12 @@ * - Geoff */ + + #include #include "cryptlib.h" #include #include -#ifdef OPENSSL_FIPS -#include -#endif static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); @@ -78,7 +77,8 @@ int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *c return dh_builtin_genparams(ret, prime_len, generator, cb); } -/* We generate DH parameters as follows +/*- + * We generate DH parameters as follows * find a prime q which is prime_len/2 bits long. * p=(2*q)+1 or (p-1)/2 = q * For this case, g is a generator if @@ -109,20 +109,6 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB int g,ok= -1; BN_CTX *ctx=NULL; -#ifdef OPENSSL_FIPS - if(FIPS_selftest_failed()) - { - FIPSerr(FIPS_F_DH_BUILTIN_GENPARAMS,FIPS_R_FIPS_SELFTEST_FAILED); - return 0; - } - - if (FIPS_mode() && (prime_len < OPENSSL_DH_FIPS_MIN_MODULUS_BITS)) - { - DHerr(DH_F_DH_BUILTIN_GENPARAMS, DH_R_KEY_SIZE_TOO_SMALL); - goto err; - } -#endif - ctx=BN_CTX_new(); if (ctx == NULL) goto err; BN_CTX_start(ctx);