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