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/ec | |
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/ec')
-rw-r--r-- | src/lib/libcrypto/ec/ec2_smpl.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ec_key.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ecp_mont.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nist.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 8 |
5 files changed, 0 insertions, 41 deletions
diff --git a/src/lib/libcrypto/ec/ec2_smpl.c b/src/lib/libcrypto/ec/ec2_smpl.c index e0e59c7d82..0cf681fa9d 100644 --- a/src/lib/libcrypto/ec/ec2_smpl.c +++ b/src/lib/libcrypto/ec/ec2_smpl.c | |||
@@ -73,16 +73,8 @@ | |||
73 | 73 | ||
74 | #ifndef OPENSSL_NO_EC2M | 74 | #ifndef OPENSSL_NO_EC2M |
75 | 75 | ||
76 | #ifdef OPENSSL_FIPS | ||
77 | #include <openssl/fips.h> | ||
78 | #endif | ||
79 | |||
80 | |||
81 | const EC_METHOD *EC_GF2m_simple_method(void) | 76 | const EC_METHOD *EC_GF2m_simple_method(void) |
82 | { | 77 | { |
83 | #ifdef OPENSSL_FIPS | ||
84 | return fips_ec_gf2m_simple_method(); | ||
85 | #else | ||
86 | static const EC_METHOD ret = { | 78 | static const EC_METHOD ret = { |
87 | EC_FLAGS_DEFAULT_OCT, | 79 | EC_FLAGS_DEFAULT_OCT, |
88 | NID_X9_62_characteristic_two_field, | 80 | NID_X9_62_characteristic_two_field, |
@@ -126,7 +118,6 @@ const EC_METHOD *EC_GF2m_simple_method(void) | |||
126 | 0 /* field_set_to_one */ }; | 118 | 0 /* field_set_to_one */ }; |
127 | 119 | ||
128 | return &ret; | 120 | return &ret; |
129 | #endif | ||
130 | } | 121 | } |
131 | 122 | ||
132 | 123 | ||
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c index 7fa247593d..d528601036 100644 --- a/src/lib/libcrypto/ec/ec_key.c +++ b/src/lib/libcrypto/ec/ec_key.c | |||
@@ -64,9 +64,6 @@ | |||
64 | #include <string.h> | 64 | #include <string.h> |
65 | #include "ec_lcl.h" | 65 | #include "ec_lcl.h" |
66 | #include <openssl/err.h> | 66 | #include <openssl/err.h> |
67 | #ifdef OPENSSL_FIPS | ||
68 | #include <openssl/fips.h> | ||
69 | #endif | ||
70 | 67 | ||
71 | EC_KEY *EC_KEY_new(void) | 68 | EC_KEY *EC_KEY_new(void) |
72 | { | 69 | { |
@@ -241,11 +238,6 @@ int EC_KEY_generate_key(EC_KEY *eckey) | |||
241 | BIGNUM *priv_key = NULL, *order = NULL; | 238 | BIGNUM *priv_key = NULL, *order = NULL; |
242 | EC_POINT *pub_key = NULL; | 239 | EC_POINT *pub_key = NULL; |
243 | 240 | ||
244 | #ifdef OPENSSL_FIPS | ||
245 | if (FIPS_mode()) | ||
246 | return FIPS_ec_key_generate_key(eckey); | ||
247 | #endif | ||
248 | |||
249 | if (!eckey || !eckey->group) | 241 | if (!eckey || !eckey->group) |
250 | { | 242 | { |
251 | ECerr(EC_F_EC_KEY_GENERATE_KEY, ERR_R_PASSED_NULL_PARAMETER); | 243 | ECerr(EC_F_EC_KEY_GENERATE_KEY, ERR_R_PASSED_NULL_PARAMETER); |
diff --git a/src/lib/libcrypto/ec/ecp_mont.c b/src/lib/libcrypto/ec/ecp_mont.c index f04f132c7a..cee0fee12a 100644 --- a/src/lib/libcrypto/ec/ecp_mont.c +++ b/src/lib/libcrypto/ec/ecp_mont.c | |||
@@ -63,18 +63,11 @@ | |||
63 | 63 | ||
64 | #include <openssl/err.h> | 64 | #include <openssl/err.h> |
65 | 65 | ||
66 | #ifdef OPENSSL_FIPS | ||
67 | #include <openssl/fips.h> | ||
68 | #endif | ||
69 | |||
70 | #include "ec_lcl.h" | 66 | #include "ec_lcl.h" |
71 | 67 | ||
72 | 68 | ||
73 | const EC_METHOD *EC_GFp_mont_method(void) | 69 | const EC_METHOD *EC_GFp_mont_method(void) |
74 | { | 70 | { |
75 | #ifdef OPENSSL_FIPS | ||
76 | return fips_ec_gfp_mont_method(); | ||
77 | #else | ||
78 | static const EC_METHOD ret = { | 71 | static const EC_METHOD ret = { |
79 | EC_FLAGS_DEFAULT_OCT, | 72 | EC_FLAGS_DEFAULT_OCT, |
80 | NID_X9_62_prime_field, | 73 | NID_X9_62_prime_field, |
@@ -115,7 +108,6 @@ const EC_METHOD *EC_GFp_mont_method(void) | |||
115 | ec_GFp_mont_field_set_to_one }; | 108 | ec_GFp_mont_field_set_to_one }; |
116 | 109 | ||
117 | return &ret; | 110 | return &ret; |
118 | #endif | ||
119 | } | 111 | } |
120 | 112 | ||
121 | 113 | ||
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c index aad2d5f443..ac5b814238 100644 --- a/src/lib/libcrypto/ec/ecp_nist.c +++ b/src/lib/libcrypto/ec/ecp_nist.c | |||
@@ -67,15 +67,8 @@ | |||
67 | #include <openssl/obj_mac.h> | 67 | #include <openssl/obj_mac.h> |
68 | #include "ec_lcl.h" | 68 | #include "ec_lcl.h" |
69 | 69 | ||
70 | #ifdef OPENSSL_FIPS | ||
71 | #include <openssl/fips.h> | ||
72 | #endif | ||
73 | |||
74 | const EC_METHOD *EC_GFp_nist_method(void) | 70 | const EC_METHOD *EC_GFp_nist_method(void) |
75 | { | 71 | { |
76 | #ifdef OPENSSL_FIPS | ||
77 | return fips_ec_gfp_nist_method(); | ||
78 | #else | ||
79 | static const EC_METHOD ret = { | 72 | static const EC_METHOD ret = { |
80 | EC_FLAGS_DEFAULT_OCT, | 73 | EC_FLAGS_DEFAULT_OCT, |
81 | NID_X9_62_prime_field, | 74 | NID_X9_62_prime_field, |
@@ -116,7 +109,6 @@ const EC_METHOD *EC_GFp_nist_method(void) | |||
116 | 0 /* field_set_to_one */ }; | 109 | 0 /* field_set_to_one */ }; |
117 | 110 | ||
118 | return &ret; | 111 | return &ret; |
119 | #endif | ||
120 | } | 112 | } |
121 | 113 | ||
122 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) | 114 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) |
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index cd05fd1251..bf0ad998dd 100644 --- a/src/lib/libcrypto/ec/ecp_smpl.c +++ b/src/lib/libcrypto/ec/ecp_smpl.c | |||
@@ -64,17 +64,10 @@ | |||
64 | 64 | ||
65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
66 | 66 | ||
67 | #ifdef OPENSSL_FIPS | ||
68 | #include <openssl/fips.h> | ||
69 | #endif | ||
70 | |||
71 | #include "ec_lcl.h" | 67 | #include "ec_lcl.h" |
72 | 68 | ||
73 | const EC_METHOD *EC_GFp_simple_method(void) | 69 | const EC_METHOD *EC_GFp_simple_method(void) |
74 | { | 70 | { |
75 | #ifdef OPENSSL_FIPS | ||
76 | return fips_ec_gfp_simple_method(); | ||
77 | #else | ||
78 | static const EC_METHOD ret = { | 71 | static const EC_METHOD ret = { |
79 | EC_FLAGS_DEFAULT_OCT, | 72 | EC_FLAGS_DEFAULT_OCT, |
80 | NID_X9_62_prime_field, | 73 | NID_X9_62_prime_field, |
@@ -115,7 +108,6 @@ const EC_METHOD *EC_GFp_simple_method(void) | |||
115 | 0 /* field_set_to_one */ }; | 108 | 0 /* field_set_to_one */ }; |
116 | 109 | ||
117 | return &ret; | 110 | return &ret; |
118 | #endif | ||
119 | } | 111 | } |
120 | 112 | ||
121 | 113 | ||