mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 05:04:41 +02:00
Prevent WOLFSSL_NO_MALLOC from breaking RSA certificate verfication
This commit is contained in:
@@ -20804,7 +20804,7 @@ static int DecodeCertReq(DecodedCert* cert, int* criticalExt)
|
|||||||
int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
|
int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
|
#if !defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)
|
||||||
char* ptr;
|
char* ptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -20812,7 +20812,7 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
|
#if !defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)
|
||||||
/* cert->subjectCN not stored as copy of WOLFSSL_NO_MALLOC defind */
|
/* cert->subjectCN not stored as copy of WOLFSSL_NO_MALLOC defind */
|
||||||
if (cert->subjectCNLen > 0) {
|
if (cert->subjectCNLen > 0) {
|
||||||
ptr = (char*) XMALLOC(cert->subjectCNLen + 1, cert->heap,
|
ptr = (char*) XMALLOC(cert->subjectCNLen + 1, cert->heap,
|
||||||
@@ -20826,7 +20826,7 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_DYN_CERT)
|
#if !defined(WOLFSSL_NO_MALLOC) && !defined(NO_WOLFSSL_CM_VERIFY)
|
||||||
/* cert->publicKey not stored as copy if WOLFSSL_NO_MALLOC defined */
|
/* cert->publicKey not stored as copy if WOLFSSL_NO_MALLOC defined */
|
||||||
if ((cert->keyOID == RSAk
|
if ((cert->keyOID == RSAk
|
||||||
#ifdef WC_RSA_PSS
|
#ifdef WC_RSA_PSS
|
||||||
|
Reference in New Issue
Block a user