From: Jeff Trawick Date: Sun, 6 Jul 2014 18:58:19 +0000 (+0000) Subject: The SNI callback already logs a debug message when the vhost X-Git-Tag: 2.5.0-alpha~3999 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61bb8276096747b3dfa01e4903bf0f251a344f1;p=apache The SNI callback already logs a debug message when the vhost is found or no vhost matches. Log one when no name is provided by the client. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608284 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index d76e014c09..e61b97bd4e 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2645 +2646 diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 3587f9b6dd..0207947d9c 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -1900,10 +1900,10 @@ int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx) { const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); + conn_rec *c = (conn_rec *)SSL_get_app_data(ssl); - if (servername) { - conn_rec *c = (conn_rec *)SSL_get_app_data(ssl); - if (c) { + if (c) { + if (servername) { if (ap_vhost_iterate_given_conn(c, ssl_find_vhost, (void *)servername)) { ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02043) @@ -1933,6 +1933,11 @@ int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx) */ } } + else { + ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02645) + "Server name not provided via TLS extension " + "(using default/first virtual host)"); + } } return SSL_TLSEXT_ERR_NOACK;