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) | |
download | openssl-3c27208fab1dc29f47f088490404df5abfcdfb05.tar.gz |
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/crypto/evp/m_md5.c @@ -64,9 +64,7 @@ # include <openssl/objects.h> # include <openssl/x509.h> # include <openssl/md5.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_sha1.c b/crypto/evp/m_md5_sha1.c index 949b0e5a16..ae28ddce09 100644 --- a/crypto/evp/m_md5_sha1.c +++ b/crypto/evp/m_md5_sha1.c @@ -60,9 +60,7 @@ # include <openssl/sha.h> # include "internal/cryptlib.h" # include "internal/evp_int.h" -# ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -# endif +# include <openssl/rsa.h> struct md5_sha1_ctx { MD5_CTX md5; diff --git a/crypto/evp/m_mdc2.c b/crypto/evp/m_mdc2.c index dbe71dffaf..f7fa60022b 100644 --- a/crypto/evp/m_mdc2.c +++ b/crypto/evp/m_mdc2.c @@ -64,9 +64,7 @@ # include <openssl/objects.h> # include <openssl/x509.h> # include <openssl/mdc2.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_ripemd.c b/crypto/evp/m_ripemd.c index 67aa3cf202..d4488bec0e 100644 --- a/crypto/evp/m_ripemd.c +++ b/crypto/evp/m_ripemd.c @@ -64,9 +64,7 @@ # include <openssl/evp.h> # include <openssl/objects.h> # include <openssl/x509.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_sha1.c b/crypto/evp/m_sha1.c index fb674aee5d..e673e41725 100644 --- a/crypto/evp/m_sha1.c +++ b/crypto/evp/m_sha1.c @@ -61,9 +61,7 @@ #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/sha.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/p_dec.c b/crypto/evp/p_dec.c index 37f6822be4..5729ed7ac3 100644 --- a/crypto/evp/p_dec.c +++ b/crypto/evp/p_dec.c @@ -58,9 +58,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/rand.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif +#include <openssl/rsa.h> #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/x509.h> diff --git a/crypto/evp/p_enc.c b/crypto/evp/p_enc.c index d3bcaa0b7e..f1fc818750 100644 --- a/crypto/evp/p_enc.c +++ b/crypto/evp/p_enc.c @@ -58,9 +58,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/rand.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif +#include <openssl/rsa.h> #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/x509.h> diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index a7d624427e..a8fa301b31 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -62,19 +62,10 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/x509.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 - -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/rsa.h> +#include <openssl/dsa.h> +#include <openssl/dh.h> +#include <openssl/engine.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c index 52436d1244..d802d84b8f 100644 --- a/crypto/evp/p_seal.c +++ b/crypto/evp/p_seal.c @@ -58,9 +58,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/rand.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif +#include <openssl/rsa.h> #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/x509.h> diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index a285009ad4..ff5baa7d2c 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -59,9 +59,7 @@ #include <stdio.h> #include <stdlib.h> #include "internal/cryptlib.h" -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/evp.h> #include <openssl/x509v3.h> #include "internal/asn1_int.h" diff --git a/crypto/include/internal/chacha.h b/crypto/include/internal/chacha.h index 98787d35b8..dacbdf59dc 100644 --- a/crypto/include/internal/chacha.h +++ b/crypto/include/internal/chacha.h @@ -57,10 +57,6 @@ extern "C" { #endif -# ifdef OPENSSL_NO_CHACHA -# error CHACHA is disabled. -# endif - /* * ChaCha20_ctr32 encrypts |len| bytes from |inp| with the given key and * nonce and writes the result to |out|, which may be equal to |inp|. diff --git a/crypto/include/internal/poly1305.h b/crypto/include/internal/poly1305.h index b6db3253f2..8e2cac5215 100644 --- a/crypto/include/internal/poly1305.h +++ b/crypto/include/internal/poly1305.h @@ -49,10 +49,6 @@ */ #include <stddef.h> -#ifdef OPENSSL_NO_POLY1305 -# error POLY1305 is disabled. -#endif - #define POLY1305_BLOCK_SIZE 16 typedef struct poly1305_context POLY1305; diff --git a/crypto/init.c b/crypto/init.c index fad7a85b82..d3167804d9 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -63,12 +63,8 @@ #include <internal/evp_int.h> #include <internal/conf.h> #include <internal/async.h> -#ifndef OPENSSL_NO_ENGINE #include <internal/engine.h> -#endif -#ifndef OPENSSL_NO_COMP #include <openssl/comp.h> -#endif #include <internal/err.h> #include <stdlib.h> #include <assert.h> diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index 9a08c02832..5967b6eb72 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -115,15 +115,9 @@ #include <openssl/x509.h> #include <openssl/pkcs7.h> #include <openssl/pem.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> #ifndef OPENSSL_NO_RSA static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index 50a5051dad..1b1cde4b09 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -62,12 +62,8 @@ #include <openssl/evp.h> #include <openssl/x509.h> #include <openssl/pem.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> #ifndef OPENSSL_NO_STDIO STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 54ddc1efbb..5e7aa776d9 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -66,12 +66,8 @@ #include <openssl/pem.h> #include <openssl/pkcs12.h> #include "internal/asn1_int.h" -#ifndef OPENSSL_NO_DES -# include <openssl/des.h> -#endif -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/des.h> +#include <openssl/engine.h> #define MIN_LENGTH 4 diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 8eb398d55d..ef0c0e45d8 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -64,12 +64,8 @@ #include <openssl/x509.h> #include <openssl/pkcs12.h> #include <openssl/pem.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> #include "internal/asn1_int.h" #include "internal/evp_int.h" diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 63fd231775..36b41cda80 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -61,9 +61,7 @@ #include <openssl/opensslconf.h> #include <openssl/rand.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #ifdef OPENSSL_FIPS # include <openssl/fips.h> diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index 15f2194bf1..ad51a440e5 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -62,9 +62,7 @@ #include <openssl/x509.h> #include <openssl/rsa.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/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index 9cc88142b6..bd881ed528 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -62,9 +62,7 @@ #include "internal/bn_int.h" #include <openssl/rsa.h> #include <openssl/rand.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> static const RSA_METHOD *default_RSA_meth = NULL; diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index 93c8756068..22089a3267 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -64,9 +64,7 @@ #include <openssl/bn.h> #include <openssl/evp.h> #include <openssl/x509v3.h> -#ifndef OPENSSL_NO_CMS -# include <openssl/cms.h> -#endif +#include <openssl/cms.h> #include "internal/evp_int.h" #include "rsa_locl.h" diff --git a/crypto/ts/ts_conf.c b/crypto/ts/ts_conf.c index 6adea58840..e610691416 100644 --- a/crypto/ts/ts_conf.c +++ b/crypto/ts/ts_conf.c @@ -61,9 +61,7 @@ #include <openssl/crypto.h> #include "internal/cryptlib.h" #include <openssl/pem.h> -#ifndef OPENSSL_NO_ENGINE -# include <openssl/engine.h> -#endif +#include <openssl/engine.h> #include <openssl/ts.h> /* Macro definitions for the configuration file. */ diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c index 2c519f9785..afe59c4e9c 100644 --- a/crypto/x509/t_req.c +++ b/crypto/x509/t_req.c @@ -62,12 +62,8 @@ #include <openssl/objects.h> #include <openssl/x509.h> #include <openssl/x509v3.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> #ifndef OPENSSL_NO_STDIO int X509_REQ_print_fp(FILE *fp, X509_REQ *x) diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index f62a7c86b2..c370ba94bb 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -64,12 +64,8 @@ #include <openssl/x509.h> #include "internal/x509_int.h" #include <openssl/ocsp.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> int X509_verify(X509 *a, EVP_PKEY *r) { |