Browse Source

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>
master
Rich Salz 6 years ago
parent
commit
3c27208fab
102 changed files with 381 additions and 685 deletions
  1. +4
    -0
      CHANGES
  2. +2
    -6
      apps/apps.h
  3. +0
    -5
      crypto/aes/aes_locl.h
  4. +1
    -3
      crypto/asn1/ameth_lib.c
  5. +1
    -3
      crypto/asn1/d2i_pr.c
  6. +3
    -9
      crypto/asn1/d2i_pu.c
  7. +3
    -9
      crypto/asn1/i2d_pu.c
  8. +2
    -6
      crypto/asn1/t_spki.c
  9. +2
    -6
      crypto/asn1/x_pubkey.c
  10. +2
    -0
      crypto/async/arch/async_null.c
  11. +0
    -4
      crypto/blake2/blake2_locl.h
  12. +1
    -3
      crypto/cms/cms_cd.c
  13. +1
    -3
      crypto/conf/conf_mall.c
  14. +1
    -3
      crypto/conf/conf_sap.c
  15. +0
    -4
      crypto/ct/ct_locl.h
  16. +1
    -3
      crypto/dh/dh_ameth.c
  17. +1
    -3
      crypto/dh/dh_lib.c
  18. +1
    -3
      crypto/dh/dh_pmeth.c
  19. +1
    -3
      crypto/dsa/dsa_ameth.c
  20. +1
    -3
      crypto/dsa/dsa_gen.c
  21. +2
    -6
      crypto/dsa/dsa_lib.c
  22. +1
    -3
      crypto/ec/ec_ameth.c
  23. +1
    -3
      crypto/ec/ec_key.c
  24. +1
    -3
      crypto/ec/ec_kmeth.c
  25. +1
    -3
      crypto/ec/ecdsa_sign.c
  26. +1
    -3
      crypto/ec/ecdsa_vrf.c
  27. +1
    -3
      crypto/engine/eng_cryptodev.c
  28. +3
    -9
      crypto/engine/eng_openssl.c
  29. +8
    -24
      crypto/err/err_all.c
  30. +1
    -3
      crypto/evp/digest.c
  31. +1
    -1
      crypto/evp/e_aes.c
  32. +1
    -3
      crypto/evp/evp_enc.c
  33. +1
    -3
      crypto/evp/m_md2.c
  34. +1
    -3
      crypto/evp/m_md4.c
  35. +1
    -3
      crypto/evp/m_md5.c
  36. +1
    -3
      crypto/evp/m_md5_sha1.c
  37. +1
    -3
      crypto/evp/m_mdc2.c
  38. +1
    -3
      crypto/evp/m_ripemd.c
  39. +1
    -3
      crypto/evp/m_sha1.c
  40. +1
    -3
      crypto/evp/p_dec.c
  41. +1
    -3
      crypto/evp/p_enc.c
  42. +4
    -13
      crypto/evp/p_lib.c
  43. +1
    -3
      crypto/evp/p_seal.c
  44. +1
    -3
      crypto/evp/pmeth_lib.c
  45. +0
    -4
      crypto/include/internal/chacha.h
  46. +0
    -4
      crypto/include/internal/poly1305.h
  47. +0
    -4
      crypto/init.c
  48. +3
    -9
      crypto/pem/pem_all.c
  49. +2
    -6
      crypto/pem/pem_info.c
  50. +2
    -6
      crypto/pem/pem_lib.c
  51. +2
    -6
      crypto/pem/pem_pkey.c
  52. +1
    -3
      crypto/rand/rand_lib.c
  53. +1
    -3
      crypto/rsa/rsa_ameth.c
  54. +1
    -3
      crypto/rsa/rsa_lib.c
  55. +1
    -3
      crypto/rsa/rsa_pmeth.c
  56. +1
    -3
      crypto/ts/ts_conf.c
  57. +2
    -6
      crypto/x509/t_req.c
  58. +2
    -6
      crypto/x509/x_all.c
  59. +8
    -11
      include/openssl/aes.h
  60. +7
    -8
      include/openssl/blowfish.h
  61. +1
    -1
      include/openssl/bn.h
  62. +8
    -11
      include/openssl/camellia.h
  63. +6
    -8
      include/openssl/cast.h
  64. +9
    -9
      include/openssl/cms.h
  65. +8
    -7
      include/openssl/comp.h
  66. +8
    -7
      include/openssl/ct.h
  67. +10
    -11
      include/openssl/des.h
  68. +10
    -20
      include/openssl/dh.h
  69. +10
    -14
      include/openssl/dsa.h
  70. +5
    -17
      include/openssl/ec.h
  71. +11
    -23
      include/openssl/engine.h
  72. +6
    -8
      include/openssl/idea.h
  73. +0
    -4
      include/openssl/lhash.h
  74. +9
    -9
      include/openssl/md2.h
  75. +8
    -8
      include/openssl/md4.h
  76. +7
    -8
      include/openssl/md5.h
  77. +7
    -8
      include/openssl/mdc2.h
  78. +7
    -8
      include/openssl/rc2.h
  79. +5
    -7
      include/openssl/rc4.h
  80. +6
    -8
      include/openssl/rc5.h
  81. +9
    -8
      include/openssl/ripemd.h
  82. +8
    -14
      include/openssl/rsa.h
  83. +9
    -11
      include/openssl/seed.h
  84. +10
    -13
      include/openssl/srp.h
  85. +1
    -6
      include/openssl/ssl.h
  86. +1
    -3
      include/openssl/ssl3.h
  87. +10
    -18
      include/openssl/ts.h
  88. +8
    -7
      include/openssl/whrlpool.h
  89. +4
    -13
      include/openssl/x509.h
  90. +1
    -3
      ssl/s3_lib.c
  91. +1
    -3
      ssl/ssl_cert.c
  92. +2
    -6
      ssl/ssl_ciph.c
  93. +1
    -3
      ssl/ssl_conf.c
  94. +3
    -9
      ssl/ssl_lib.c
  95. +4
    -12
      ssl/ssl_locl.h
  96. +1
    -3
      ssl/ssl_sess.c
  97. +2
    -6
      ssl/statem/statem_clnt.c
  98. +1
    -3
      ssl/statem/statem_srvr.c
  99. +1
    -3
      ssl/t1_enc.c
  100. +1
    -3
      ssl/t1_ext.c

+ 4
- 0
CHANGES View File

@ -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]


+ 2
- 6
apps/apps.h View File

@ -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>


+ 0
- 5
crypto/aes/aes_locl.h View File

@ -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>


+ 1
- 3
crypto/asn1/ameth_lib.c View File

@ -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"


+ 1
- 3
crypto/asn1/d2i_pr.c View File

@ -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"


+ 3
- 9
crypto/asn1/d2i_pu.c View File

@ -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"


+ 3
- 9
crypto/asn1/i2d_pu.c View File

@ -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)
{


+ 2
- 6
crypto/asn1/t_spki.c View File

@ -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 */


+ 2
- 6
crypto/asn1/x_pubkey.c View File

@ -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,


+ 2
- 0
crypto/async/arch/async_null.c View File

@ -54,6 +54,8 @@
#include "../async_locl.h"
#ifdef ASYNC_NULL
# include <openssl/ct.h>
# include <openssl/x509v3.h>
int ASYNC_is_capable(void)
{


+ 0
- 4
crypto/blake2/blake2_locl.h View File

@ -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


+ 1
- 3
crypto/cms/cms_cd.c View File

@ -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


+ 1
- 3
crypto/conf/conf_mall.c View File

@ -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 */


+ 1
- 3
crypto/conf/conf_sap.c View File

@ -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


+ 0
- 4
crypto/ct/ct_locl.h View File

@ -50,10 +50,6 @@
* ====================================================================
*/
#ifdef OPENSSL_NO_CT
# error CT is disabled.
#endif
#include <stddef.h>
#include <openssl/ct.h>
#include <openssl/evp.h>


+ 1
- 3
crypto/dh/dh_ameth.c View File

@ -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


+ 1
- 3
crypto/dh/dh_lib.c View File

@ -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;


+ 1
- 3
crypto/dh/dh_pmeth.c View File

@ -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"


+ 1
- 3
crypto/dsa/dsa_ameth.c View File

@ -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"


+ 1
- 3
crypto/dsa/dsa_gen.c View File

@ -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,


+ 2
- 6
crypto/dsa/dsa_lib.c View File

@ -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;


+ 1
- 3
crypto/ec/ec_ameth.c View File

@ -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"


+ 1
- 3
crypto/ec/ec_key.c View File

@ -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)
{


+ 1
- 3
crypto/ec/ec_kmeth.c View File

@ -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"


+ 1
- 3
crypto/ec/ecdsa_sign.c View File

@ -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>


+ 1
- 3
crypto/ec/ecdsa_vrf.c View File

@ -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>
/*-


+ 1
- 3
crypto/engine/eng_cryptodev.c View File

@ -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>


+ 3
- 9
crypto/engine/eng_openssl.c View File

@ -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>


+ 8
- 24
crypto/err/err_all.c View File

@ -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>


+ 1
- 3
crypto/evp/digest.c View File

@ -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"


+ 1
- 1
crypto/evp/e_aes.c View File

@ -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>


+ 1
- 3
crypto/evp/evp_enc.c View File

@ -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"


+ 1
- 3
crypto/evp/m_md2.c View File

@ -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"


+ 1
- 3
crypto/evp/m_md4.c View File

@ -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)


+ 1
- 3
crypto/evp/m_md5.c View File

@ -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)


+ 1
- 3
crypto/evp/m_md5_sha1.c View File

@ -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;


+ 1
- 3
crypto/evp/m_mdc2.c View File

@ -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)


+ 1
- 3
crypto/evp/m_ripemd.c View File

@ -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)


+ 1
- 3
crypto/evp/m_sha1.c View File

@ -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)


+ 1
- 3
crypto/evp/p_dec.c View File

@ -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>


+ 1
- 3
crypto/evp/p_enc.c View File

@ -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>


+ 4
- 13
crypto/evp/p_lib.c View File

@ -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"


+ 1
- 3
crypto/evp/p_seal.c View File

@ -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>


+ 1
- 3
crypto/evp/pmeth_lib.c View File

@ -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"


+ 0
- 4
crypto/include/internal/chacha.h View File

@ -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|.


+ 0
- 4
crypto/include/internal/poly1305.h View File

@ -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;


+ 0
- 4
crypto/init.c View File

@ -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>


+ 3
- 9
crypto/pem/pem_all.c View File

@ -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);


+ 2
- 6
crypto/pem/pem_info.c View File

@ -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,


+ 2
- 6
crypto/pem/pem_lib.c View File

@ -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


+ 2
- 6
crypto/pem/pem_pkey.c View File

@ -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"


+ 1
- 3
crypto/rand/rand_lib.c View File

@ -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>


+ 1
- 3
crypto/rsa/rsa_ameth.c View File

@ -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"


+ 1
- 3
crypto/rsa/rsa_lib.c View File

@ -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;


+ 1
- 3
crypto/rsa/rsa_pmeth.c View File

@ -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"


+ 1
- 3
crypto/ts/ts_conf.c View File

@ -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. */


+ 2
- 6
crypto/x509/t_req.c View File

@ -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)


+ 2
- 6
crypto/x509/x_all.c View File

@ -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)
{


+ 8
- 11
include/openssl/aes.h View File

@ -53,11 +53,11 @@
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_AES
# error AES is disabled.
# endif
#ifndef OPENSSL_NO_AES
# include <stddef.h>
# ifdef __cplusplus
extern "C" {
# endif
# define AES_ENCRYPT 1
# define AES_DECRYPT 0
@ -69,10 +69,6 @@
# define AES_MAXNR 14
# define AES_BLOCK_SIZE 16
#ifdef __cplusplus
extern "C" {
#endif
/* This should be a hidden type, but EVP requires that the size be known */
struct aes_key_st {
# ifdef AES_LONG
@ -131,8 +127,9 @@ int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
const unsigned char *in, unsigned int inlen);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif /* !HEADER_AES_H */
#endif

+ 7
- 8
include/openssl/blowfish.h View File

@ -58,14 +58,12 @@
#ifndef HEADER_BLOWFISH_H
# define HEADER_BLOWFISH_H
# include <openssl/e_os2.h>
# include <openssl/opensslconf.h>
#ifdef __cplusplus
# ifndef OPENSSL_NO_BF
# include <openssl/e_os2.h>
# ifdef __cplusplus
extern "C" {
#endif
# ifdef OPENSSL_NO_BF
# error BF is disabled.
# endif
# define BF_ENCRYPT 1
@ -103,8 +101,9 @@ void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
unsigned char *ivec, int *num);
const char *BF_options(void);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 1
- 1
include/openssl/bn.h View File

@ -126,7 +126,7 @@
# include <openssl/e_os2.h>
# ifndef OPENSSL_NO_STDIO
# include <stdio.h> /* FILE */
# include <stdio.h>
# endif
# include <openssl/opensslconf.h>
# include <openssl/ossl_typ.h>


+ 8
- 11
include/openssl/camellia.h View File

@ -53,11 +53,11 @@
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_CAMELLIA
# error CAMELLIA is disabled.
# endif
# ifndef OPENSSL_NO_CAMELLIA
# include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
# define CAMELLIA_ENCRYPT 1
# define CAMELLIA_DECRYPT 0
@ -67,10 +67,6 @@
* Both sizes are in bytes.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* This should be a hidden type, but EVP requires that the size be known */
# define CAMELLIA_BLOCK_SIZE 16
@ -120,8 +116,9 @@ void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
unsigned int *num);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif /* !HEADER_Camellia_H */
#endif

+ 6
- 8
include/openssl/cast.h View File

@ -58,14 +58,11 @@
#ifndef HEADER_CAST_H
# define HEADER_CAST_H
#ifdef __cplusplus
extern "C" {
#endif
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_CAST
# error CAST is disabled.
# ifndef OPENSSL_NO_CAST
# ifdef __cplusplus
extern "C" {
# endif
# define CAST_ENCRYPT 1
@ -96,8 +93,9 @@ void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const CAST_KEY *schedule,
unsigned char *ivec, int *num);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 9
- 9
include/openssl/cms.h View File

@ -54,16 +54,14 @@
#ifndef HEADER_CMS_H
# define HEADER_CMS_H
# include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_CMS
# include <openssl/x509.h>
# include <openssl/x509v3.h>
# ifdef OPENSSL_NO_CMS
# error CMS is disabled.
# endif
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
@ -551,7 +549,9 @@ void ERR_load_CMS_strings(void);
# define CMS_R_VERIFICATION_FAILURE 158
# define CMS_R_WRAP_ERROR 159
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 8
- 7
include/openssl/comp.h View File

@ -56,15 +56,14 @@
#ifndef HEADER_COMP_H
# define HEADER_COMP_H
# include <openssl/crypto.h>
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_COMP
# error COMP is disabled.
# ifndef OPENSSL_NO_COMP
# include <openssl/crypto.h>
# ifdef __cplusplus
extern "C" {
# endif
#ifdef __cplusplus
extern "C" {
#endif
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
@ -110,5 +109,7 @@ void ERR_load_COMP_strings(void);
#ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 8
- 7
include/openssl/ct.h View File

@ -51,21 +51,20 @@
* ====================================================================
*/
#ifdef OPENSSL_NO_CT
# error "CT is disabled"
#endif
#ifndef HEADER_CT_H
# define HEADER_CT_H
# include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_CT
# include <openssl/ossl_typ.h>
# include <openssl/safestack.h>
# include <openssl/x509.h>
# ifdef __cplusplus
extern "C" {
# endif
/* Minimum RSA key size, from RFC6962 */
# define SCT_MIN_RSA_BITS 2048
@ -601,7 +600,9 @@ void ERR_load_CT_strings(void);
# define CT_R_UNSUPPORTED_ENTRY_TYPE 102
# define CT_R_UNSUPPORTED_VERSION 103
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 10
- 11
include/openssl/des.h View File

@ -55,14 +55,16 @@
* [including the GNU Public Licence.]
*/
#ifndef HEADER_NEW_DES_H
# define HEADER_NEW_DES_H
#ifndef HEADER_DES_H
# define HEADER_DES_H
# include <openssl/e_os2.h>
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_DES
# error DES is disabled.
# ifndef OPENSSL_NO_DES
# ifdef __cplusplus
extern "C" {
# endif
# include <openssl/e_os2.h>
typedef unsigned int DES_LONG;
@ -71,10 +73,6 @@ typedef unsigned int DES_LONG;
# define OPENSSL_EXTERN OPENSSL_EXPORT
# endif
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned char DES_cblock[8];
typedef /* const */ unsigned char const_DES_cblock[8];
/*
@ -228,8 +226,9 @@ int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
# define DES_fixup_key_parity DES_set_odd_parity
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 10
- 20
include/openssl/dh.h View File

@ -58,13 +58,10 @@
#ifndef HEADER_DH_H
# define HEADER_DH_H
# include <openssl/e_os2.h>
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_DH
# error DH is disabled.
# endif
# ifndef OPENSSL_NO_DH
# include <openssl/e_os2.h>
# include <openssl/bio.h>
# include <openssl/asn1.h>
# include <openssl/ossl_typ.h>
@ -72,6 +69,10 @@
# include <openssl/bn.h>
# endif
# ifdef __cplusplus
extern "C" {
# endif
# ifndef OPENSSL_DH_MAX_MODULUS_BITS
# define OPENSSL_DH_MAX_MODULUS_BITS 10000
# endif
@ -79,15 +80,6 @@
# define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
# define DH_FLAG_CACHE_MONT_P 0x01
/*
* new with 0.9.7h; the built-in DH
* implementation now uses constant time
* modular exponentiation for secret exponents
* by default. This flag causes the
* faster variable sliding window method to
* be used for all exponents.
*/
# define DH_FLAG_NO_EXP_CONSTTIME 0x02
/*
@ -107,10 +99,6 @@
# define DH_FLAG_NON_FIPS_ALLOW 0x0400
#ifdef __cplusplus
extern "C" {
#endif
/* Already defined in ossl_typ.h */
/* typedef struct dh_st DH; */
/* typedef struct dh_method DH_METHOD; */
@ -389,7 +377,9 @@ void ERR_load_DH_strings(void);
# define DH_R_PEER_KEY_ERROR 111
# define DH_R_SHARED_INFO_ERROR 113
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 10
- 14
include/openssl/dsa.h View File

@ -63,22 +63,20 @@
#ifndef HEADER_DSA_H
# define HEADER_DSA_H
# include <openssl/e_os2.h>
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_DSA
# error DSA is disabled.
# ifndef OPENSSL_NO_DSA
# ifdef __cplusplus
extern "C" {
# endif
# include <openssl/e_os2.h>
# include <openssl/bio.h>
# include <openssl/crypto.h>
# include <openssl/ossl_typ.h>
# include <openssl/opensslconf.h>
# if OPENSSL_API_COMPAT < 0x10100000L
# include <openssl/bn.h>
# ifndef OPENSSL_NO_DH
# include <openssl/dh.h>
# endif
# include <openssl/dh.h>
# endif
# ifndef OPENSSL_DSA_MAX_MODULUS_BITS
@ -113,10 +111,6 @@
# define DSA_FLAG_NON_FIPS_ALLOW 0x0400
# define DSA_FLAG_FIPS_CHECKED 0x0800
#ifdef __cplusplus
extern "C" {
#endif
/* Already defined in ossl_typ.h */
/* typedef struct dsa_st DSA; */
/* typedef struct dsa_method DSA_METHOD; */
@ -323,7 +317,9 @@ void ERR_load_DSA_strings(void);
# define DSA_R_PARAMETER_ENCODING_ERROR 105
# define DSA_R_Q_NOT_PRIME 113
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 5
- 17
include/openssl/ec.h View File

@ -1,12 +1,6 @@
/* crypto/ec/ec.h */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
/**
* \file crypto/ec/ec.h Include file for the OpenSSL EC functions
* \author Originally written by Bodo Moeller for the OpenSSL project
*/
/* ====================================================================
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
*
@ -79,22 +73,14 @@
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_EC
# error EC is disabled.
# endif
# ifndef OPENSSL_NO_EC
# include <openssl/asn1.h>
# include <openssl/symhacks.h>
# if OPENSSL_API_COMPAT < 0x10100000L
# include <openssl/bn.h>
# endif
# ifdef __cplusplus
extern "C" {
# elif defined(__SUNPRO_C)
# if __SUNPRO_C >= 0x520
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
# endif
# endif
# ifndef OPENSSL_ECC_MAX_FIELD_BITS
@ -1650,7 +1636,9 @@ void ERR_load_EC_strings(void);
# define EC_R_WRONG_CURVE_PARAMETERS 145
# define EC_R_WRONG_ORDER 130
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
# endif
#endif

+ 11
- 23
include/openssl/engine.h View File

@ -66,37 +66,23 @@
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_ENGINE
# error ENGINE is disabled.
# endif
# ifndef OPENSSL_NO_ENGINE
# if OPENSSL_API_COMPAT < 0x10100000L
# include <openssl/bn.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_EC
# include <openssl/ec.h>
# endif
# include <openssl/rsa.h>
# include <openssl/dsa.h>
# include <openssl/dh.h>
# include <openssl/ec.h>
# include <openssl/