struct when accessing SERVER_TLS_SERVER_END_POINT.
PR: 64264
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1875647 13f79535-47bb-0310-9956-
ffa450edef68
}
else if (strcEQ(type, "SERVER_TLS_SERVER_END_POINT")) {
x = SSL_get_certificate(sslconn->ssl);
+ /* Increase refcount so X509_free below works for both client
+ * and server cases. */
+ if (x) X509_up_ref(x);
}
else if (strcEQ(type, "CLIENT_TLS_SERVER_END_POINT")) {
x = SSL_get_peer_certificate(sslconn->ssl);
preflen = sizeof(TLS_SERVER_END_POINT_PREFIX) - 1;
prefix = TLS_SERVER_END_POINT_PREFIX;
data = cb;
+
+ X509_free(x);
}
else {
return APR_EGENERAL;