forked from wolfSSL/wolfssl
Check for circular dependencies in compatibility headers (#6091)
* Check for circular dependencies in compatibility headers * Run header check only when ENABLED_OPENSSLEXTRA * Add missing include * Pedantic compilers don't like empty translation units * Fix macro guards
This commit is contained in:
committed by
GitHub
parent
3f7109c18b
commit
7baddb04f8
16
configure.ac
16
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 <wolfssl/options.h>
|
||||
extern int dummy_int_to_make_compiler_happy;
|
||||
])
|
||||
done
|
||||
CFLAGS=$SAVE_CFLAGS
|
||||
fi
|
||||
|
||||
if test "$silent" != "yes"; then
|
||||
|
||||
# output config summary
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#ifndef NO_AES
|
||||
#include <wolfssl/wolfcrypt/aes.h>
|
||||
#include <wolfssl/openssl/ssl.h> /* for size_t */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define WOLFSSL_CMAC_H_
|
||||
|
||||
#include <wolfssl/wolfcrypt/cmac.h>
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -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_ */
|
||||
|
@ -24,7 +24,6 @@
|
||||
#ifndef WOLFSSL_CRYPTO_H_
|
||||
#define WOLFSSL_CRYPTO_H_
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
typedef struct WOLFSSL_INIT_SETTINGS {
|
||||
|
@ -24,6 +24,8 @@
|
||||
#ifndef WOLFSSL_EC25519_H_
|
||||
#define WOLFSSL_EC25519_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -24,6 +24,8 @@
|
||||
#ifndef WOLFSSL_EC448_H_
|
||||
#define WOLFSSL_EC448_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -24,6 +24,8 @@
|
||||
#ifndef WOLFSSL_ED25519_H_
|
||||
#define WOLFSSL_ED25519_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -24,6 +24,8 @@
|
||||
#ifndef WOLFSSL_ED448_H_
|
||||
#define WOLFSSL_ED448_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -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,
|
||||
|
@ -24,6 +24,9 @@
|
||||
#ifndef WOLFSSL_STACK_H_
|
||||
#define WOLFSSL_STACK_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
#include <wolfssl/openssl/ssl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -24,6 +24,7 @@
|
||||
#ifndef WOLFSSL_x509_vfy_H_
|
||||
#define WOLFSSL_x509_vfy_H_
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
#include <wolfssl/openssl/x509v3.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -24,13 +24,17 @@
|
||||
#ifndef WOLFSSL_x509v3_H
|
||||
#define WOLFSSL_x509v3_H
|
||||
|
||||
#include <wolfssl/openssl/compat_types.h>
|
||||
#include <wolfssl/openssl/conf.h>
|
||||
#include <wolfssl/openssl/bio.h>
|
||||
#include <wolfssl/openssl/ssl.h>
|
||||
|
||||
#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
|
||||
|
@ -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)*,
|
||||
|
Reference in New Issue
Block a user