diff options
author | Rich Salz <rsalz@openssl.org> | 2016-03-18 14:30:20 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-20 19:48:36 -0400 |
commit | 3c27208fab1dc29f47f088490404df5abfcdfb05 (patch) | |
tree | 3654ea8c099e19203a48ce2688aeee02f46fd12b /crypto | |
parent | 8230f6c764f854190358cf40f0e7e7ca5647d8cd (diff) |
Remove #error from include files.
Don't have #error statements in header files, but instead wrap
the contents of that file in #ifndef OPENSSL_NO_xxx
This means it is now always safe to include the header file.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
56 files changed, 77 insertions, 249 deletions
diff --git a/crypto/aes/aes_locl.h b/crypto/aes/aes_locl.h index 7ab2d19eb0..e49f35702b 100644 --- a/crypto/aes/aes_locl.h +++ b/crypto/aes/aes_locl.h @@ -52,11 +52,6 @@ # define HEADER_AES_LOCL_H # include <openssl/e_os2.h> - -# ifdef OPENSSL_NO_AES -# error AES is disabled. -# endif - # include <stdio.h> # include <stdlib.h> # include <string.h> diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 0926a4f26c..a0c63207f9 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -60,9 +60,7 @@ #include "internal/cryptlib.h" #include <openssl/asn1t.h> #include <openssl/x509.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index e405b83dc8..85567cee5c 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -60,9 +60,7 @@ #include <openssl/bn.h> #include <openssl/evp.h> #include <openssl/objects.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/x509.h> #include <openssl/asn1.h> #include "internal/asn1_int.h" diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c index 9665ae6720..3ebdb5d150 100644 --- a/crypto/asn1/d2i_pu.c +++ b/crypto/asn1/d2i_pu.c @@ -61,15 +61,9 @@ #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/asn1.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif -#ifndef OPENSSL_NO_EC -# include <openssl/ec.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> +#include <openssl/ec.h> #include "internal/evp_int.h" diff --git a/crypto/asn1/i2d_pu.c b/crypto/asn1/i2d_pu.c index db508ac178..c1504d8263 100644 --- a/crypto/asn1/i2d_pu.c +++ b/crypto/asn1/i2d_pu.c @@ -60,15 +60,9 @@ #include <openssl/bn.h> #include <openssl/evp.h> #include <openssl/objects.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif -#ifndef OPENSSL_NO_EC -# include <openssl/ec.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> +#include <openssl/ec.h> int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) { diff --git a/crypto/asn1/t_spki.c b/crypto/asn1/t_spki.c index 206bd24e39..a289c7dae0 100644 --- a/crypto/asn1/t_spki.c +++ b/crypto/asn1/t_spki.c @@ -60,12 +60,8 @@ #include "internal/cryptlib.h" #include <openssl/x509.h> #include <openssl/asn1.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> #include <openssl/bn.h> /* Print out an SPKI */ diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c index 7c88291e80..158d1d26af 100644 --- a/crypto/asn1/x_pubkey.c +++ b/crypto/asn1/x_pubkey.c @@ -61,12 +61,8 @@ #include <openssl/x509.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> /* Minor tweak to operation: free up EVP_PKEY */ static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, diff --git a/crypto/async/arch/async_null.c b/crypto/async/arch/async_null.c index f0b8a5c315..19fb72c2c0 100644 --- a/crypto/async/arch/async_null.c +++ b/crypto/async/arch/async_null.c @@ -54,6 +54,8 @@ #include "../async_locl.h" #ifdef ASYNC_NULL +# include <openssl/ct.h> +# include <openssl/x509v3.h> int ASYNC_is_capable(void) { diff --git a/crypto/blake2/blake2_locl.h b/crypto/blake2/blake2_locl.h index ba438f4e3e..10334b1622 100644 --- a/crypto/blake2/blake2_locl.h +++ b/crypto/blake2/blake2_locl.h @@ -18,10 +18,6 @@ #include <stddef.h> #include "e_os.h" -# ifdef OPENSSL_NO_BLAKE2 -# error BLAKE2 is disabled. -# endif - #define BLAKE2S_BLOCKBYTES 64 #define BLAKE2S_OUTBYTES 32 #define BLAKE2S_KEYBYTES 32 diff --git a/crypto/cms/cms_cd.c b/crypto/cms/cms_cd.c index 4854259881..9e120780ff 100644 --- a/crypto/cms/cms_cd.c +++ b/crypto/cms/cms_cd.c @@ -58,9 +58,7 @@ #include <openssl/err.h> #include <openssl/cms.h> #include <openssl/bio.h> -#ifndef OPENSSL_NO_COMP -# include <openssl/comp.h> -#endif +#include <openssl/comp.h> #include "cms_lcl.h" #ifdef ZLIB diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c index 0a33368cfd..8480c2f1c5 100644 --- a/crypto/conf/conf_mall.c +++ b/crypto/conf/conf_mall.c @@ -63,9 +63,7 @@ #include <openssl/dso.h> #include <openssl/x509.h> #include <openssl/asn1.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> /* Load all OpenSSL builtin modules */ diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c index e70fb7a738..9cc7a931f5 100644 --- a/crypto/conf/conf_sap.c +++ b/crypto/conf/conf_sap.c @@ -63,9 +63,7 @@ #include <openssl/dso.h> #include <openssl/x509.h> #include <openssl/asn1.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> /* * This is the automatic configuration loader: it is called automatically by diff --git a/crypto/ct/ct_locl.h b/crypto/ct/ct_locl.h index 659120b8c2..0af4b7f830 100644 --- a/crypto/ct/ct_locl.h +++ b/crypto/ct/ct_locl.h @@ -50,10 +50,6 @@ * ==================================================================== */ -#ifdef OPENSSL_NO_CT -# error CT is disabled. -#endif - #include <stddef.h> #include <openssl/ct.h> #include <openssl/evp.h> diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index d644c86531..fc03d8fb0d 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -64,9 +64,7 @@ #include <openssl/bn.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" -#ifndef OPENSSL_NO_CMS -# include <openssl/cms.h> -#endif +#include <openssl/cms.h> /* * i2d/d2i like DH parameter functions which use the appropriate routine for diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index d7aed6a282..1a0c054eeb 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -59,9 +59,7 @@ #include "internal/cryptlib.h" #include <openssl/bn.h> #include <openssl/dh.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> static const DH_METHOD *default_DH_method = NULL; diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index a760ff5390..93bada0058 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -63,9 +63,7 @@ #include <openssl/evp.h> #include <openssl/dh.h> #include <openssl/bn.h> -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif +#include <openssl/dsa.h> #include <openssl/objects.h> #include "internal/evp_int.h" diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index 5661af57b1..f0f28bdf2a 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -62,9 +62,7 @@ #include <openssl/asn1.h> #include <openssl/dsa.h> #include <openssl/bn.h> -#ifndef OPENSSL_NO_CMS -# include <openssl/cms.h> -#endif +#include <openssl/cms.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 15d5116ba2..c278d9853d 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -62,15 +62,13 @@ */ #define xxxHASH EVP_sha1() -#include <openssl/opensslconf.h> /* To see if OPENSSL_NO_SHA is defined */ - +#include <openssl/opensslconf.h> #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/evp.h> #include <openssl/bn.h> #include <openssl/rand.h> #include <openssl/sha.h> - #include "dsa_locl.h" int DSA_generate_parameters_ex(DSA *ret, int bits, diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index 3b99b3c2eb..fa8330fd84 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -62,12 +62,8 @@ #include <openssl/bn.h> #include <openssl/dsa.h> #include <openssl/asn1.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif -#ifndef OPENSSL_NO_DH -# include <openssl/dh.h> -#endif +#include <openssl/engine.h> +#include <openssl/dh.h> static const DSA_METHOD *default_DSA_method = NULL; diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index 310bfad050..ca354c05cd 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -61,9 +61,7 @@ #include <openssl/x509.h> #include <openssl/ec.h> #include <openssl/bn.h> -#ifndef OPENSSL_NO_CMS -# include <openssl/cms.h> -#endif +#include <openssl/cms.h> #include <openssl/asn1t.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 0d7370eef9..d241154630 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -64,9 +64,7 @@ #include <string.h> #include "ec_lcl.h" #include <openssl/err.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> EC_KEY *EC_KEY_new(void) { diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c index dc097ce0dc..003421eabe 100644 --- a/crypto/ec/ec_kmeth.c +++ b/crypto/ec/ec_kmeth.c @@ -53,9 +53,7 @@ #include <string.h> #include <openssl/ec.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/err.h> #include "ec_lcl.h" diff --git a/crypto/ec/ecdsa_sign.c b/crypto/ec/ecdsa_sign.c index df90175980..738c276ae9 100644 --- a/crypto/ec/ecdsa_sign.c +++ b/crypto/ec/ecdsa_sign.c @@ -54,9 +54,7 @@ #include <openssl/ec.h> #include "ec_lcl.h" -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/rand.h> #include <openssl/err.h> diff --git a/crypto/ec/ecdsa_vrf.c b/crypto/ec/ecdsa_vrf.c index 0441bc0c59..f519b59807 100644 --- a/crypto/ec/ecdsa_vrf.c +++ b/crypto/ec/ecdsa_vrf.c @@ -58,9 +58,7 @@ #include <openssl/ec.h> #include "ec_lcl.h" #include <string.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/err.h> /*- diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index 4acea62f9f..34193f38ad 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -56,9 +56,7 @@ # include <errno.h> # include <string.h> #endif -#ifndef OPENSSL_NO_DH -# include <openssl/dh.h> -#endif +#include <openssl/dh.h> #include <openssl/dsa.h> #include <openssl/err.h> #include <openssl/rsa.h> diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 914bba5b3a..2bf91b365f 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -69,15 +69,9 @@ #include <openssl/pem.h> #include <openssl/evp.h> #include <openssl/rand.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif -#ifndef OPENSSL_NO_DH -# include <openssl/dh.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> +#include <openssl/dh.h> #include <openssl/hmac.h> #include <openssl/x509v3.h> diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c index 8939c085ea..a79a84e544 100644 --- a/crypto/err/err_all.c +++ b/crypto/err/err_all.c @@ -59,23 +59,13 @@ #include <internal/err.h> #include <openssl/asn1.h> #include <openssl/bn.h> -#ifndef OPENSSL_NO_EC -# include <openssl/ec.h> -#endif +#include <openssl/ec.h> #include <openssl/buffer.h> #include <openssl/bio.h> -#ifndef OPENSSL_NO_COMP -# include <openssl/comp.h> -#endif -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif -#ifndef OPENSSL_NO_DH -# include <openssl/dh.h> -#endif -#ifndef OPENSSL_NO_DSA -# include <openssl/dsa.h> -#endif +#include <openssl/comp.h> +#include <openssl/rsa.h> +#include <openssl/dh.h> +#include <openssl/dsa.h> #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/pem2.h> @@ -85,9 +75,7 @@ #include <openssl/pkcs12.h> #include <openssl/rand.h> #include <openssl/dso.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/ui.h> #include <openssl/ocsp.h> #include <openssl/err.h> @@ -95,12 +83,8 @@ # include <openssl/fips.h> #endif #include <openssl/ts.h> -#ifndef OPENSSL_NO_CMS -# include <openssl/cms.h> -#endif -#ifndef OPENSSL_NO_CT -# include <openssl/ct.h> -#endif +#include <openssl/cms.h> +#include <openssl/ct.h> #include <openssl/async.h> #include <openssl/kdf.h> diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 0ed884565a..aee8127d00 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -112,9 +112,7 @@ #include "internal/cryptlib.h" #include <openssl/objects.h> #include <openssl/evp.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include "internal/evp_int.h" #include "evp_locl.h" diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 360f572731..c906e6ff87 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -50,7 +50,7 @@ #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_AES -#include <openssl/crypto.h> +# include <openssl/crypto.h> # include <openssl/evp.h> # include <openssl/err.h> # include <string.h> diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 484b024218..d7cc1f453c 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -60,9 +60,7 @@ #include <openssl/evp.h> #include <openssl/err.h> #include <openssl/rand.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include "internal/evp_int.h" #include "evp_locl.h" diff --git a/crypto/evp/m_md2.c b/crypto/evp/m_md2.c index 5c1ac38624..0e83dfec10 100644 --- a/crypto/evp/m_md2.c +++ b/crypto/evp/m_md2.c @@ -64,9 +64,7 @@ # include <openssl/objects.h> # include <openssl/x509.h> # include <openssl/md2.h> -# ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -# endif +# include <openssl/rsa.h> #include "internal/evp_int.h" diff --git a/crypto/evp/m_md4.c b/crypto/evp/m_md4.c index e63db4e1f9..933d82af78 100644 --- a/crypto/evp/m_md4.c +++ b/crypto/evp/m_md4.c @@ -64,9 +64,7 @@ # include <openssl/objects.h> # include <openssl/x509.h> # include <openssl/md4.h> -# ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -# endif +# include <openssl/rsa.h> # include "internal/evp_int.h" static int init(EVP_MD_CTX *ctx) diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c index adaa8577eb..b28be91edd 100644 --- a/crypto/evp/m_md5.c +++ b/ |