mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Added function comment for wolfSSL_i2a_ASN1_OBJECT
. Added heap context for wolfSSL_CertManagerCheckOCSP
This commit is contained in:
@@ -6309,7 +6309,7 @@ int wolfSSL_CertManagerCheckOCSP(WOLFSSL_CERT_MANAGER* cm, byte* der, int sz)
|
|||||||
return WOLFSSL_SUCCESS;
|
return WOLFSSL_SUCCESS;
|
||||||
|
|
||||||
#ifdef WOLFSSL_SMALL_STACK
|
#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)
|
if (cert == NULL)
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
#endif
|
#endif
|
||||||
@@ -6325,7 +6325,7 @@ int wolfSSL_CertManagerCheckOCSP(WOLFSSL_CERT_MANAGER* cm, byte* der, int sz)
|
|||||||
|
|
||||||
FreeDecodedCert(cert);
|
FreeDecodedCert(cert);
|
||||||
#ifdef WOLFSSL_SMALL_STACK
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
XFREE(cert, NULL, DYNAMIC_TYPE_DCERT);
|
XFREE(cert, cm->heap, DYNAMIC_TYPE_DCERT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret == 0 ? WOLFSSL_SUCCESS : ret;
|
return ret == 0 ? WOLFSSL_SUCCESS : ret;
|
||||||
@@ -25721,6 +25721,11 @@ WOLFSSL_API int wolfSSL_i2a_ASN1_OBJECT(WOLFSSL_BIO *bp,
|
|||||||
return WOLFSSL_FAILURE;
|
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)
|
int wolfSSL_i2d_ASN1_OBJECT(WOLFSSL_ASN1_OBJECT *a, unsigned char **pp)
|
||||||
{
|
{
|
||||||
byte *p;
|
byte *p;
|
||||||
|
Reference in New Issue
Block a user