altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1556473.patch

008793
# ./pullrev.sh 1556473
008793
008793
https://bugzilla.redhat.com/show_bug.cgi?id=1036666
008793
008793
http://svn.apache.org/viewvc?view=revision&revision=1556473
008793
008793
--- httpd-2.4.6/modules/ssl/ssl_engine_config.c
008793
+++ httpd-2.4.6/modules/ssl/ssl_engine_config.c
008793
@@ -699,9 +699,20 @@
008793
 #ifndef SSL_OP_NO_COMPRESSION
008793
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
008793
     if (err)
008793
-        return "This version of openssl does not support configuring "
008793
-               "compression within <VirtualHost> sections.";
008793
+        return "This version of OpenSSL does not support enabling "
008793
+               "SSLCompression within <VirtualHost> sections.";
008793
 #endif
008793
+    if (flag) {
008793
+        /* Some (packaged) versions of OpenSSL do not support
008793
+         * compression by default.  Enabling this directive would not
008793
+         * have the desired effect, so fail with an error. */
008793
+        STACK_OF(SSL_COMP) *meths = SSL_COMP_get_compression_methods();
008793
+
008793
+        if (sk_SSL_COMP_num(meths) == 0) {
008793
+            return "This version of OpenSSL does not have any compression methods "
008793
+                "available, cannot enable SSLCompression.";
008793
+        }
008793
+    }
008793
     sc->compression = flag ? TRUE : FALSE;
008793
     return NULL;
008793
 #else