forked from wolfSSL/wolfssl
KEEP_STORE_CERTS release elimination, limited to FreeX509 in X509_STORE_CTX
This commit is contained in:
committed by
Go Hosohara
parent
226bc54b57
commit
3c93d4e638
@ -18517,14 +18517,14 @@ int wolfSSL_X509_STORE_CTX_init(WOLFSSL_X509_STORE_CTX* ctx,
|
|||||||
void wolfSSL_X509_STORE_CTX_free(WOLFSSL_X509_STORE_CTX* ctx)
|
void wolfSSL_X509_STORE_CTX_free(WOLFSSL_X509_STORE_CTX* ctx)
|
||||||
{
|
{
|
||||||
if (ctx != NULL) {
|
if (ctx != NULL) {
|
||||||
#ifndef WOLFSSL_KEEP_STORE_CERTS
|
|
||||||
if (ctx->store != NULL)
|
if (ctx->store != NULL)
|
||||||
wolfSSL_X509_STORE_free(ctx->store);
|
wolfSSL_X509_STORE_free(ctx->store);
|
||||||
|
#ifndef WOLFSSL_KEEP_STORE_CERTS
|
||||||
if (ctx->current_cert != NULL)
|
if (ctx->current_cert != NULL)
|
||||||
wolfSSL_FreeX509(ctx->current_cert);
|
wolfSSL_FreeX509(ctx->current_cert);
|
||||||
|
#endif
|
||||||
if (ctx->chain != NULL)
|
if (ctx->chain != NULL)
|
||||||
wolfSSL_sk_X509_free(ctx->chain);
|
wolfSSL_sk_X509_free(ctx->chain);
|
||||||
#endif
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
if (ctx->param != NULL){
|
if (ctx->param != NULL){
|
||||||
XFREE(ctx->param,NULL,DYNAMIC_TYPE_OPENSSL);
|
XFREE(ctx->param,NULL,DYNAMIC_TYPE_OPENSSL);
|
||||||
|
Reference in New Issue
Block a user