diff options
author | Rich Salz <rsalz@akamai.com> | 2015-03-10 19:09:27 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2015-03-11 09:29:37 -0400 |
commit | 10bf4fc2c3da332a54247da1f3c0dcb44944f7ff (patch) | |
tree | c2f597e901f98829266ec4045492195cefdd958c /crypto | |
parent | ac5a110621ca48f0bebd5b4d76d081de403da29e (diff) |
Merge OPENSSL_NO_EC{DH,DSA} into OPENSSL_NO_EC
Suggested by John Foley <foleyj@cisco.com>.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/ec_pmeth.c | 7 | ||||
-rw-r--r-- | crypto/ecdh/ecdh.h | 2 | ||||
-rw-r--r-- | crypto/ecdh/ecdhtest.c | 4 | ||||
-rw-r--r-- | crypto/ecdsa/ecdsa.h | 2 | ||||
-rw-r--r-- | crypto/ecdsa/ecdsatest.c | 4 | ||||
-rw-r--r-- | crypto/engine/eng_fat.c | 8 | ||||
-rw-r--r-- | crypto/engine/eng_list.c | 4 | ||||
-rw-r--r-- | crypto/engine/eng_openssl.c | 4 | ||||
-rw-r--r-- | crypto/engine/engine.h | 4 | ||||
-rw-r--r-- | crypto/err/err_all.c | 8 | ||||
-rw-r--r-- | crypto/evp/c_alld.c | 2 | ||||
-rw-r--r-- | crypto/evp/evp.h | 2 | ||||
-rw-r--r-- | crypto/x509/x509.h | 6 |
13 files changed, 17 insertions, 40 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index 0437dcff60..d789e7e916 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -203,7 +203,7 @@ static int pkey_ec_verify(EVP_PKEY_CTX *ctx, return ret; } -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC static int pkey_ec_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) { @@ -302,7 +302,7 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) EC_GROUP_set_asn1_flag(dctx->gen_group, p1); return 1; -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC case EVP_PKEY_CTRL_EC_ECDH_COFACTOR: if (p1 == -2) { if (dctx->cofactor_mode != -1) @@ -519,12 +519,11 @@ const EVP_PKEY_METHOD ec_pkey_meth = { 0, 0, 0, -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC pkey_ec_kdf_derive, #else 0, #endif - pkey_ec_ctrl, pkey_ec_ctrl_str }; diff --git a/crypto/ecdh/ecdh.h b/crypto/ecdh/ecdh.h index 0d643a3f05..25ccdc9088 100644 --- a/crypto/ecdh/ecdh.h +++ b/crypto/ecdh/ecdh.h @@ -71,7 +71,7 @@ # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_ECDH +# ifdef OPENSSL_NO_EC # error ECDH is disabled. # endif diff --git a/crypto/ecdh/ecdhtest.c b/crypto/ecdh/ecdhtest.c index 41725f6a8d..578de316be 100644 --- a/crypto/ecdh/ecdhtest.c +++ b/crypto/ecdh/ecdhtest.c @@ -73,7 +73,7 @@ #include "../e_os.h" -#include <openssl/opensslconf.h> /* for OPENSSL_NO_ECDH */ +#include <openssl/opensslconf.h> /* for OPENSSL_NO_EC */ #include <openssl/crypto.h> #include <openssl/bio.h> #include <openssl/bn.h> @@ -82,7 +82,7 @@ #include <openssl/sha.h> #include <openssl/err.h> -#ifdef OPENSSL_NO_ECDH +#ifdef OPENSSL_NO_EC int main(int argc, char *argv[]) { printf("No ECDH support\n"); diff --git a/crypto/ecdsa/ecdsa.h b/crypto/ecdsa/ecdsa.h index 86cafe2ba1..3876004473 100644 --- a/crypto/ecdsa/ecdsa.h +++ b/crypto/ecdsa/ecdsa.h @@ -61,7 +61,7 @@ # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_ECDSA +# ifdef OPENSSL_NO_EC # error ECDSA is disabled. # endif diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c index d58490f21f..31d9c84e99 100644 --- a/crypto/ecdsa/ecdsatest.c +++ b/crypto/ecdsa/ecdsatest.c @@ -73,9 +73,9 @@ #include <stdlib.h> #include <string.h> -#include <openssl/opensslconf.h> /* To see if OPENSSL_NO_ECDSA is defined */ +#include <openssl/opensslconf.h> /* To see if OPENSSL_NO_EC is defined */ -#ifdef OPENSSL_NO_ECDSA +#ifdef OPENSSL_NO_EC int main(int argc, char *argv[]) { puts("Elliptic curves are disabled."); diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c index 4279dd94b1..af353bd936 100644 --- a/crypto/engine/eng_fat.c +++ b/crypto/engine/eng_fat.c @@ -79,11 +79,9 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags) if ((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) return 0; #endif -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC if ((flags & ENGINE_METHOD_ECDH) && !ENGINE_set_default_ECDH(e)) return 0; -#endif -#ifndef OPENSSL_NO_ECDSA if ((flags & ENGINE_METHOD_ECDSA) && !ENGINE_set_default_ECDSA(e)) return 0; #endif @@ -159,10 +157,8 @@ int ENGINE_register_complete(ENGINE *e) #ifndef OPENSSL_NO_DH ENGINE_register_DH(e); #endif -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC ENGINE_register_ECDH(e); -#endif -#ifndef OPENSSL_NO_ECDSA ENGINE_register_ECDSA(e); #endif ENGINE_register_RAND(e); diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index c69e8a7eda..9e80eafdde 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -300,10 +300,8 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src) #ifndef OPENSSL_NO_DH dest->dh_meth = src->dh_meth; #endif -#ifndef OPENSSL_NO_ECDH +#ifndef OPENSSL_NO_EC dest->ecdh_meth = src->ecdh_meth; -#endif -#ifndef OPENSSL_NO_ECDSA dest->ecdsa_meth = src->ecdsa_meth; #endif dest->rand_meth = src->rand_meth; diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 3e12ecf760..78fa3c8d45 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -149,10 +149,8 @@ static int bind_helper(ENGINE *e) # ifndef OPENSSL_NO_DSA || !ENGINE_set_DSA(e, DSA_get_default_method()) # endif -# ifndef OPENSSL_NO_ECDH +# ifndef OPENSSL_NO_EC || !ENGINE_set_ECDH(e, ECDH_OpenSSL()) -# endif -# ifndef OPENSSL_NO_ECDSA || !ENGINE_set_ECDSA(e, ECDSA_OpenSSL()) # endif # ifndef OPENSSL_NO_DH diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h index c931907599..e2f3e5cd9e 100644 --- a/crypto/engine/engine.h +++ b/crypto/engine/engine.h @@ -82,10 +82,8 @@ # ifndef OPENSSL_NO_DH # include <openssl/dh.h> # endif -# ifndef OPENSSL_NO_ECDH +# ifndef OPENSSL_NO_EC # include <openssl/ecdh.h> -# endif -# ifndef OPENSSL_NO_ECDSA # include <openssl/ecdsa.h> # endif # include <openssl/rand.h> diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c index 1363fb026a..b844167f94 100644 --- a/crypto/err/err_all.c +++ b/crypto/err/err_all.c @@ -76,10 +76,8 @@ #ifndef OPENSSL_NO_DSA # include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC # include <openssl/ecdsa.h> -#endif -#ifndef OPENSSL_NO_ECDH # include <openssl/ecdh.h> #endif #include <openssl/evp.h> @@ -138,11 +136,7 @@ void ERR_load_crypto_strings(void) # endif # ifndef OPENSSL_NO_EC ERR_load_EC_strings(); -# endif -# ifndef OPENSSL_NO_ECDSA ERR_load_ECDSA_strings(); -# endif -# ifndef OPENSSL_NO_ECDH ERR_load_ECDH_strings(); # endif /* skip ERR_load_SSL_strings() because it is not in this library */ diff --git a/crypto/evp/c_alld.c b/crypto/evp/c_alld.c index 0d4278b86a..94039ef5fd 100644 --- a/crypto/evp/c_alld.c +++ b/crypto/evp/c_alld.c @@ -80,7 +80,7 @@ void OpenSSL_add_all_digests(void) EVP_add_digest_alias(SN_dsaWithSHA1, "DSS1"); EVP_add_digest_alias(SN_dsaWithSHA1, "dss1"); # endif -# ifndef OPENSSL_NO_ECDSA +# ifndef OPENSSL_NO_EC EVP_add_digest(EVP_ecdsa()); # endif #if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index 2e9f83fac7..0d26fd3129 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -234,7 +234,7 @@ typedef int evp_verify_method(int type, const unsigned char *m, # define EVP_PKEY_DSA_method EVP_PKEY_NULL_method # endif -# ifndef OPENSSL_NO_ECDSA +# ifndef OPENSSL_NO_EC # define EVP_PKEY_ECDSA_method (evp_sign_method *)ECDSA_sign, \ (evp_verify_method *)ECDSA_verify, \ {EVP_PKEY_EC,0,0,0} diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 1e78e30f5e..9835be5e6c 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -75,13 +75,7 @@ # ifndef OPENSSL_NO_EC # include <openssl/ec.h> -# endif - -# ifndef OPENSSL_NO_ECDSA # include <openssl/ecdsa.h> -# endif - -# ifndef OPENSSL_NO_ECDH # include <openssl/ecdh.h> # endif |