In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
authorRichard Levitte <levitte@openssl.org>
Tue, 2 May 2000 12:16:01 +0000 (12:16 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 2 May 2000 12:16:01 +0000 (12:16 +0000)
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the
OpenSSL header files have #include's and extern "C"'s in an incorrect
order.  Thusly fixed.

32 files changed:
crypto/asn1/asn1.h
crypto/asn1/asn1_mac.h
crypto/bio/bio.h
crypto/comp/comp.h
crypto/conf/conf.h
crypto/conf/conf_api.h
crypto/des/des.h
crypto/dh/dh.h
crypto/dsa/dsa.h
crypto/err/err.h
crypto/evp/evp.h
crypto/hmac/hmac.h
crypto/idea/idea.h
crypto/lhash/lhash.h
crypto/md2/md2.h
crypto/mdc2/mdc2.h
crypto/objects/objects.h
crypto/pem/pem.h
crypto/pem/pem2.h
crypto/pkcs12/pkcs12.h
crypto/pkcs7/pkcs7.h
crypto/rand/rand.h
crypto/rc2/rc2.h
crypto/rc4/rc4.h
crypto/rsa/rsa.h
crypto/txt_db/txt_db.h
crypto/x509/x509.h
crypto/x509/x509_vfy.h
crypto/x509v3/x509v3.h
e_os2.h
rsaref/rsaref.h
ssl/ssl.h

index 99bd64a11e3dad557a1d498ee93aa39eb371edcd..8cf317640e0d5ab5566f1cb8ce25ad2093431a2f 100644 (file)
 #ifndef HEADER_ASN1_H
 #define HEADER_ASN1_H
 
 #ifndef HEADER_ASN1_H
 #define HEADER_ASN1_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <time.h>
 #include <openssl/bn.h>
 #include <openssl/stack.h>
 #include <time.h>
 #include <openssl/bn.h>
 #include <openssl/stack.h>
@@ -72,6 +68,10 @@ extern "C" {
 #include <openssl/vms_idhacks.h>
 #endif
 
 #include <openssl/vms_idhacks.h>
 #endif
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #define V_ASN1_UNIVERSAL               0x00
 #define        V_ASN1_APPLICATION              0x40
 #define V_ASN1_CONTEXT_SPECIFIC                0x80
 #define V_ASN1_UNIVERSAL               0x00
 #define        V_ASN1_APPLICATION              0x40
 #define V_ASN1_CONTEXT_SPECIFIC                0x80
index 4f2a82d340e0aa1ae382787f5300965d60292c40..653f5fe1c948ef599fc7c8d4702699855672b6e9 100644 (file)
 #ifndef HEADER_ASN1_MAC_H
 #define HEADER_ASN1_MAC_H
 
 #ifndef HEADER_ASN1_MAC_H
 #define HEADER_ASN1_MAC_H
 
+#include <openssl/asn1.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/asn1.h>
-
 #ifndef ASN1_MAC_ERR_LIB
 #define ASN1_MAC_ERR_LIB       ERR_LIB_ASN1
 #endif 
 #ifndef ASN1_MAC_ERR_LIB
 #define ASN1_MAC_ERR_LIB       ERR_LIB_ASN1
 #endif 
index dd3cc3f470182e224e53e931f4691f11c49b8e04..37750726958e57466f9780f76c51db2a7e8be82e 100644 (file)
 #ifndef HEADER_BIO_H
 #define HEADER_BIO_H
 
 #ifndef HEADER_BIO_H
 #define HEADER_BIO_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <openssl/crypto.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <openssl/crypto.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 /* These are the 'types' of BIOs */
 #define BIO_TYPE_NONE          0
 #define BIO_TYPE_MEM           (1|0x0400)
 /* These are the 'types' of BIOs */
 #define BIO_TYPE_NONE          0
 #define BIO_TYPE_MEM           (1|0x0400)
index 811cb5833d3b518198c9df1339c15d78e6d55d5d..0922609542da5b89903943007787621eea50504f 100644 (file)
@@ -2,12 +2,12 @@
 #ifndef HEADER_COMP_H
 #define HEADER_COMP_H
 
 #ifndef HEADER_COMP_H
 #define HEADER_COMP_H
 
+#include <openssl/crypto.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/crypto.h>
-
 typedef struct comp_method_st
        {
        int type;               /* NID for compression library */
 typedef struct comp_method_st
        {
        int type;               /* NID for compression library */
index 0ec58e1200c678d59e061b7c566777f243d3eeea..56b5f5c216f8081e445ea0f49e8c129fa25d9831 100644 (file)
 #ifndef  HEADER_CONF_H
 #define HEADER_CONF_H
 
 #ifndef  HEADER_CONF_H
 #define HEADER_CONF_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/bio.h>
 #include <openssl/lhash.h>
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/e_os.h>
 
 #include <openssl/bio.h>
 #include <openssl/lhash.h>
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/e_os.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct
        {
        char *section;
 typedef struct
        {
        char *section;
index 05be7d8fb7a5c80bc77e872a071f08302e3e7650..a5cc17b233a2379abe8138a674d07f05e2a685c8 100644 (file)
 #ifndef  HEADER_CONF_API_H
 #define HEADER_CONF_API_H
 
 #ifndef  HEADER_CONF_API_H
 #define HEADER_CONF_API_H
 
+#include <openssl/lhash.h>
+#include <openssl/conf.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/lhash.h>
-#include <openssl/conf.h>
-
 /* Up until OpenSSL 0.9.5a, this was new_section */
 CONF_VALUE *_CONF_new_section(CONF *conf, char *section);
 /* Up until OpenSSL 0.9.5a, this was get_section */
 /* Up until OpenSSL 0.9.5a, this was new_section */
 CONF_VALUE *_CONF_new_section(CONF *conf, char *section);
 /* Up until OpenSSL 0.9.5a, this was get_section */
index ead67986d9ea9d49291f5162b49beb647d02d2a3..cf536e642895ca6bec0f320cebea51b94788cf59 100644 (file)
 #ifndef HEADER_DES_H
 #define HEADER_DES_H
 
 #ifndef HEADER_DES_H
 #define HEADER_DES_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_DES
 #error DES is disabled.
 #endif
 #ifdef NO_DES
 #error DES is disabled.
 #endif
@@ -75,6 +71,10 @@ extern "C" {
 #include <openssl/opensslconf.h> /* DES_LONG */
 #include <openssl/e_os2.h>     /* OPENSSL_EXTERN */
 
 #include <openssl/opensslconf.h> /* DES_LONG */
 #include <openssl/e_os2.h>     /* OPENSSL_EXTERN */
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef unsigned char des_cblock[8];
 typedef /* const */ unsigned char const_des_cblock[8];
 /* With "const", gcc 2.8.1 on Solaris thinks that des_cblock *
 typedef unsigned char des_cblock[8];
 typedef /* const */ unsigned char const_des_cblock[8];
 /* With "const", gcc 2.8.1 on Solaris thinks that des_cblock *
index c15b2ad48364ea6f385914978ab29b0336aab9f7..19bd570309eda8a602dde36fcb9bdc32d2586773 100644 (file)
 #ifndef HEADER_DH_H
 #define HEADER_DH_H
 
 #ifndef HEADER_DH_H
 #define HEADER_DH_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_DH
 #error DH is disabled.
 #endif
 #ifdef NO_DH
 #error DH is disabled.
 #endif
@@ -72,6 +68,10 @@ extern "C" {
        
 #define DH_FLAG_CACHE_MONT_P   0x01
 
        
 #define DH_FLAG_CACHE_MONT_P   0x01
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct dh_st DH;
 
 typedef struct dh_method {
 typedef struct dh_st DH;
 
 typedef struct dh_method {
index 68d9912cbc513c299bc4f92c8b051aa66d3928ad..ca301c533632a949a00fcdb9b85d6c3ba9c8e32d 100644 (file)
 #ifndef HEADER_DSA_H
 #define HEADER_DSA_H
 
 #ifndef HEADER_DSA_H
 #define HEADER_DSA_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_DSA
 #error DSA is disabled.
 #endif
 #ifdef NO_DSA
 #error DSA is disabled.
 #endif
@@ -81,6 +77,10 @@ extern "C" {
 
 #define DSA_FLAG_CACHE_MONT_P  0x01
 
 
 #define DSA_FLAG_CACHE_MONT_P  0x01
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct dsa_st DSA;
 
 typedef struct DSA_SIG_st
 typedef struct dsa_st DSA;
 
 typedef struct DSA_SIG_st
index eb62af2af8e87c76f0239e0b4a05fb161cb7d63d..76a8ed1b38433d121f5290c3287573082d815c11 100644 (file)
 #ifndef HEADER_ERR_H
 #define HEADER_ERR_H
 
 #ifndef HEADER_ERR_H
 #define HEADER_ERR_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef NO_FP_API
 #include <stdio.h>
 #endif
 
 #ifndef NO_FP_API
 #include <stdio.h>
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* The following is a bit of a trick to help the object files only contain
  * the 'name of the file' string once.  Since 'err.h' is protected by the
  * HEADER_ERR_H stuff, this should be included only once per file. */
 /* The following is a bit of a trick to help the object files only contain
  * the 'name of the file' string once.  Since 'err.h' is protected by the
  * HEADER_ERR_H stuff, this should be included only once per file. */
index 54215b09056c3653285527430bd52934e699e9ef..6c0275b9e28abb46df60eab9716fa140ee064e80 100644 (file)
 #ifndef HEADER_ENVELOPE_H
 #define HEADER_ENVELOPE_H
 
 #ifndef HEADER_ENVELOPE_H
 #define HEADER_ENVELOPE_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef NO_MD2
 #include <openssl/md2.h>
 #endif
 #ifndef NO_MD2
 #include <openssl/md2.h>
 #endif
@@ -147,6 +143,10 @@ extern "C" {
 #define EVP_PKEY_DSA4  NID_dsaWithSHA1_2
 #define EVP_PKEY_DH    NID_dhKeyAgreement
 
 #define EVP_PKEY_DSA4  NID_dsaWithSHA1_2
 #define EVP_PKEY_DH    NID_dhKeyAgreement
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Type needs to be a bit field
  * Sub-type needs to be for variations on the method, as in, can it do
  * arbitrary encryption.... */
 /* Type needs to be a bit field
  * Sub-type needs to be for variations on the method, as in, can it do
  * arbitrary encryption.... */
index 223eeda7f3f2024210dcff496cb23d55310c6ceb..328bad260879778216dc066cce571b37bc903077 100644 (file)
 #ifndef HEADER_HMAC_H
 #define HEADER_HMAC_H
 
 #ifndef HEADER_HMAC_H
 #define HEADER_HMAC_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_HMAC
 #error HMAC is disabled.
 #endif
 #ifdef NO_HMAC
 #error HMAC is disabled.
 #endif
@@ -70,6 +66,10 @@ extern "C" {
 
 #define HMAC_MAX_MD_CBLOCK     64
 
 
 #define HMAC_MAX_MD_CBLOCK     64
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct hmac_ctx_st
        {
        const EVP_MD *md;
 typedef struct hmac_ctx_st
        {
        const EVP_MD *md;
index ae32f5692e53c1cd889ea7b9f651950de08c3e57..f5efeae366d9ff154217f60feafc0259ee1ded4c 100644 (file)
 #ifndef HEADER_IDEA_H
 #define HEADER_IDEA_H
 
 #ifndef HEADER_IDEA_H
 #define HEADER_IDEA_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_IDEA
 #error IDEA is disabled.
 #endif
 #ifdef NO_IDEA
 #error IDEA is disabled.
 #endif
@@ -74,6 +70,10 @@ extern "C" {
 #define IDEA_BLOCK     8
 #define IDEA_KEY_LENGTH        16
 
 #define IDEA_BLOCK     8
 #define IDEA_KEY_LENGTH        16
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct idea_key_st
        {
        IDEA_INT data[9][6];
 typedef struct idea_key_st
        {
        IDEA_INT data[9][6];
index d315fd9c6d7c482017c5870d749d99d40a645917..868d5352605fa0e3749f3e01ae378c9dfafd8a28 100644 (file)
 #ifndef HEADER_LHASH_H
 #define HEADER_LHASH_H
 
 #ifndef HEADER_LHASH_H
 #define HEADER_LHASH_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifndef NO_FP_API
 #include <stdio.h>
 #endif
 
 #ifndef NO_FP_API
 #include <stdio.h>
 #endif
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct lhash_node_st
        {
        void *data;
 typedef struct lhash_node_st
        {
        void *data;
index 582bffb8593300fbbcca2478e7eb4350f635eb56..a00bd162b3c3036447cedc79b46db988c35058ca 100644 (file)
 #ifndef HEADER_MD2_H
 #define HEADER_MD2_H
 
 #ifndef HEADER_MD2_H
 #define HEADER_MD2_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_MD2
 #error MD2 is disabled.
 #endif
 #ifdef NO_MD2
 #error MD2 is disabled.
 #endif
@@ -71,6 +67,10 @@ extern "C" {
 #define MD2_BLOCK              16
 #include <openssl/opensslconf.h> /* MD2_INT */
 
 #define MD2_BLOCK              16
 #include <openssl/opensslconf.h> /* MD2_INT */
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct MD2state_st
        {
        int num;
 typedef struct MD2state_st
        {
        int num;
index 00acd707cd10e68e0c8d8d3c78038e4d731f8017..5da8da72f5411f5c94a5a3c162c38892e7c133e0 100644 (file)
 #ifndef HEADER_MDC2_H
 #define HEADER_MDC2_H
 
 #ifndef HEADER_MDC2_H
 #define HEADER_MDC2_H
 
+#include <openssl/des.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/des.h>
-
 #ifdef NO_MDC2
 #error MDC2 is disabled.
 #endif
 #ifdef NO_MDC2
 #error MDC2 is disabled.
 #endif
index 95c8a21568e4dceded7d3796eb4e849c0d39e0d5..2f11517a9a4a41c07b925217d4bdf8e57896018c 100644 (file)
 #ifndef HEADER_OBJECTS_H
 #define HEADER_OBJECTS_H
 
 #ifndef HEADER_OBJECTS_H
 #define HEADER_OBJECTS_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #define SN_undef                       "UNDEF"
 #define LN_undef                       "undefined"
 #define NID_undef                      0
 #define SN_undef                       "UNDEF"
 #define LN_undef                       "undefined"
 #define NID_undef                      0
@@ -967,6 +963,10 @@ extern "C" {
 #define        OBJ_NAME_ALIAS          0x8000
 
 
 #define        OBJ_NAME_ALIAS          0x8000
 
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct obj_name_st
        {
        int type;
 typedef struct obj_name_st
        {
        int type;
index e4bae0b4aac7c2c68d0dccc18c43e8dfa63f1f07..38b98015c4cecef9396a3425b69fd9dbeb52249e 100644 (file)
 #ifndef HEADER_PEM_H
 #define HEADER_PEM_H
 
 #ifndef HEADER_PEM_H
 #define HEADER_PEM_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem2.h>
 
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem2.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #define PEM_BUFSIZE            1024
 
 #define PEM_OBJ_UNDEF          0
 #define PEM_BUFSIZE            1024
 
 #define PEM_OBJ_UNDEF          0
index 4a016aacd2a32dfee66cff57a8a09040db6ad149..4e484bcd82a5b695699878cbeedeea6421a27914 100644 (file)
  * Ben 30 Jan 1999.
  */
 
  * Ben 30 Jan 1999.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void ERR_load_PEM_strings(void);
 void ERR_load_PEM_strings(void);
+
+#ifdef __cplusplus
+}
+#endif
index dad356c00f6a4b87ae399fc6541efe813945c1af..c5bafc4fea25802c12592471876c0bf714636e6e 100644 (file)
 #ifndef HEADER_PKCS12_H
 #define HEADER_PKCS12_H
 
 #ifndef HEADER_PKCS12_H
 #define HEADER_PKCS12_H
 
+#include <openssl/bio.h>
+#include <openssl/x509.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/bio.h>
-#include <openssl/x509.h>
-
 #define PKCS12_KEY_ID  1
 #define PKCS12_IV_ID   2
 #define PKCS12_MAC_ID  3
 #define PKCS12_KEY_ID  1
 #define PKCS12_IV_ID   2
 #define PKCS12_MAC_ID  3
index 3ec725d226323cf8ce852ed0ecc37b7e7b68f552..fd2877de8423983f94ec9a9743c556ec6500cec1 100644 (file)
 #ifndef HEADER_PKCS7_H
 #define HEADER_PKCS7_H
 
 #ifndef HEADER_PKCS7_H
 #define HEADER_PKCS7_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/bio.h>
 #include <openssl/x509.h>
 
 #include <openssl/bio.h>
 #include <openssl/x509.h>
 
@@ -70,6 +66,10 @@ extern "C" {
 #include <openssl/vms_idhacks.h>
 #endif
 
 #include <openssl/vms_idhacks.h>
 #endif
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #ifdef WIN32
 /* Under Win32 thes are defined in wincrypt.h */
 #undef PKCS7_ISSUER_AND_SERIAL
 #ifdef WIN32
 /* Under Win32 thes are defined in wincrypt.h */
 #undef PKCS7_ISSUER_AND_SERIAL
index 2973ee90e44100742501a3af401863b0e9c1329b..b4b12c2d744790a853b1522a96232ae4f90912ff 100644 (file)
@@ -90,12 +90,26 @@ int  RAND_write_file(const char *file);
 const char *RAND_file_name(char *file,int num);
 int RAND_status(void);
 int RAND_egd(const char *path);
 const char *RAND_file_name(char *file,int num);
 int RAND_status(void);
 int RAND_egd(const char *path);
+void ERR_load_RAND_strings(void);
+
+#ifdef  __cplusplus
+}
+#endif
+
 #if defined(WINDOWS) || defined(WIN32)
 #include <windows.h>
 #if defined(WINDOWS) || defined(WIN32)
 #include <windows.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 void RAND_screen(void);
 int RAND_event(UINT, WPARAM, LPARAM);
 void RAND_screen(void);
 int RAND_event(UINT, WPARAM, LPARAM);
+
+#ifdef  __cplusplus
+}
+#endif
 #endif
 #endif
-void   ERR_load_RAND_strings(void);
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
@@ -110,8 +124,5 @@ void        ERR_load_RAND_strings(void);
 /* Reason codes. */
 #define RAND_R_PRNG_NOT_SEEDED                          100
 
 /* Reason codes. */
 #define RAND_R_PRNG_NOT_SEEDED                          100
 
-#ifdef  __cplusplus
-}
-#endif
 #endif
 
 #endif
 
index 9571efb7559e3e42fe2fc1a1eb8525c02049bef8..099bc31b66b99611bcc2860a687ba43b6f16da46 100644 (file)
 #ifndef HEADER_RC2_H
 #define HEADER_RC2_H
 
 #ifndef HEADER_RC2_H
 #define HEADER_RC2_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_RC2
 #error RC2 is disabled.
 #endif
 #ifdef NO_RC2
 #error RC2 is disabled.
 #endif
@@ -74,6 +70,10 @@ extern "C" {
 #define RC2_BLOCK      8
 #define RC2_KEY_LENGTH 16
 
 #define RC2_BLOCK      8
 #define RC2_KEY_LENGTH 16
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct rc2_key_st
        {
        RC2_INT data[64];
 typedef struct rc2_key_st
        {
        RC2_INT data[64];
index 8556dddab0ecebd90ede06fa64e8e8f66ed455e9..40251024a42157a51aed228ea380353b50daa7db 100644 (file)
 #ifndef HEADER_RC4_H
 #define HEADER_RC4_H
 
 #ifndef HEADER_RC4_H
 #define HEADER_RC4_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef NO_RC4
 #error RC4 is disabled.
 #endif
 
 #include <openssl/opensslconf.h> /* RC4_INT */
 
 #ifdef NO_RC4
 #error RC4 is disabled.
 #endif
 
 #include <openssl/opensslconf.h> /* RC4_INT */
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct rc4_key_st
        {
        RC4_INT x,y;
 typedef struct rc4_key_st
        {
        RC4_INT x,y;
index f9f9b5cfe91f8d912d67dc39c15578368063dc32..74033cf60780b3a30b894eb658bbb6dc406a3c1d 100644 (file)
 #ifndef HEADER_RSA_H
 #define HEADER_RSA_H
 
 #ifndef HEADER_RSA_H
 #define HEADER_RSA_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/bn.h>
 #include <openssl/crypto.h>
 
 #include <openssl/bn.h>
 #include <openssl/crypto.h>
 
@@ -70,6 +66,10 @@ extern "C" {
 #error RSA is disabled.
 #endif
 
 #error RSA is disabled.
 #endif
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct rsa_st RSA;
 
 typedef struct rsa_meth_st
 typedef struct rsa_st RSA;
 
 typedef struct rsa_meth_st
index 58b9de13532c1420d4ec5b1011b96c53bf714362..22a54f06ee896568f998880cd395f2d2f475d8ab 100644 (file)
 #ifndef HEADER_TXT_DB_H
 #define HEADER_TXT_DB_H
 
 #ifndef HEADER_TXT_DB_H
 #define HEADER_TXT_DB_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/stack.h>
 #include <openssl/lhash.h>
 
 #include <openssl/stack.h>
 #include <openssl/lhash.h>
 
@@ -73,6 +69,10 @@ extern "C" {
 #define DB_ERROR_NO_INDEX              4
 #define DB_ERROR_INSERT_INDEX_CLASH            5
 
 #define DB_ERROR_NO_INDEX              4
 #define DB_ERROR_INSERT_INDEX_CLASH            5
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef struct txt_db_st
        {
        int num_fields;
 typedef struct txt_db_st
        {
        int num_fields;
index 0192272e7c1d188996f82187c65df7b50fc438ad..57f9bab0fbcc599dd4e785582c2e60f9101718b8 100644 (file)
 #ifndef HEADER_X509_H
 #define HEADER_X509_H
 
 #ifndef HEADER_X509_H
 #define HEADER_X509_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 #ifdef VMS
 #undef X509_REVOKED_get_ext_by_critical
 #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic
 #ifdef VMS
 #undef X509_REVOKED_get_ext_by_critical
 #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic
@@ -87,6 +83,10 @@ extern "C" {
 #include <openssl/evp.h>
 
 
 #include <openssl/evp.h>
 
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #ifdef WIN32
 /* Under Win32 this is defined in wincrypt.h */
 #undef X509_NAME
 #ifdef WIN32
 /* Under Win32 this is defined in wincrypt.h */
 #undef X509_NAME
@@ -445,9 +445,17 @@ typedef struct pkcs8_priv_key_info_st
         STACK_OF(X509_ATTRIBUTE) *attributes;
         } PKCS8_PRIV_KEY_INFO;
 
         STACK_OF(X509_ATTRIBUTE) *attributes;
         } PKCS8_PRIV_KEY_INFO;
 
+#ifdef  __cplusplus
+}
+#endif
+
 #include <openssl/x509_vfy.h>
 #include <openssl/pkcs7.h>
 
 #include <openssl/x509_vfy.h>
 #include <openssl/pkcs7.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #ifdef SSLEAY_MACROS
 #define X509_verify(a,r) ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg,\
        a->signature,(char *)a->cert_info,r)
 #ifdef SSLEAY_MACROS
 #define X509_verify(a,r) ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg,\
        a->signature,(char *)a->cert_info,r)
index 4637aecedf589020424e7222f71dcbbd036017ec..9173943dcda991ca22a883a4f5ec4cf17a188979 100644 (file)
 #ifndef HEADER_X509_VFY_H
 #define HEADER_X509_VFY_H
 
 #ifndef HEADER_X509_VFY_H
 #define HEADER_X509_VFY_H
 
+#include <openssl/bio.h>
+#include <openssl/crypto.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/bio.h>
-#include <openssl/crypto.h>
-
 /* Outer object */
 typedef struct x509_hash_dir_st
        {
 /* Outer object */
 typedef struct x509_hash_dir_st
        {
index 96ceb7c4fb75929493722a895d62abc2f17e5930..209b203a0c77391021910f43a74bca2465432319 100644 (file)
 #ifndef HEADER_X509V3_H
 #define HEADER_X509V3_H
 
 #ifndef HEADER_X509V3_H
 #define HEADER_X509V3_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/bio.h>
 #include <openssl/x509.h>
 #include <openssl/conf.h>
 
 #include <openssl/bio.h>
 #include <openssl/x509.h>
 #include <openssl/conf.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Forward reference */
 struct v3_ext_method;
 struct v3_ext_ctx;
 /* Forward reference */
 struct v3_ext_method;
 struct v3_ext_ctx;
diff --git a/e_os2.h b/e_os2.h
index bd97b921a8f513674abd0bb3360ea24711dd2c26..5a25ac7cf6e2ab775ec10cbc1ea93b237a5d264c 100644 (file)
--- a/e_os2.h
+++ b/e_os2.h
@@ -3,12 +3,12 @@
 #ifndef HEADER_E_OS2_H
 #define HEADER_E_OS2_H
 
 #ifndef HEADER_E_OS2_H
 #define HEADER_E_OS2_H
 
+#include <openssl/opensslconf.h> /* OPENSSL_UNISTD */
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/opensslconf.h> /* OPENSSL_UNISTD */
-
 #ifdef MSDOS
 # define OPENSSL_UNISTD_IO <io.h>
 # define OPENSSL_DECLARE_EXIT extern void exit(int);
 #ifdef MSDOS
 # define OPENSSL_UNISTD_IO <io.h>
 # define OPENSSL_DECLARE_EXIT extern void exit(int);
index 15f65dd94f8d2b7e1e447ce8709e32f0d7a44d75..498449f40e063b2d22956285c4b830ed90be1df2 100644 (file)
 #ifndef HEADER_RSAREF_H
 #define HEADER_RSAREF_H
 
 #ifndef HEADER_RSAREF_H
 #define HEADER_RSAREF_H
 
+#ifndef NO_RSA
+#include <openssl/rsa.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
  
 #ifdef __cplusplus
 extern "C" {
 #endif
  
-#ifndef NO_RSA
-#include <openssl/rsa.h>
-
 /* RSAeuro */
 /*#define  RSAref_MAX_BITS             2048*/
 
 /* RSAeuro */
 /*#define  RSAref_MAX_BITS             2048*/
 
@@ -133,6 +133,10 @@ int R_RandomFinal(RSARandomState *rnd);
 
 void ERR_load_RSAREF_strings(void );
 RSA_METHOD *RSA_PKCS1_RSAref(void );
 
 void ERR_load_RSAREF_strings(void );
 RSA_METHOD *RSA_PKCS1_RSAref(void );
+
+#ifdef  __cplusplus
+}
+#endif
 #endif
 
 /* BEGIN ERROR CODES */
 #endif
 
 /* BEGIN ERROR CODES */
@@ -173,8 +177,4 @@ RSA_METHOD *RSA_PKCS1_RSAref(void );
 #define RSAREF_R_SIGNATURE                              0x040b
 #define RSAREF_R_SIGNATURE_ENCODING                     0x040c
 
 #define RSAREF_R_SIGNATURE                              0x040b
 #define RSAREF_R_SIGNATURE_ENCODING                     0x040c
 
-#ifdef  __cplusplus
-}
-#endif
 #endif
 #endif
-
index bb846f491c46e2cd1d72ce2a6649cdb7dd89fe40..f7c91b80e08bd2ff1fd292f165416555ec4df534 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
 #ifndef HEADER_SSL_H 
 #define HEADER_SSL_H 
 
 #ifndef HEADER_SSL_H 
 #define HEADER_SSL_H 
 
+#include <openssl/safestack.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/safestack.h>
-
 /* SSLeay version number for ASN.1 encoding of the session information */
 /* Version 0 - initial version
  * Version 1 - added the optional peer certificate
 /* SSLeay version number for ASN.1 encoding of the session information */
 /* Version 0 - initial version
  * Version 1 - added the optional peer certificate
@@ -140,6 +140,10 @@ extern "C" {
 #define SSL_SENT_SHUTDOWN      1
 #define SSL_RECEIVED_SHUTDOWN  2
 
 #define SSL_SENT_SHUTDOWN      1
 #define SSL_RECEIVED_SHUTDOWN  2
 
+#ifdef __cplusplus
+}
+#endif
+
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
 #include <openssl/buffer.h>
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
 #include <openssl/buffer.h>
@@ -147,6 +151,10 @@ extern "C" {
 #include <openssl/pem.h>
 #include <openssl/x509.h>
 
 #include <openssl/pem.h>
 #include <openssl/x509.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2)
 #define NO_SSL2
 #endif
 #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2)
 #define NO_SSL2
 #endif
@@ -655,11 +663,19 @@ struct ssl_st
                                 * SSLv3/TLS rollback check */
        };
 
                                 * SSLv3/TLS rollback check */
        };
 
+#ifdef __cplusplus
+}
+#endif
+
 #include <openssl/ssl2.h>
 #include <openssl/ssl3.h>
 #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
 #include <openssl/ssl23.h>
 
 #include <openssl/ssl2.h>
 #include <openssl/ssl3.h>
 #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
 #include <openssl/ssl23.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 /* compatibility */
 #define SSL_set_app_data(s,arg)                (SSL_set_ex_data(s,0,(char *)arg))
 #define SSL_get_app_data(s)            (SSL_get_ex_data(s,0))
 /* compatibility */
 #define SSL_set_app_data(s,arg)                (SSL_set_ex_data(s,0,(char *)arg))
 #define SSL_get_app_data(s)            (SSL_get_ex_data(s,0))