diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h index bab2c9d7056902083064320afbe9883107671ca8..f57c87d9b3670373512f3701fe4e7d4cc14b603e 100644 --- a/crypto/bn/bn_lcl.h +++ b/crypto/bn/bn_lcl.h @@ -23,10 +23,6 @@ # include "internal/bn_int.h" -#ifdef __cplusplus -extern "C" { -#endif - /* * These preprocessor symbols control various aspects of the bignum headers * and library code. They're not defined by any "normal" configuration, as @@ -659,8 +655,4 @@ static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits) return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2); } -#ifdef __cplusplus -} -#endif - #endif diff --git a/crypto/cms/cms_lcl.h b/crypto/cms/cms_lcl.h index c277f713767bea8b0def190ea22b539ded61074d..dd5a58529f6c8408437ef97a8659cae59589b9b6 100644 --- a/crypto/cms/cms_lcl.h +++ b/crypto/cms/cms_lcl.h @@ -10,10 +10,6 @@ #ifndef HEADER_CMS_LCL_H # define HEADER_CMS_LCL_H -#ifdef __cplusplus -extern "C" { -#endif - # include /* @@ -438,7 +434,4 @@ DECLARE_ASN1_ITEM(CMS_RevocationInfoChoice) DECLARE_ASN1_ITEM(CMS_SignedData) DECLARE_ASN1_ITEM(CMS_CompressedData) -#ifdef __cplusplus -} -#endif #endif diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h index 60fdf820f05513bd83e36b83030db5ed5b986859..7c41da2fe175e569253deabb0ef634fdd7a7891e 100644 --- a/crypto/engine/eng_int.h +++ b/crypto/engine/eng_int.h @@ -16,10 +16,6 @@ # include "internal/thread_once.h" # include "internal/refcount.h" -#ifdef __cplusplus -extern "C" { -#endif - extern CRYPTO_RWLOCK *global_engine_lock; /* @@ -172,8 +168,4 @@ typedef struct st_engine_pile ENGINE_PILE; DEFINE_LHASH_OF(ENGINE_PILE); -#ifdef __cplusplus -} -#endif - #endif /* HEADER_ENGINE_INT_H */ diff --git a/crypto/hmac/hmac_lcl.h b/crypto/hmac/hmac_lcl.h index 4c156dc126c229c5b946e9faca52ca3675420f62..7ba0aac483ead8e06b0aa24002f61e088a1a18af 100644 --- a/crypto/hmac/hmac_lcl.h +++ b/crypto/hmac/hmac_lcl.h @@ -10,13 +10,6 @@ #ifndef HEADER_HMAC_LCL_H # define HEADER_HMAC_LCL_H -#ifdef __cplusplus -extern "C" { -#endif -#if 0 /* emacs indentation fix */ -} -#endif - struct hmac_ctx_st { const EVP_MD *md; EVP_MD_CTX *md_ctx; @@ -26,8 +19,4 @@ struct hmac_ctx_st { unsigned char key[HMAC_MAX_MD_CBLOCK]; }; -#ifdef __cplusplus -} /* extern "C" */ -#endif - #endif diff --git a/crypto/include/internal/aria.h b/crypto/include/internal/aria.h index 073827185a398dbaa8907897def7a81d6b1bc8d0..e402b8eec803c3811f2b697103c31d4c366fad50 100644 --- a/crypto/include/internal/aria.h +++ b/crypto/include/internal/aria.h @@ -25,10 +25,6 @@ # define ARIA_BLOCK_SIZE 16 /* Size of each encryption/decryption block */ # define ARIA_MAX_KEYS 17 /* Number of keys needed in the worst case */ -# ifdef __cplusplus -extern "C" { -# endif - typedef union { unsigned char c[ARIA_BLOCK_SIZE]; unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)]; @@ -51,8 +47,4 @@ int aria_set_decrypt_key(const unsigned char *userKey, const int bits, void aria_encrypt(const unsigned char *in, unsigned char *out, const ARIA_KEY *key); -# ifdef __cplusplus -} -# endif - #endif diff --git a/crypto/include/internal/bn_int.h b/crypto/include/internal/bn_int.h index ac49d1eab3d22a668094bc5588e507b2e4ce7d89..9379951dead6b50d9a005f899bcfaae627297711 100644 --- a/crypto/include/internal/bn_int.h +++ b/crypto/include/internal/bn_int.h @@ -13,10 +13,6 @@ # include # include -#ifdef __cplusplus -extern "C" { -#endif - BIGNUM *bn_wexpand(BIGNUM *a, int words); BIGNUM *bn_expand2(BIGNUM *a, int words); @@ -64,8 +60,4 @@ void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size); */ int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words); -#ifdef __cplusplus -} -#endif - #endif diff --git a/crypto/include/internal/chacha.h b/crypto/include/internal/chacha.h index 7d4366ea25338198d5e71d68b9be75ce34a427b2..119361d4d86293f1515ed3ccf37e3240006f2120 100644 --- a/crypto/include/internal/chacha.h +++ b/crypto/include/internal/chacha.h @@ -12,10 +12,6 @@ #include -#ifdef __cplusplus -extern "C" { -#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|. @@ -43,7 +39,4 @@ void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, #define CHACHA_CTR_SIZE 16 #define CHACHA_BLK_SIZE 64 -#ifdef __cplusplus -} -#endif #endif diff --git a/crypto/include/internal/sm2.h b/crypto/include/internal/sm2.h index 613fa34022762b082f674dadf0703f3840a348b3..23e38952b2a5e606d101675c9e8d731c54aea7a2 100644 --- a/crypto/include/internal/sm2.h +++ b/crypto/include/internal/sm2.h @@ -15,10 +15,6 @@ # ifndef OPENSSL_NO_SM2 -# ifdef __cplusplus -extern "C" { -# endif - # include /* The default user id as specified in GM/T 0009-2012 */ @@ -74,9 +70,5 @@ int sm2_decrypt(const EC_KEY *key, const uint8_t *ciphertext, size_t ciphertext_len, uint8_t *ptext_buf, size_t *ptext_len); -# ifdef __cplusplus -} -# endif - # endif /* OPENSSL_NO_SM2 */ #endif diff --git a/crypto/include/internal/sm2err.h b/crypto/include/internal/sm2err.h index 9a7e2b62758cddb5e7c5b1d4eda1997fe6c52994..f32d26c04ba77af604b0966eba489932818290e4 100644 --- a/crypto/include/internal/sm2err.h +++ b/crypto/include/internal/sm2err.h @@ -15,9 +15,6 @@ # ifndef OPENSSL_NO_SM2 -# ifdef __cplusplus -extern "C" -# endif int ERR_load_SM2_strings(void); /* diff --git a/crypto/include/internal/store_int.h b/crypto/include/internal/store_int.h index 9966aefa679754ae892cfee25104fbd635d698f4..0125aae03efad6af167dc943de7e36b67b5cd422 100644 --- a/crypto/include/internal/store_int.h +++ b/crypto/include/internal/store_int.h @@ -14,10 +14,6 @@ # include # include -# ifdef __cplusplus -extern "C" { -# endif - /* * Two functions to read PEM data off an already opened BIO. To be used * instead of OSSLSTORE_open() and OSSLSTORE_close(). Everything is done @@ -27,7 +23,4 @@ OSSL_STORE_CTX *ossl_store_attach_pem_bio(BIO *bp, const UI_METHOD *ui_method, void *ui_data); int ossl_store_detach_pem_bio(OSSL_STORE_CTX *ctx); -# ifdef __cplusplus -} -# endif #endif diff --git a/crypto/seed/seed_locl.h b/crypto/seed/seed_locl.h index d4a03fc4aa85f5c23b12f7ce70823bf03de6dd54..97c43ef684c672b914242992700858f5e47bb19f 100644 --- a/crypto/seed/seed_locl.h +++ b/crypto/seed/seed_locl.h @@ -45,10 +45,6 @@ typedef unsigned int seed_word; # endif -#ifdef __cplusplus -extern "C" { -#endif - # define char2word(c, i) \ (i) = ((((seed_word)(c)[0]) << 24) | (((seed_word)(c)[1]) << 16) | (((seed_word)(c)[2]) << 8) | ((seed_word)(c)[3])) @@ -113,8 +109,4 @@ extern "C" { (X1) ^= (T0); \ (X2) ^= (T1) -#ifdef __cplusplus -} -#endif - #endif /* HEADER_SEED_LOCL_H */ diff --git a/crypto/x509v3/v3_admis.h b/crypto/x509v3/v3_admis.h index 2f1e76d78ef42f568a6d71fb42fd62355dbbc4b1..fa23fc761759f26725ee9c5ec1f5c39600fcc201 100644 --- a/crypto/x509v3/v3_admis.h +++ b/crypto/x509v3/v3_admis.h @@ -10,10 +10,6 @@ #ifndef HEADER_V3_ADMISSION_H # define HEADER_V3_ADMISSION_H -#ifdef __cplusplus -extern "C" { -#endif - struct NamingAuthority_st { ASN1_OBJECT* namingAuthorityId; ASN1_IA5STRING* namingAuthorityUrl; @@ -39,7 +35,4 @@ struct AdmissionSyntax_st { STACK_OF(ADMISSIONS)* contentsOfAdmissions; }; -#ifdef __cplusplus -} -#endif #endif diff --git a/e_os.h b/e_os.h index 5071af6231970aa14df275e778f022857afea12d..5769029b7281cd4b05a015c6ed4ca61e4057b5ea 100644 --- a/e_os.h +++ b/e_os.h @@ -22,10 +22,6 @@ * outside; this file e_os.h is not part of the exported interface. */ -#ifdef __cplusplus -extern "C" { -#endif - # ifndef DEVRANDOM /* * set this to a comma-separated list of 'random' device files to try out. By @@ -325,8 +321,4 @@ struct servent *getservbyname(const char *name, const char *proto); # define CRYPTO_memcmp memcmp #endif -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/internal/conf.h b/include/internal/conf.h index ada3f92b4d86c64e5e5ad933116228998fc8e18e..23a9c3b4744666d81dd104b15b9a0ddd58d832bc 100644 --- a/include/internal/conf.h +++ b/include/internal/conf.h @@ -12,11 +12,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - - struct ossl_init_settings_st { char *appname; }; @@ -25,8 +20,4 @@ void openssl_config_int(const char *appname); void openssl_no_config_int(void); void conf_modules_free_int(void); -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/internal/constant_time_locl.h b/include/internal/constant_time_locl.h index d23f515c4ffd2a0051e381da9cbc58de90210efd..82ff74652ecca58f74c11c6754b52a176cf530b7 100644 --- a/include/internal/constant_time_locl.h +++ b/include/internal/constant_time_locl.h @@ -14,10 +14,6 @@ # include # include /* For 'ossl_inline' */ -#ifdef __cplusplus -extern "C" { -#endif - /*- * The boolean methods return a bitmask of all ones (0xff...f) for true * and 0 for false. This is useful for choosing a value based on the result @@ -328,8 +324,4 @@ static ossl_inline void constant_time_lookup(void *out, } } -#ifdef __cplusplus -} -#endif - #endif /* HEADER_CONSTANT_TIME_LOCL_H */ diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h index 8a96de9847aaac545854d54c63a8606b6928b9b9..2808fe7eea068aeca09b06e5c4eafe1ba7e22a6c 100644 --- a/include/internal/cryptlib.h +++ b/include/internal/cryptlib.h @@ -25,10 +25,6 @@ # include # include "internal/nelem.h" -#ifdef __cplusplus -extern "C" { -#endif - #ifdef NDEBUG # define ossl_assert(x) ((x) != 0) #else @@ -96,8 +92,4 @@ void *openssl_fopen(const char *filename, const char *mode); uint32_t OPENSSL_rdtsc(void); -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/internal/dso.h b/include/internal/dso.h index 402a76f6dfc50dd558c98241c6440d886580acca..3e67d5053a1510a11cecf053749e5775dbcd69fb 100644 --- a/include/internal/dso.h +++ b/include/internal/dso.h @@ -13,10 +13,6 @@ # include # include "internal/dsoerr.h" -#ifdef __cplusplus -extern "C" { -#endif - /* These values are used as commands to DSO_ctrl() */ # define DSO_CTRL_GET_FLAGS 1 # define DSO_CTRL_SET_FLAGS 2 @@ -166,7 +162,4 @@ void *DSO_global_lookup(const char *name); int ERR_load_DSO_strings(void); -# ifdef __cplusplus -} -# endif #endif diff --git a/include/internal/dsoerr.h b/include/internal/dsoerr.h index a54a18545e3c75bf5bc16bc144dcbe51a1734eb7..ac6bdcd038b376c1f5553ca2220313bb1c283d08 100644 --- a/include/internal/dsoerr.h +++ b/include/internal/dsoerr.h @@ -15,9 +15,6 @@ # ifndef OPENSSL_NO_DSO -# ifdef __cplusplus -extern "C" -# endif int ERR_load_DSO_strings(void); /* diff --git a/include/internal/o_dir.h b/include/internal/o_dir.h index f18fc6708efe3d30356b88311999805a4b77b41f..f8926877d8387fd90343af9c2924e2d7317b8641 100644 --- a/include/internal/o_dir.h +++ b/include/internal/o_dir.h @@ -39,10 +39,6 @@ #ifndef O_DIR_H # define O_DIR_H -#ifdef __cplusplus -extern "C" { -#endif - typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX; /* @@ -53,8 +49,4 @@ const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory); /* returns 1 on success, 0 on error */ int OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx); -#ifdef __cplusplus -} -#endif - #endif /* LPDIR_H */ diff --git a/ssl/packet_locl.h b/ssl/packet_locl.h index 8e553e62b5ac29e731cb65da6d4e83c29fb20670..fd32a640112aa39a56946b931967b8010c3ee8a7 100644 --- a/ssl/packet_locl.h +++ b/ssl/packet_locl.h @@ -18,10 +18,6 @@ # include "internal/numbers.h" -# ifdef __cplusplus -extern "C" { -# endif - typedef struct { /* Pointer to where we are currently reading from */ const unsigned char *curr; @@ -875,8 +871,4 @@ unsigned char *WPACKET_get_curr(WPACKET *pkt); /* Release resources in a WPACKET if a failure has occurred. */ void WPACKET_cleanup(WPACKET *pkt); -# ifdef __cplusplus -} -# endif - #endif /* HEADER_PACKET_LOCL_H */