summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-03-18 14:30:20 -0400
committerRich Salz <rsalz@openssl.org>2016-03-20 19:48:36 -0400
commit3c27208fab1dc29f47f088490404df5abfcdfb05 (patch)
tree3654ea8c099e19203a48ce2688aeee02f46fd12b
parent8230f6c764f854190358cf40f0e7e7ca5647d8cd (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>
-rw-r--r--CHANGES4
-rw-r--r--apps/apps.h8
-rw-r--r--crypto/aes/aes_locl.h5
-rw-r--r--crypto/asn1/ameth_lib.c4
-rw-r--r--crypto/asn1/d2i_pr.c4
-rw-r--r--crypto/asn1/d2i_pu.c12
-rw-r--r--crypto/asn1/i2d_pu.c12
-rw-r--r--crypto/asn1/t_spki.c8
-rw-r--r--crypto/asn1/x_pubkey.c8
-rw-r--r--crypto/async/arch/async_null.c2
-rw-r--r--crypto/blake2/blake2_locl.h4
-rw-r--r--crypto/cms/cms_cd.c4
-rw-r--r--crypto/conf/conf_mall.c4
-rw-r--r--crypto/conf/conf_sap.c4
-rw-r--r--crypto/ct/ct_locl.h4
-rw-r--r--crypto/dh/dh_ameth.c4
-rw-r--r--crypto/dh/dh_lib.c4
-rw-r--r--crypto/dh/dh_pmeth.c4
-rw-r--r--crypto/dsa/dsa_ameth.c4
-rw-r--r--crypto/dsa/dsa_gen.c4
-rw-r--r--crypto/dsa/dsa_lib.c8
-rw-r--r--crypto/ec/ec_ameth.c4
-rw-r--r--crypto/ec/ec_key.c4
-rw-r--r--crypto/ec/ec_kmeth.c4
-rw-r--r--crypto/ec/ecdsa_sign.c4
-rw-r--r--crypto/ec/ecdsa_vrf.c4
-rw-r--r--crypto/engine/eng_cryptodev.c4
-rw-r--r--crypto/engine/eng_openssl.c12
-rw-r--r--crypto/err/err_all.c32
-rw-r--r--crypto/evp/digest.c4
-rw-r--r--crypto/evp/e_aes.c2
-rw-r--r--crypto/evp/evp_enc.c4
-rw-r--r--crypto/evp/m_md2.c4
-rw-r--r--crypto/evp/m_md4.c4
-rw-r--r--crypto/evp/m_md5.c4
-rw-r--r--crypto/evp/m_md5_sha1.c4
-rw-r--r--crypto/evp/m_mdc2.c4
-rw-r--r--crypto/evp/m_ripemd.c4
-rw-r--r--crypto/evp/m_sha1.c4
-rw-r--r--crypto/evp/p_dec.c4
-rw-r--r--crypto/evp/p_enc.c4
-rw-r--r--crypto/evp/p_lib.c17
-rw-r--r--crypto/evp/p_seal.c4
-rw-r--r--crypto/evp/pmeth_lib.c4
-rw-r--r--crypto/include/internal/chacha.h4
-rw-r--r--crypto/include/internal/poly1305.h4
-rw-r--r--crypto/init.c4
-rw-r--r--crypto/pem/pem_all.c12
-rw-r--r--crypto/pem/pem_info.c8
-rw-r--r--crypto/pem/pem_lib.c8
-rw-r--r--crypto/pem/pem_pkey.c8
-rw-r--r--crypto/rand/rand_lib.c4
-rw-r--r--crypto/rsa/rsa_ameth.c4
-rw-r--r--crypto/rsa/rsa_lib.c4
-rw-r--r--crypto/rsa/rsa_pmeth.c4
-rw-r--r--crypto/ts/ts_conf.c4
-rw-r--r--crypto/x509/t_req.c8
-rw-r--r--crypto/x509/x_all.c8
-rw-r--r--include/openssl/aes.h19
-rw-r--r--include/openssl/blowfish.h15
-rw-r--r--include/openssl/bn.h2
-rw-r--r--include/openssl/camellia.h19
-rw-r--r--include/openssl/cast.h14
-rw-r--r--include/openssl/cms.h18
-rw-r--r--include/openssl/comp.h15
-rw-r--r--include/openssl/ct.h15
-rw-r--r--include/openssl/des.h21
-rw-r--r--include/openssl/dh.h30
-rw-r--r--include/openssl/dsa.h24
-rw-r--r--include/openssl/ec.h22
-rw-r--r--include/openssl/engine.h34
-rw-r--r--include/openssl/idea.h14
-rw-r--r--include/openssl/lhash.h4
-rw-r--r--include/openssl/md2.h18
-rw-r--r--include/openssl/md4.h16
-rw-r--r--include/openssl/md5.h15
-rw-r--r--include/openssl/mdc2.h15
-rw-r--r--include/openssl/rc2.h15
-rw-r--r--include/openssl/rc4.h12
-rw-r--r--include/openssl/rc5.h14
-rw-r--r--include/openssl/ripemd.h17
-rw-r--r--include/openssl/rsa.h22
-rw-r--r--include/openssl/seed.h20
-rw-r--r--include/openssl/srp.h23
-rw-r--r--include/openssl/ssl.h7
-rw-r--r--include/openssl/ssl3.h4
-rw-r--r--include/openssl/ts.h28
-rw-r--r--include/openssl/whrlpool.h15
-rw-r--r--include/openssl/x509.h17
-rw-r--r--ssl/s3_lib.c4
-rw-r--r--ssl/ssl_cert.c4
-rw-r--r--ssl/ssl_ciph.c8
-rw-r--r--ssl/ssl_conf.c4
-rw-r--r--ssl/ssl_lib.c12
-rw-r--r--ssl/ssl_locl.h16
-rw-r--r--ssl/ssl_sess.c4
-rw-r--r--ssl/statem/statem_clnt.c8
-rw-r--r--ssl/statem/statem_srvr.c4
-rw-r--r--ssl/t1_enc.c4
-rw-r--r--ssl/t1_ext.c4
-rw-r--r--ssl/t1_lib.c10
-rw-r--r--util/libcrypto.num122
102 files changed, 381 insertions, 685 deletions
diff --git a/CHANGES b/CHANGES
index 16443a3f59..08cd0a373f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
Changes between 1.0.2g and 1.1.0 [xx XXX xxxx]
+ *) Headers are now wrapped, if necessary, with OPENSSL_NO_xxx, so
+ it is always safe to #include a header now.
+ [Rich Salz]
+
*) Removed the aged BC-32 config and all its supporting scripts
[Richard Levitte]
diff --git a/apps/apps.h b/apps/apps.h
index e7ea46181c..7be7325429 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -121,12 +121,8 @@
# include <openssl/lhash.h>
# include <openssl/conf.h>
# include <openssl/txt_db.h>
-# ifndef OPENSSL_NO_ENGINE
-# include <openssl/engine.h>
-# endif
-# ifndef OPENSSL_NO_OCSP
-# include <openssl/ocsp.h>
-# endif
+# include <openssl/engine.h>
+# include <openssl/ocsp.h>
# include <openssl/ossl_typ.h>
# include <signal.h>
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/c