diff options
| author | tedu <> | 2014-04-15 20:06:10 +0000 |
|---|---|---|
| committer | tedu <> | 2014-04-15 20:06:10 +0000 |
| commit | 3c7d2178681a2741a8cc8a042cb2ea6ee28528b8 (patch) | |
| tree | 11be20c8110348001494179db4f9b0b67ce149ba /src/lib/libcrypto/dh/dh_gen.c | |
| parent | 4c8a9a73429ac4a1d79f4bab6a397df643934861 (diff) | |
| download | openbsd-3c7d2178681a2741a8cc8a042cb2ea6ee28528b8.tar.gz openbsd-3c7d2178681a2741a8cc8a042cb2ea6ee28528b8.tar.bz2 openbsd-3c7d2178681a2741a8cc8a042cb2ea6ee28528b8.zip | |
remove FIPS mode support. people who require FIPS can buy something that
meets their needs, but dumping it in here only penalizes the rest of us.
ok beck deraadt
Diffstat (limited to 'src/lib/libcrypto/dh/dh_gen.c')
| -rw-r--r-- | src/lib/libcrypto/dh/dh_gen.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/lib/libcrypto/dh/dh_gen.c b/src/lib/libcrypto/dh/dh_gen.c index 7b1fe9c9cb..cfd5b11868 100644 --- a/src/lib/libcrypto/dh/dh_gen.c +++ b/src/lib/libcrypto/dh/dh_gen.c | |||
| @@ -66,29 +66,12 @@ | |||
| 66 | #include <openssl/bn.h> | 66 | #include <openssl/bn.h> |
| 67 | #include <openssl/dh.h> | 67 | #include <openssl/dh.h> |
| 68 | 68 | ||
| 69 | #ifdef OPENSSL_FIPS | ||
| 70 | #include <openssl/fips.h> | ||
| 71 | #endif | ||
| 72 | |||
| 73 | static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); | 69 | static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); |
| 74 | 70 | ||
| 75 | int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb) | 71 | int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb) |
| 76 | { | 72 | { |
| 77 | #ifdef OPENSSL_FIPS | ||
| 78 | if (FIPS_mode() && !(ret->meth->flags & DH_FLAG_FIPS_METHOD) | ||
| 79 | && !(ret->flags & DH_FLAG_NON_FIPS_ALLOW)) | ||
| 80 | { | ||
| 81 | DHerr(DH_F_DH_GENERATE_PARAMETERS_EX, DH_R_NON_FIPS_METHOD); | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | #endif | ||
| 85 | if(ret->meth->generate_params) | 73 | if(ret->meth->generate_params) |
| 86 | return ret->meth->generate_params(ret, prime_len, generator, cb); | 74 | return ret->meth->generate_params(ret, prime_len, generator, cb); |
| 87 | #ifdef OPENSSL_FIPS | ||
| 88 | if (FIPS_mode()) | ||
| 89 | return FIPS_dh_generate_parameters_ex(ret, prime_len, | ||
| 90 | generator, cb); | ||
| 91 | #endif | ||
| 92 | return dh_builtin_genparams(ret, prime_len, generator, cb); | 75 | return dh_builtin_genparams(ret, prime_len, generator, cb); |
| 93 | } | 76 | } |
| 94 | 77 | ||
