diff options
author | Daniel Ruggeri <druggeri@apache.org> | 2012-02-08 22:02:20 +0100 |
---|---|---|
committer | Daniel Ruggeri <druggeri@apache.org> | 2012-02-08 22:02:20 +0100 |
commit | 104e5a433c7ee3ccd828bcc078e05bd0fb135caa (patch) | |
tree | e630f4e90e5811a20184e0e6579f4d3216701f1f /modules | |
parent | Based on feedback from Vincent from the docs team, change the examples (diff) | |
download | apache2-104e5a433c7ee3ccd828bcc078e05bd0fb135caa.tar.xz apache2-104e5a433c7ee3ccd828bcc078e05bd0fb135caa.zip |
Add cleanup for SSLProxyMachineCertificateChainFile during init
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242089 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ssl/ssl_engine_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index 98ba6a240e..acaf5d5077 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -1636,6 +1636,17 @@ static void ssl_init_ctx_cleanup_proxy(modssl_ctx_t *mctx) ssl_init_ctx_cleanup(mctx); if (mctx->pkp->certs) { + int i = 0; + int ncerts = sk_X509_INFO_num(mctx->pkp->certs); + + if (mctx->pkp->ca_certs) { + for (i = 0; i < ncerts; i++) { + if (mctx->pkp->ca_certs[i] != NULL) { + sk_X509_pop_free(mctx->pkp->ca_certs[i], X509_free); + } + } + } + sk_X509_INFO_pop_free(mctx->pkp->certs, X509_INFO_free); mctx->pkp->certs = NULL; } |