cleanup conditional header inclusion

This commit is contained in:
Chris Conlon
2015-02-19 14:02:23 -07:00
parent 17ed9e147f
commit 42b58bd05b
5 changed files with 68 additions and 25 deletions

View File

@ -26,20 +26,44 @@
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/ssl.h>
#include <wolfssl/crl.h>
#ifdef HAVE_CRL
#include <wolfssl/crl.h>
#endif
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/des3.h>
#include <wolfssl/wolfcrypt/hc128.h>
#include <wolfssl/wolfcrypt/rabbit.h>
#include <wolfssl/wolfcrypt/chacha.h>
#include <wolfssl/wolfcrypt/asn.h>
#include <wolfssl/wolfcrypt/md5.h>
#include <wolfssl/wolfcrypt/sha.h>
#include <wolfssl/wolfcrypt/aes.h>
#include <wolfssl/wolfcrypt/poly1305.h>
#include <wolfssl/wolfcrypt/camellia.h>
#ifndef NO_DES3
#include <wolfssl/wolfcrypt/des3.h>
#endif
#ifndef NO_HC128
#include <wolfssl/wolfcrypt/hc128.h>
#endif
#ifndef NO_RABBIT
#include <wolfssl/wolfcrypt/rabbit.h>
#endif
#ifdef HAVE_CHACHA
#include <wolfssl/wolfcrypt/chacha.h>
#endif
#ifndef NO_ASN
#include <wolfssl/wolfcrypt/asn.h>
#endif
#ifndef NO_MD5
#include <wolfssl/wolfcrypt/md5.h>
#endif
#ifndef NO_SHA
#include <wolfssl/wolfcrypt/sha.h>
#endif
#ifndef NO_AES
#include <wolfssl/wolfcrypt/aes.h>
#endif
#ifdef HAVE_POLY1305
#include <wolfssl/wolfcrypt/poly1305.h>
#endif
#ifdef HAVE_CAMELLIA
#include <wolfssl/wolfcrypt/camellia.h>
#endif
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/hmac.h>
#ifndef NO_HMAC
#include <wolfssl/wolfcrypt/hmac.h>
#endif
#ifndef NO_RC4
#include <wolfssl/wolfcrypt/arc4.h>
#endif
@ -69,7 +93,7 @@
#include <signal.h>
#endif
#ifdef USE_WINDOWS_API
#ifdef USE_WINDOWS_API
#ifdef WOLFSSL_GAME_BUILD
#include "system/xtl.h"
#else
@ -144,7 +168,7 @@
#endif
#ifdef USE_WINDOWS_API
#ifdef USE_WINDOWS_API
typedef unsigned int SOCKET_T;
#else
typedef int SOCKET_T;

View File

@ -25,17 +25,27 @@
#define WOLF_CRYPT_ASN_H
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/rsa.h>
#ifndef NO_RSA
#include <wolfssl/wolfcrypt/rsa.h>
#endif
/* fips declare of RsaPrivateKeyDecode @wc_fips */
#ifdef HAVE_FIPS
#if defined(HAVE_FIPS) && !defined(NO_RSA)
#include <cyassl/ctaocrypt/rsa.h>
#endif
#include <wolfssl/wolfcrypt/dh.h>
#include <wolfssl/wolfcrypt/dsa.h>
#include <wolfssl/wolfcrypt/sha.h>
#include <wolfssl/wolfcrypt/md5.h>
#ifndef NO_DH
#include <wolfssl/wolfcrypt/dh.h>
#endif
#ifndef NO_DSA
#include <wolfssl/wolfcrypt/dsa.h>
#endif
#ifndef NO_SHA
#include <wolfssl/wolfcrypt/sha.h>
#endif
#ifndef NO_MD5
#include <wolfssl/wolfcrypt/md5.h>
#endif
#include <wolfssl/wolfcrypt/asn_public.h> /* public interface */
#ifdef HAVE_ECC
#include <wolfssl/wolfcrypt/ecc.h>

View File

@ -24,8 +24,10 @@
#define WOLF_CRYPT_ASN_PUBLIC_H
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/ecc.h>
#ifdef WOLFSSL_CERT_GEN
#ifdef HAVE_ECC
#include <wolfssl/wolfcrypt/ecc.h>
#endif
#if defined(WOLFSSL_CERT_GEN) && !defined(NO_RSA)
#include <wolfssl/wolfcrypt/rsa.h>
#endif

View File

@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef HAVE_CHACHA
#ifndef WOLF_CRYPT_CHACHA_H
#define WOLF_CRYPT_CHACHA_H
@ -51,5 +53,6 @@ WOLFSSL_API int wc_Chacha_SetKey(ChaCha* ctx, const byte* key, word32 keySz);
} /* extern "C" */
#endif
#endif
#endif /* WOLF_CRYPT_CHACHA_H */
#endif /* HAVE_CHACHA */

View File

@ -26,10 +26,14 @@
#define WOLF_CRYPT_PKCS7_H
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/asn.h>
#ifndef NO_ASN
#include <wolfssl/wolfcrypt/asn.h>
#endif
#include <wolfssl/wolfcrypt/asn_public.h>
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/des3.h>
#ifndef NO_DES3
#include <wolfssl/wolfcrypt/des3.h>
#endif
#ifdef __cplusplus
extern "C" {