diff --git a/src/ssl.c b/src/ssl.c index fcea7ee85..11bc08a3c 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -6309,7 +6309,7 @@ int wolfSSL_CertManagerCheckOCSP(WOLFSSL_CERT_MANAGER* cm, byte* der, int sz) return WOLFSSL_SUCCESS; #ifdef WOLFSSL_SMALL_STACK - cert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), NULL, DYNAMIC_TYPE_DCERT); + cert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), cm->heap, DYNAMIC_TYPE_DCERT); if (cert == NULL) return MEMORY_E; #endif @@ -6325,7 +6325,7 @@ int wolfSSL_CertManagerCheckOCSP(WOLFSSL_CERT_MANAGER* cm, byte* der, int sz) FreeDecodedCert(cert); #ifdef WOLFSSL_SMALL_STACK - XFREE(cert, NULL, DYNAMIC_TYPE_DCERT); + XFREE(cert, cm->heap, DYNAMIC_TYPE_DCERT); #endif return ret == 0 ? WOLFSSL_SUCCESS : ret; @@ -25721,6 +25721,11 @@ WOLFSSL_API int wolfSSL_i2a_ASN1_OBJECT(WOLFSSL_BIO *bp, return WOLFSSL_FAILURE; } +/* Returns object data for an ASN1_OBJECT */ +/* If pp is NULL then only the size is returned */ +/* If pp has pointer to pointer then its used directly */ +/* If pp has pointer to pointer that is NULL then new variable is allocated */ +/* Failure returns WOLFSSL_FAILURE (0) */ int wolfSSL_i2d_ASN1_OBJECT(WOLFSSL_ASN1_OBJECT *a, unsigned char **pp) { byte *p;