]> granicus.if.org Git - apache/commitdiff
The SNI callback already logs a debug message when the vhost
authorJeff Trawick <trawick@apache.org>
Sun, 6 Jul 2014 18:58:19 +0000 (18:58 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 6 Jul 2014 18:58:19 +0000 (18:58 +0000)
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

docs/log-message-tags/next-number
modules/ssl/ssl_engine_kernel.c

index d76e014c090b1683645c8d114fc11e418d1e65f2..e61b97bd4e066e264fbe30c4b7070d658ce2ee3c 100644 (file)
@@ -1 +1 @@
-2645
+2646
index 3587f9b6dd881d811e8328914e6880dac54cab5e..0207947d9c28826978863c4c49a4cfd01a57a1c6 100644 (file)
@@ -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;