From b549c813377f15b70a61af05d31e32d8c39cdacc Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 7 Mar 2016 14:49:24 -0800 Subject: [PATCH] Fix the WOLFSSL_SEP (--enable-sep) build scenario where extCertPoliciesNb is not available. --- wolfcrypt/src/asn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 879a8adb1..d63806f5b 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -4665,7 +4665,11 @@ static int DecodePolicyOID(char *out, word32 outSz, byte *in, word32 inSz) #endif } idx += policy_length; - } while((int)idx < total_length && cert->extCertPoliciesNb < MAX_CERTPOL_NB); + } while((int)idx < total_length + #if defined(WOLFSSL_CERT_EXT) + && cert->extCertPoliciesNb < MAX_CERTPOL_NB + #endif + ); WOLFSSL_LEAVE("DecodeCertPolicy", 0); return 0;