8335b1
--- a/modules/ssl/ssl_engine_kernel.c	2015/06/09 15:55:41	1684461
8335b1
+++ b/modules/ssl/ssl_engine_kernel.c	2015/06/09 16:09:28	1684462
8335b1
@@ -1940,7 +1940,7 @@
8335b1
 #ifndef OPENSSL_NO_TLSEXT
8335b1
 /*
8335b1
  * This callback function is executed when OpenSSL encounters an extended
8335b1
- * client hello with a server name indication extension ("SNI", cf. RFC 4366).
8335b1
+ * client hello with a server name indication extension ("SNI", cf. RFC 6066).
8335b1
  */
8335b1
 int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx)
8335b1
 {
8335b1
@@ -1962,7 +1962,21 @@
8335b1
                               "No matching SSL virtual host for servername "
8335b1
                               "%s found (using default/first virtual host)",
8335b1
                               servername);
8335b1
-                return SSL_TLSEXT_ERR_ALERT_WARNING;
8335b1
+                /*
8335b1
+                 * RFC 6066 section 3 says "It is NOT RECOMMENDED to send
8335b1
+                 * a warning-level unrecognized_name(112) alert, because
8335b1
+                 * the client's behavior in response to warning-level alerts
8335b1
+                 * is unpredictable."
8335b1
+                 *
8335b1
+                 * To maintain backwards compatibility in mod_ssl, we
8335b1
+                 * no longer send any alert (neither warning- nor fatal-level),
8335b1
+                 * i.e. we take the second action suggested in RFC 6066:
8335b1
+                 * "If the server understood the ClientHello extension but
8335b1
+                 * does not recognize the server name, the server SHOULD take
8335b1
+                 * one of two actions: either abort the handshake by sending
8335b1
+                 * a fatal-level unrecognized_name(112) alert or continue
8335b1
+                 * the handshake."
8335b1
+                 */
8335b1
             }
8335b1
         }
8335b1
     }