diff --git a/configure.ac b/configure.ac index ebd4f8800..113f76985 100644 --- a/configure.ac +++ b/configure.ac @@ -8717,6 +8717,22 @@ esac rm cyassl/options.h.bak +if test "$ENABLED_OPENSSLEXTRA" = "yes" +then + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -I$srcdir" + for header in wolfssl/openssl/*.h + do + AC_CHECK_HEADER([$header], [], [ + AC_MSG_ERROR([Error including $header. Possible circular dependency introduced or missing include.]) + ], [ + #include + extern int dummy_int_to_make_compiler_happy; + ]) + done + CFLAGS=$SAVE_CFLAGS +fi + if test "$silent" != "yes"; then # output config summary diff --git a/wolfssl/openssl/aes.h b/wolfssl/openssl/aes.h index 63bc28728..caecd8be5 100644 --- a/wolfssl/openssl/aes.h +++ b/wolfssl/openssl/aes.h @@ -32,6 +32,7 @@ #include #ifndef NO_AES +#include #include /* for size_t */ #ifdef __cplusplus diff --git a/wolfssl/openssl/cmac.h b/wolfssl/openssl/cmac.h index c3e1c984c..5ae013c12 100644 --- a/wolfssl/openssl/cmac.h +++ b/wolfssl/openssl/cmac.h @@ -23,6 +23,7 @@ #define WOLFSSL_CMAC_H_ #include +#include #ifdef __cplusplus extern "C" { diff --git a/wolfssl/openssl/compat_types.h b/wolfssl/openssl/compat_types.h index b1861b40f..c1afd62e1 100644 --- a/wolfssl/openssl/compat_types.h +++ b/wolfssl/openssl/compat_types.h @@ -63,4 +63,6 @@ typedef WOLFSSL_ENGINE ENGINE; typedef WOLFSSL_EVP_PKEY_CTX EVP_PKEY_CTX; #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */ +typedef unsigned long (*wolf_sk_hash_cb) (const void *v); + #endif /* !WOLFSSL_OPENSSL_COMPAT_TYPES_H_ */ diff --git a/wolfssl/openssl/crypto.h b/wolfssl/openssl/crypto.h index 52576d096..7a4e1d8a9 100644 --- a/wolfssl/openssl/crypto.h +++ b/wolfssl/openssl/crypto.h @@ -24,7 +24,6 @@ #ifndef WOLFSSL_CRYPTO_H_ #define WOLFSSL_CRYPTO_H_ -#include #include typedef struct WOLFSSL_INIT_SETTINGS { diff --git a/wolfssl/openssl/ec25519.h b/wolfssl/openssl/ec25519.h index c6fa5e8e3..609031106 100644 --- a/wolfssl/openssl/ec25519.h +++ b/wolfssl/openssl/ec25519.h @@ -24,6 +24,8 @@ #ifndef WOLFSSL_EC25519_H_ #define WOLFSSL_EC25519_H_ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/openssl/ec448.h b/wolfssl/openssl/ec448.h index 4fe1b4344..06ce1ddfc 100644 --- a/wolfssl/openssl/ec448.h +++ b/wolfssl/openssl/ec448.h @@ -24,6 +24,8 @@ #ifndef WOLFSSL_EC448_H_ #define WOLFSSL_EC448_H_ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/openssl/ed25519.h b/wolfssl/openssl/ed25519.h index 2921b3450..a4f2a3ac4 100644 --- a/wolfssl/openssl/ed25519.h +++ b/wolfssl/openssl/ed25519.h @@ -24,6 +24,8 @@ #ifndef WOLFSSL_ED25519_H_ #define WOLFSSL_ED25519_H_ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/openssl/ed448.h b/wolfssl/openssl/ed448.h index de3ecfdea..2d2b4b74e 100644 --- a/wolfssl/openssl/ed448.h +++ b/wolfssl/openssl/ed448.h @@ -24,6 +24,8 @@ #ifndef WOLFSSL_ED448_H_ #define WOLFSSL_ED448_H_ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/openssl/hmac.h b/wolfssl/openssl/hmac.h index 441b41d5e..427a3d652 100644 --- a/wolfssl/openssl/hmac.h +++ b/wolfssl/openssl/hmac.h @@ -56,7 +56,7 @@ WOLFSSL_LOCAL int wolfSSL_HmacCopy(Hmac* des, Hmac* src); WOLFSSL_API int wolfSSL_HMAC_Init(WOLFSSL_HMAC_CTX* ctx, const void* key, int keylen, const WOLFSSL_EVP_MD* type); WOLFSSL_API int wolfSSL_HMAC_Init_ex(WOLFSSL_HMAC_CTX* ctx, const void* key, - int keylen, const EVP_MD* type, WOLFSSL_ENGINE* e); + int keylen, const WOLFSSL_EVP_MD* type, WOLFSSL_ENGINE* e); WOLFSSL_API int wolfSSL_HMAC_Update(WOLFSSL_HMAC_CTX* ctx, const unsigned char* data, int len); WOLFSSL_API int wolfSSL_HMAC_Final(WOLFSSL_HMAC_CTX* ctx, unsigned char* hash, diff --git a/wolfssl/openssl/stack.h b/wolfssl/openssl/stack.h index 572b71688..cee7cfc92 100644 --- a/wolfssl/openssl/stack.h +++ b/wolfssl/openssl/stack.h @@ -24,6 +24,9 @@ #ifndef WOLFSSL_STACK_H_ #define WOLFSSL_STACK_H_ +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/openssl/x509_vfy.h b/wolfssl/openssl/x509_vfy.h index bb56eae97..025f52678 100644 --- a/wolfssl/openssl/x509_vfy.h +++ b/wolfssl/openssl/x509_vfy.h @@ -24,6 +24,7 @@ #ifndef WOLFSSL_x509_vfy_H_ #define WOLFSSL_x509_vfy_H_ +#include #include #ifdef __cplusplus diff --git a/wolfssl/openssl/x509v3.h b/wolfssl/openssl/x509v3.h index 395c89b17..09550edd5 100644 --- a/wolfssl/openssl/x509v3.h +++ b/wolfssl/openssl/x509v3.h @@ -24,13 +24,17 @@ #ifndef WOLFSSL_x509v3_H #define WOLFSSL_x509v3_H +#include #include #include +#include #ifdef __cplusplus extern "C" { #endif +#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) + #define EXFLAG_KUSAGE 0x2 #define EXFLAG_XKUSAGE 0x4 @@ -161,6 +165,8 @@ WOLFSSL_API WOLFSSL_ASN1_STRING* wolfSSL_a2i_IPADDRESS(const char* ipa); #define X509V3_set_ctx_nodb wolfSSL_X509V3_set_ctx_nodb #define X509v3_get_ext_count wolfSSL_sk_num +#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */ + #ifdef __cplusplus } #endif diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index ffb445eb3..18c7c3a5f 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -4591,7 +4591,6 @@ WOLFSSL_API void wolfSSL_sk_X509_INFO_pop_free(WOLF_STACK_OF(WOLFSSL_X509_INFO)* void (*f) (WOLFSSL_X509_INFO*)); WOLFSSL_API void wolfSSL_sk_X509_INFO_free(WOLF_STACK_OF(WOLFSSL_X509_INFO)*); -typedef unsigned long (*wolf_sk_hash_cb) (const void *v); WOLFSSL_API WOLF_STACK_OF(WOLFSSL_X509_NAME)* wolfSSL_sk_X509_NAME_new( WOLF_SK_COMPARE_CB(WOLFSSL_X509_NAME, cb)); WOLFSSL_API int wolfSSL_sk_X509_NAME_push(WOLF_STACK_OF(WOLFSSL_X509_NAME)*,