From: Doug MacEachern Date: Thu, 23 Aug 2001 23:43:45 +0000 (+0000) Subject: prevent double lookup of ssl::verify::error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7857ec714873dcafccee8a7acd43a29b74d54a9a;p=thirdparty%2Fapache%2Fhttpd.git prevent double lookup of ssl::verify::error git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@90597 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/mod_ssl.c b/mod_ssl.c index 3ad296eccf0..8dc9d81cced 100644 --- a/mod_ssl.c +++ b/mod_ssl.c @@ -342,7 +342,7 @@ int ssl_hook_process_connection(SSLFilterRec *pRec) { int n, err; X509 *xs; - char *cp; + char *cp = NULL; conn_rec *c = (conn_rec*)SSL_get_app_data (pRec->pssl); SSLSrvConfigRec *sc = mySrvConfig(c->base_server); @@ -445,9 +445,10 @@ int ssl_hook_process_connection(SSLFilterRec *pRec) /* * Check for failed client authentication */ - if ( SSL_get_verify_result(pRec->pssl) != X509_V_OK - || apr_table_get (c->notes, "ssl::verify::error") != NULL) { - cp = (char *)apr_table_get(c->notes, "ssl::verify::error"); + if (SSL_get_verify_result(pRec->pssl) != X509_V_OK || + ((cp = (char *)apr_table_get(c->notes, + "ssl::verify::error")) != NULL)) + { ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR, "SSL client authentication failed: %s", cp != NULL ? cp : "unknown reason");