diff options
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_gen.c')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_gen.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c index c398761d0d..e6a5452016 100644 --- a/src/lib/libcrypto/dsa/dsa_gen.c +++ b/src/lib/libcrypto/dsa/dsa_gen.c | |||
| @@ -81,33 +81,13 @@ | |||
| 81 | #include <openssl/sha.h> | 81 | #include <openssl/sha.h> |
| 82 | #include "dsa_locl.h" | 82 | #include "dsa_locl.h" |
| 83 | 83 | ||
| 84 | #ifdef OPENSSL_FIPS | ||
| 85 | #include <openssl/fips.h> | ||
| 86 | #endif | ||
| 87 | |||
| 88 | int DSA_generate_parameters_ex(DSA *ret, int bits, | 84 | int DSA_generate_parameters_ex(DSA *ret, int bits, |
| 89 | const unsigned char *seed_in, int seed_len, | 85 | const unsigned char *seed_in, int seed_len, |
| 90 | int *counter_ret, unsigned long *h_ret, BN_GENCB *cb) | 86 | int *counter_ret, unsigned long *h_ret, BN_GENCB *cb) |
| 91 | { | 87 | { |
| 92 | #ifdef OPENSSL_FIPS | ||
| 93 | if (FIPS_mode() && !(ret->meth->flags & DSA_FLAG_FIPS_METHOD) | ||
| 94 | && !(ret->flags & DSA_FLAG_NON_FIPS_ALLOW)) | ||
| 95 | { | ||
| 96 | DSAerr(DSA_F_DSA_GENERATE_PARAMETERS_EX, DSA_R_NON_FIPS_DSA_METHOD); | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | #endif | ||
| 100 | if(ret->meth->dsa_paramgen) | 88 | if(ret->meth->dsa_paramgen) |
| 101 | return ret->meth->dsa_paramgen(ret, bits, seed_in, seed_len, | 89 | return ret->meth->dsa_paramgen(ret, bits, seed_in, seed_len, |
| 102 | counter_ret, h_ret, cb); | 90 | counter_ret, h_ret, cb); |
| 103 | #ifdef OPENSSL_FIPS | ||
| 104 | else if (FIPS_mode()) | ||
| 105 | { | ||
| 106 | return FIPS_dsa_generate_parameters_ex(ret, bits, | ||
| 107 | seed_in, seed_len, | ||
| 108 | counter_ret, h_ret, cb); | ||
| 109 | } | ||
| 110 | #endif | ||
| 111 | else | 91 | else |
| 112 | { | 92 | { |
| 113 | const EVP_MD *evpmd; | 93 | const EVP_MD *evpmd; |
