From 4dad4b69626b4dbbca9a2a3f099e20615d931391 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 24 Apr 2017 10:40:56 -0600 Subject: [PATCH] handle redefinition warnings --- wolfssl/wolfcrypt/asn_public.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index 38496f369..539a6ada0 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -25,14 +25,23 @@ #define WOLF_CRYPT_ASN_PUBLIC_H #include +#ifdef HAVE_ECC + #include +#endif +#if defined(WOLFSSL_CERT_GEN) && !defined(NO_RSA) + #include +#endif #ifdef __cplusplus extern "C" { #endif -/* Opaque keys. Only key pointers are used for arguments */ -typedef struct ecc_key ecc_key; -typedef struct RsaKey RsaKey; +#ifndef HAVE_ECC + typedef struct ecc_key ecc_key; +#endif +#ifdef NO_RSA + typedef struct RsaKey RsaKey; +#endif #ifndef WC_RNG_TYPE_DEFINED /* guard on redeclaration */ typedef struct WC_RNG WC_RNG; #define WC_RNG_TYPE_DEFINED