]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Updated fix for issue which was initially addressed in r1500108:
authorKaspar Brand <kbrand@apache.org>
Wed, 10 Jul 2013 10:32:28 +0000 (10:32 +0000)
committerKaspar Brand <kbrand@apache.org>
Wed, 10 Jul 2013 10:32:28 +0000 (10:32 +0000)
mod_ssl: Fix "SNI for backend" when compiled against
OpenSSL without support for SSLv2.

PR 55194.

Followup to r1497466. Does not apply to trunk or 2.4.x.

Proposed by: kbrand
Reviewed by: wrowe, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1501712 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_io.c

diff --git a/CHANGES b/CHANGES
index d39d14a29f953c4678a3f810d97159686d533a52..8e3327cc9d62da08569e9ba2cb3687d2fd6495c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.26
 
-
+  *) mod_ssl: Fix compilation error when OpenSSL does not contain
+     support for SSLv2. Problem was introduced in 2.2.25. PR 55194.
+     [Rainer Jung, Kaspar Brand]
 
 Changes with Apache 2.2.25
 
index 13131900fb6d116be67bb01e2c73772126bde4c3..7884a0a121bfd61e39035179f68fec48dd356a30 100644 (file)
@@ -1073,13 +1073,16 @@ static int ssl_io_filter_connect(ssl_filter_ctx_t *filter_ctx)
 #ifndef OPENSSL_NO_TLSEXT
         /*
          * Enable SNI for backend requests. Make sure we don't do it for
-         * pure SSLv2 or SSLv3 connections, and also prevent IP addresses
+         * pure SSLv3 connections, and also prevent IP addresses
          * from being included in the SNI extension. (OpenSSL would simply
          * pass them on, but RFC 6066 is quite clear on this: "Literal
          * IPv4 and IPv6 addresses are not permitted".)
+         * We can omit the check for SSL_PROTOCOL_SSLV2 as there is
+         * no way for OpenSSL to screw up things in this case (it's
+         * impossible to include extensions in a pure SSLv2 ClientHello,
+         * protocol-wise).
          */
         if (hostname_note &&
-            sc->proxy->protocol != SSL_PROTOCOL_SSLV2 &&
             sc->proxy->protocol != SSL_PROTOCOL_SSLV3 &&
             apr_ipsubnet_create(&ip, hostname_note, NULL,
                                 c->pool) != APR_SUCCESS) {