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