Merge pull request #5739 from anhu/no_WOLFSSL_DYN_CERT

This commit is contained in:
Hayden Roche
2022-11-03 14:24:34 -07:00
committed by GitHub

View File

@ -20806,7 +20806,8 @@ static int DecodeCertReq(DecodedCert* cert, int* criticalExt)
int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
{
int ret;
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
#if (!defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)) || \
defined(WOLFSSL_DYN_CERT)
char* ptr;
#endif
@ -20814,7 +20815,8 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
if (ret < 0)
return ret;
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
#if (!defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)) || \
defined(WOLFSSL_DYN_CERT)
/* cert->subjectCN not stored as copy of WOLFSSL_NO_MALLOC defind */
if (cert->subjectCNLen > 0) {
ptr = (char*) XMALLOC(cert->subjectCNLen + 1, cert->heap,
@ -20828,7 +20830,8 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
}
#endif
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
#if (!defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)) || \
defined(WOLFSSL_DYN_CERT)
/* cert->publicKey not stored as copy if WOLFSSL_NO_MALLOC defined */
if ((cert->keyOID == RSAk
#ifdef WC_RSA_PSS