From a8115d51fa12c65dfb11b0695382a4d84a2a1b03 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Tue, 18 Apr 2017 16:53:02 -0600 Subject: [PATCH] add back in haveTrustPeer variable and put macro guard on WC_RNG typedef --- src/internal.c | 4 ++++ wolfssl/wolfcrypt/asn_public.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index eec3a3db6..0aeb4f962 100755 --- a/src/internal.c +++ b/src/internal.c @@ -6763,6 +6763,10 @@ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx, DoCertArgs args[1]; #endif +#ifdef WOLFSSL_TRUST_PEER_CERT + byte haveTrustPeer = 0; /* was cert verified by loaded trusted peer cert */ +#endif + WOLFSSL_ENTER("DoCertificate"); #ifdef WOLFSSL_ASYNC_CRYPT diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index f70a4bca7..38496f369 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -33,7 +33,10 @@ /* Opaque keys. Only key pointers are used for arguments */ typedef struct ecc_key ecc_key; typedef struct RsaKey RsaKey; -typedef struct WC_RNG WC_RNG; +#ifndef WC_RNG_TYPE_DEFINED /* guard on redeclaration */ + typedef struct WC_RNG WC_RNG; + #define WC_RNG_TYPE_DEFINED +#endif /* Certificate file Type */ enum CertType {