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 /include | |
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 'include')
31 files changed, 216 insertions, 308 deletions
diff --git a/include/openssl/aes.h b/include/openssl/aes.h index 8c36a4d64f..f81ec0dc51 100644 --- a/include/openssl/aes.h +++ b/include/openssl/aes.h @@ -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 diff --git a/include/openssl/blowfish.h b/include/openssl/blowfish.h index ee4afa542d..5e0af533cf 100644 --- a/include/openssl/blowfish.h +++ b/include/openssl/blowfish.h @@ -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 diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 8d2d5a8be0..315b99e748 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h @@ -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> diff --git a/include/openssl/camellia.h b/include/openssl/camellia.h index d04d2a8b3a..d05b392549 100644 --- a/include/openssl/camellia.h +++ b/include/openssl/camellia.h @@ -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 diff --git a/include/openssl/cast.h b/include/openssl/cast.h index 87d1933a9b..c54d3c9219 100644 --- a/include/openssl/cast.h +++ b/include/openssl/cast.h @@ -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 diff --git a/include/openssl/cms.h b/include/openssl/cms.h index f8d55d84d2..5ae701e585 100644 --- a/include/openssl/cms.h +++ b/include/openssl/cms.h @@ -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 diff --git a/include/openssl/comp.h b/include/openssl/comp.h index de16a9fcdb..de4eb32561 100644 --- a/include/openssl/comp.h +++ b/include/openssl/comp.h @@ -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 diff --git a/include/openssl/ct.h b/include/openssl/ct.h index f148a270aa..0da3125d17 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -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 diff --git a/include/openssl/des.h b/include/openssl/des.h index 13ce232703..633d070b39 100644 --- a/include/openssl/des.h +++ b/include/openssl/des.h @@ -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 diff --git a/include/openssl/dh.h b/include/openssl/dh.h index e852cbe446..2e021e235b 100644 --- a/include/openssl/dh.h +++ b/include/openssl/dh.h @@ -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 diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index 865344932f..240a1afa84 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -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 diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 103f718208..892239dd87 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -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 diff --git a/include/openssl/engine.h b/include/openssl/engine.h index d1cd17a24c..c12e02755f 100644 --- a/include/openssl/engine.h +++ b/include/openssl/engine.h @@ -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/rand.h> # include <openssl/ui.h> # include <openssl/err.h> # endif - # include <openssl/ossl_typ.h> # include <openssl/symhacks.h> - # include <openssl/x509.h> - -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif +# endif /* * These flags are used to control combinations of algorithm (methods) by @@ -905,7 +891,9 @@ void ERR_load_ENGINE_strings(void); # define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 # define ENGINE_R_VERSION_INCOMPATIBILITY 145 -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif + #endif diff --git a/include/openssl/idea.h b/include/openssl/idea.h index 29b5094394..165ee405ac 100644 --- a/include/openssl/idea.h +++ b/include/openssl/idea.h @@ -60,8 +60,9 @@ # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_IDEA -# error IDEA is disabled. +# ifndef OPENSSL_NO_IDEA +# ifdef __cplusplus +extern "C" { # endif typedef unsigned int IDEA_INT; @@ -72,10 +73,6 @@ typedef unsigned int IDEA_INT; # define IDEA_BLOCK 8 # define IDEA_KEY_LENGTH 16 -#ifdef __cplusplus -extern "C" { -#endif - typedef struct idea_key_st { IDEA_INT data[9][6]; } IDEA_KEY_SCHEDULE; @@ -95,8 +92,9 @@ void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/lhash.h b/include/openssl/lhash.h index 899544ce04..2edd738a8b 100644 --- a/include/openssl/lhash.h +++ b/include/openssl/lhash.h @@ -63,10 +63,6 @@ # define HEADER_LHASH_H # include <openssl/e_os2.h> -# ifndef OPENSSL_NO_STDIO -# include <stdio.h> -# endif - # include <openssl/bio.h> #ifdef __cplusplus diff --git a/include/openssl/md2.h b/include/openssl/md2.h index 1dba7cf395..d77a4fac9c 100644 --- a/include/openssl/md2.h +++ b/include/openssl/md2.h @@ -59,20 +59,18 @@ # define HEADER_MD2_H # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_MD2 -# error MD2 is disabled. -# endif + +# ifndef OPENSSL_NO_MD2 # include <stddef.h> +# ifdef __cplusplus +extern "C" { +# endif typedef unsigned char MD2_INT; # define MD2_DIGEST_LENGTH 16 # define MD2_BLOCK 16 -#ifdef __cplusplus -extern "C" { -#endif - typedef struct MD2state_st { unsigned int num; unsigned char data[MD2_BLOCK]; @@ -85,8 +83,10 @@ int MD2_Init(MD2_CTX *c); int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); int MD2_Final(unsigned char *md, MD2_CTX *c); unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); -#ifdef __cplusplus + +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/md4.h b/include/openssl/md4.h index c937625f93..b40a839128 100644 --- a/include/openssl/md4.h +++ b/include/openssl/md4.h @@ -58,15 +58,13 @@ #ifndef HEADER_MD4_H # define HEADER_MD4_H +# include <openssl/opensslconf.h> + +# ifndef OPENSSL_NO_MD4 # include <openssl/e_os2.h> # include <stddef.h> - -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif - -# ifdef OPENSSL_NO_MD4 -# error MD4 is disabled. # endif /*- @@ -92,8 +90,10 @@ int MD4_Update(MD4_CTX *c, const void *data, size_t len); int MD4_Final(unsigned char *md, MD4_CTX *c); unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); void MD4_Transform(MD4_CTX *c, const unsigned char *b); -#ifdef __cplusplus + +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/md5.h b/include/openssl/md5.h index 02ea76a54e..5b34b463e9 100644 --- a/include/openssl/md5.h +++ b/include/openssl/md5.h @@ -58,15 +58,13 @@ #ifndef HEADER_MD5_H # define HEADER_MD5_H +# include <openssl/opensslconf.h> + +# ifndef OPENSSL_NO_MD5 # include <openssl/e_os2.h> # include <stddef.h> - -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif - -# ifdef OPENSSL_NO_MD5 -# error MD5 is disabled. # endif /* @@ -92,8 +90,9 @@ int MD5_Update(MD5_CTX *c, const void *data, size_t len); int MD5_Final(unsigned char *md, MD5_CTX *c); unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); void MD5_Transform(MD5_CTX *c, const unsigned char *b); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/mdc2.h b/include/openssl/mdc2.h index fc9784fa18..229b122719 100644 --- a/include/openssl/mdc2.h +++ b/include/openssl/mdc2.h @@ -58,14 +58,12 @@ #ifndef HEADER_MDC2_H # define HEADER_MDC2_H -# include <openssl/des.h> +# include <openssl/opensslconf.h> -#ifdef __cplusplus +#ifndef OPENSSL_NO_MDC2 +# include <openssl/des.h> +# ifdef __cplusplus extern "C" { -#endif - -# ifdef OPENSSL_NO_MDC2 -# error MDC2 is disabled. # endif # define MDC2_BLOCK 8 @@ -83,8 +81,9 @@ int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); int MDC2_Final(unsigned char *md, MDC2_CTX *c); unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/rc2.h b/include/openssl/rc2.h index 0bf6ae31ec..50be22dcec 100644 --- a/include/openssl/rc2.h +++ b/include/openssl/rc2.h @@ -59,8 +59,10 @@ # define HEADER_RC2_H # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_RC2 -# error RC2 is disabled. + +# ifndef OPENSSL_NO_RC2 +# ifdef __cplusplus +extern "C" { # endif typedef unsigned int RC2_INT; @@ -71,10 +73,6 @@ typedef unsigned int RC2_INT; # define RC2_BLOCK 8 # define RC2_KEY_LENGTH 16 -#ifdef __cplusplus -extern "C" { -#endif - typedef struct rc2_key_st { RC2_INT data[64]; } RC2_KEY; @@ -93,8 +91,9 @@ void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *schedule, unsigned char *ivec, int *num); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/rc4.h b/include/openssl/rc4.h index c938fdb92a..a5fdbfb92c 100644 --- a/include/openssl/rc4.h +++ b/include/openssl/rc4.h @@ -58,13 +58,10 @@ #ifndef HEADER_RC4_H # define HEADER_RC4_H -# include <openssl/opensslconf.h>/* OPENSSL_NO_RC4, RC4_INT */ -# ifdef OPENSSL_NO_RC4 -# error RC4 is disabled. -# endif +# include <openssl/opensslconf.h> +# ifndef OPENSSL_NO_RC4 # include <stddef.h> - #ifdef __cplusplus extern "C" { #endif @@ -79,8 +76,9 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, unsigned char *outdata); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/rc5.h b/include/openssl/rc5.h index 026a1147a9..c1ff358ad3 100644 --- a/include/openssl/rc5.h +++ b/include/openssl/rc5.h @@ -58,14 +58,11 @@ #ifndef HEADER_RC5_H # define HEADER_RC5_H -# include <openssl/opensslconf.h>/* OPENSSL_NO_RC5 */ +# include <openssl/opensslconf.h> -#ifdef __cplusplus +# ifndef OPENSSL_NO_RC5 +# ifdef __cplusplus extern "C" { -#endif - -# ifdef OPENSSL_NO_RC5 -# error RC5 is disabled. # endif # define RC5_ENCRYPT 1 @@ -106,8 +103,9 @@ void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC5_32_KEY *schedule, unsigned char *ivec, int *num); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif +# endif #endif diff --git a/include/openssl/ripemd.h b/include/openssl/ripemd.h index 8a098f66a6..97e5df7694 100644 --- a/include/openssl/ripemd.h +++ b/ |