]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
On the trunk:
authorStefan Eissing <icing@apache.org>
Fri, 23 Mar 2018 12:24:29 +0000 (12:24 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 23 Mar 2018 12:24:29 +0000 (12:24 +0000)
mod_ssl: heavily simplified SSLPolicy. No more user defines, no propxy policies,
     just the basic "modern", "intermediate" and "old" as specified by Mozilla security.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827561 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_ssl.xml
modules/ssl/mod_ssl.c
modules/ssl/ssl_engine_config.c
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_policies.h
modules/ssl/ssl_policies.h.in
modules/ssl/ssl_private.h

diff --git a/CHANGES b/CHANGES
index 36250c224d6c4785ffaaada8112fbeb143194ae7..128145e6ec223e83166739a2fa225cad02be3ba3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_ssl: heavily simplified SSLPolicy. No more user defines, no propxy policies,
+     just the basic "modern", "intermediate" and "old" as specified by Mozilla security.
+     [Stefan Eissing]
+
   *) mod_remoteip: make proxy-protocol work on slave connections, e.g. in HTTP/2
      requests. See also https://github.com/roadrunner2/mod-proxy-protocol/issues/6
      [Stefan Eissing]
index 0dff8cf696ff95b9db324e55de5de1bee1491c1d..1d240f2b4343761a92cc1abeaebbf7bda1449283 100644 (file)
@@ -2841,119 +2841,6 @@ SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256
 </usage>
 </directivesynopsis>
 
-<directivesynopsis type="section" idtype="section">
-<name>SSLPolicyDefine</name>
-<description>Define a named set of SSL configurations</description>
-<syntax>&lt;SSLPolicyDefine <em>name</em>&gt;</syntax>
-<contextlist><context>server config</context></contextlist>
-<compatibility>Available in httpd 2.4.30 and later</compatibility>
-
-<usage>
-<p>This directive defines a set of SSL* configurations under
-and gives it a name. This name can be used in the directives
-<directive>SSLPolicy</directive> and <directive>SSLProxyPolicy</directive>
-to apply this configuration set in the current context.</p>
-
-<example><title>Define and Use of a Policy</title>
-<highlight language="config">
-&lt;SSLPolicyDefine safe-stapling&gt;
-   SSLUseStapling on
-   SSLStaplingResponderTimeout 2
-   SSLStaplingReturnResponderErrors off
-   SSLStaplingFakeTryLater off
-   SSLStaplingStandardCacheTimeout 86400
-&lt;/SSLPolicyDefine&gt;
-
-   ...
-   &lt;VirtualHost...&gt;
-      SSLPolicy safe-stapling
-      ...
-</highlight>
-</example>
-
-<p>On the one hand, this can make server configurations easier to 
-<em>read</em> and <em>maintain</em>. On the other hand, it is 
-intended to make SSL easier and safer to <em>use</em>. For the 
-latter, Apache httpd ships with a set of pre-defined policies
-that reflect good open source practise. The policy "modern",
-for example, carries the settings to make your server work
-compatible and securely with current browsers.</p>
-
-<p>The list of predefined policies in your Apache can be obtained
-by running the following command. This list shows you the 
-detailed configurations each policy is made of:</p>
-
-<example><title>List all Defined Policies</title>
-<highlight language="sh">
-httpd -t -D DUMP_SSL_POLICIES
-</highlight>
-</example>
-
-<p>The directive can only be used in the server config (global context). It can take
-most SSL* directives, however a few can only be set once and are not allowed inside
-policy defintions. These are <directive>SSLCryptoDevice</directive>, 
-<directive>SSLRandomSeed</directive>, 
-<directive>SSLSessionCache</directive> and 
-<directive>SSLStaplingCache</directive>.
-</p>
-<p>Two policies cannot have the same name. However, policies can
-be redefined:</p>
-
-<example><title>Policy Overwrite</title>
-<highlight language="config">
-&lt;SSLPolicyDefine proxy-trust&gt;
-   SSLProxyVerify require
-&lt;/SSLPolicyDefine&gt;
-   ...
-&lt;SSLPolicyDefine proxy-trust&gt;
-   SSLProxyVerify none
-&lt;/SSLPolicyDefine&gt;
-</highlight>
-</example>
-
-<p>Policy definitions are <em>added</em> in the order they appear, but are
-<em>applied</em> when the whole configuration has been read. This means that any
-use of 'proxy-trust' will mean 'SSLProxyVerify none'. The first definition
-has no effect at all. That allows pre-installed policies to be replaced
-without the need to disable them.</p>
-
-<p>Additional to replacing policies, redefinitions may just alter
-an aspect of a policy:</p>
-
-<example><title>Policy Redefine</title>
-<highlight language="config">
-&lt;SSLPolicyDefine proxy-trust&gt;
-   SSLProxyVerify require
-&lt;/SSLPolicyDefine&gt;
-   ...
-&lt;SSLPolicyDefine proxy-trust&gt;
-   SSLPolicy proxy-trust
-   SSLProxyVerifyDepth 10
-&lt;/SSLPolicyDefine&gt;
-</highlight>
-</example>
-
-<p>This re-uses all settings from the previous 'proxy-trust' and adds
-one directive on top of it. All others still apply. This is very handy
-when pre-defined policies (from Apache itself or a distributor)
-that <em>almost</em> what you need. Previously, such definitions were
-(copied and) edited. This made updating them difficult. Now they can
-be setup like this:</p>
-
-<example><title>Tweak a Pre-Defined Policy</title>
-<highlight language="config">
-Include ssl-policies.conf
-
-&lt;SSLPolicyDefine modern&gt;
-   SSLPolicy modern
-   SSLProxyVerify none
-&lt;/SSLPolicyDefine&gt;
-</highlight>
-</example>
-
-</usage>
-</directivesynopsis>
-
 <directivesynopsis>
 <name>SSLPolicy</name>
 <description>Apply a SSLPolicy by name</description>
@@ -2975,6 +2862,9 @@ for a detailed description by them.</a>):
     <li><code>intermediate</code>: the fallback if you need to support old (but not very old) clients.</li>
     <li><code>old</code>: when you need to give Windows XP/Internet Explorer 6 access. The last resort.</li>
 </ul>
+<p>SSLPolicy applies configuration settings in place, meaning previous values are
+overwritten. Configuration directives following an SSLPolicy may overwrite it.
+</p> 
 
 <p>You can check the detailed description of all defined policies via the command line:</p>
 <example><title>List all Defined Policies</title>
@@ -2983,76 +2873,6 @@ httpd -t -D DUMP_SSL_POLICIES
 </highlight>
 </example>
 
-<p>A SSLPolicy defines the baseline for the context it is used in. That means that any 
-other SSL* directives in the same context override it. As an example of this, see the effective
-<directive>SSLProtocol</directive> value in the following settings:</p>
-
-<example><title>Policy Precedence</title>
-<highlight language="config">
-&lt;VirtualHost...&gt; # effective: 'all'
-   SSLPolicy modern
-   SSLProtocol all
-&lt;/VirtualHost&gt;
-
-&lt;VirtualHost...&gt; # effective: 'all'
-   SSLProtocol all
-   SSLPolicy modern
-&lt;/VirtualHost&gt;
-
-SSLPolicy modern
-&lt;VirtualHost...&gt; # effective: 'all'
-   SSLProtocol all
-&lt;/VirtualHost&gt;
-   
-SSLProtocol all
-&lt;VirtualHost...&gt; # effective: '+TLSv1.2'
-  SSLPolicy modern
-&lt;/VirtualHost&gt;
-</highlight>
-</example>
-
-<p>There can be more than one policy applied in a context. The
-later ones overshadowing the earlier ones:</p>
-
-<example><title>Policy Ordering</title>
-<highlight language="config">
-&lt;VirtualHost...&gt; # effective protocol: 'all -SSLv3'
-   SSLPolicy modern
-   SSLPolicy intermediate
-&lt;/VirtualHost&gt;
-
-&lt;VirtualHost...&gt; # effective protocol: '+TLSv1.2'
-   SSLPolicy intermediate
-   SSLPolicy modern
-&lt;/VirtualHost&gt;
-</highlight>
-</example>
-
-</usage>
-</directivesynopsis>
-
-<directivesynopsis>
-<name>SSLProxyPolicy</name>
-<description>Apply the SSLProxy* parts alone of a SSLPolicy</description>
-<syntax>SSLProxyPolicy <em>name</em></syntax>
-<contextlist><context>server config</context>
-<context>virtual host</context></contextlist>
-<compatibility>Available in httpd 2.4.30 and later</compatibility>
-
-<usage>
-<p>This directive is similar to <directive>SSLPolicy</directive>, but 
-applies only the SSLProxy* directives defined in the policy. This helps
-when you need different policies for front and backends:</p>
-
-<example><title>Another Policies for Proxy Only</title>
-<highlight language="config">
-SSLPolicy modern
-SSLProxyPolicy intermediate
-</highlight>
-</example>
-
-<p>In this example, the 'modern' policy is first applied for front- and backend. The backend
-parts are then overwritten by the 'intermediate' policy settings.</p>
 </usage>
 </directivesynopsis>
 
index 7d2d9380ad472eec37d00e7429a097ec172a4ae5..3780d8c89be62a9d385f5ba8f61b21df0532f8f9 100644 (file)
@@ -312,15 +312,8 @@ static const command_rec ssl_config_cmds[] = {
     AP_INIT_RAW_ARGS("SSLLogLevel", ap_set_deprecated, NULL, OR_ALL,
       "SSLLogLevel directive is no longer supported - use LogLevel."),
 
-    AP_INIT_TAKE1("<SSLPolicyDefine", ssl_cmd_SSLPolicyDefine, NULL, RSRC_CONF, 
-                "Define a set of SSL* configurations under a new name. Such a policy may "
-                "be used in any location where the SSL* directives are viable. The policy "
-                "may contain both SSL* and SSLProxy* specific settings. Which one is applied "
-                "depends on the use."),
     AP_INIT_TAKE1("SSLPolicy", ssl_cmd_SSLPolicyApply, NULL, RSRC_CONF, 
                 "Apply the SSL* (not the SSLProxy*) settings from the policy with the given name."),
-    AP_INIT_TAKE1("SSLProxyPolicy", ssl_cmd_SSLProxyPolicyApply, NULL, RSRC_CONF|PROXY_CONF, 
-                "Use the SSLProxy* settings from the policy with the given name."),
     AP_END_CMD
 };
 
index 7501dc0d3a310c09343296cb9a8cc9f67e55d3e2..6c65b29fe9d6bba52c1ee2dc1b04733ff9b0c906 100644 (file)
@@ -230,8 +230,6 @@ static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
     sc->compression            = UNSET;
 #endif
     sc->session_tickets        = UNSET;
-    sc->policies               = NULL;
-    sc->error_policy           = NULL;
     sc->enabled_on             = NULL;
 
     modssl_ctx_init_server(sc, p);
@@ -346,19 +344,12 @@ static void modssl_ctx_cfg_merge_server(apr_pool_t *p,
 #endif
 }
 
-static void ssl_policy_apply(SSLSrvConfigRec *sc, apr_pool_t *p);
-static void ssl_dir_policy_apply(SSLDirConfigRec *dc, apr_pool_t *p);
-
 void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
 {
     SSLSrvConfigRec *base = (SSLSrvConfigRec *)basev;
     SSLSrvConfigRec *add  = (SSLSrvConfigRec *)addv;
     SSLSrvConfigRec *mrg  = ssl_config_server_new(p);
 
-    /* This is a NOP, unless a policy has not been applied yet */
-    ssl_policy_apply(base, p);
-    ssl_policy_apply(add, p);
-    
     cfgMerge(mc, NULL);
     cfgMerge(enabled, SSL_ENABLED_UNSET);
     cfgMergeInt(session_cache_timeout);
@@ -375,9 +366,6 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
 #endif
     cfgMergeBool(session_tickets);
 
-    mrg->policies = NULL;
-    cfgMergeString(error_policy);
-
     mrg->enabled_on = (add->enabled == SSL_ENABLED_UNSET)? base->enabled_on : add->enabled_on;
                          
     modssl_ctx_cfg_merge_server(p, base->server, add->server, mrg->server);
@@ -429,9 +417,6 @@ void *ssl_config_perdir_create(apr_pool_t *p, char *dir)
     modssl_ctx_init_proxy(dc, p);
     dc->proxy_post_config = FALSE;
 
-    dc->policies = NULL;
-    dc->error_policy = NULL;
-    
     return dc;
 }
 
@@ -457,9 +442,6 @@ void *ssl_config_perdir_merge(apr_pool_t *p, void *basev, void *addv)
     SSLDirConfigRec *add  = (SSLDirConfigRec *)addv;
     SSLDirConfigRec *mrg  = (SSLDirConfigRec *)apr_palloc(p, sizeof(*mrg));
 
-    ssl_dir_policy_apply(base, p);
-    ssl_dir_policy_apply(add, p);
-    
     cfgMerge(bSSLRequired, FALSE);
     cfgMergeArray(aRequirement);
 
@@ -499,9 +481,6 @@ void *ssl_config_perdir_merge(apr_pool_t *p, void *basev, void *addv)
         mrg->proxy = add->proxy;
     }
 
-    mrg->policies = NULL;
-    cfgMergeString(error_policy);
-
     return mrg;
 }
 
@@ -524,26 +503,21 @@ void ssl_config_proxy_merge(apr_pool_t *p,
 
 static void add_policy(apr_hash_t *policies, apr_pool_t *p, const char *name,
                        int protocols, const char *ciphers, 
-                       int honor_order, int compression, int session_tickets,
-                       ssl_verify_t proxy_verify_mode, int proxy_verify_depth)
+                       int honor_order, int compression, int session_tickets)
 {
     SSLPolicyRec *policy;
     
     policy = apr_pcalloc(p, sizeof(*policy));
     policy->name = name;
     policy->sc = ssl_config_server_new(p);
-    policy->dc = ssl_config_perdir_create(p, "/");
     
     if (protocols || ciphers) {
         policy->sc->server->protocol_set      = 1;
         policy->sc->server->protocol          = protocols;
-        policy->dc->proxy->protocol_set       = 1;
-        policy->dc->proxy->protocol           = protocols;
     }
     
     if (ciphers) {
         policy->sc->server->auth.cipher_suite = ciphers;
-        policy->dc->proxy->auth.cipher_suite = ciphers;
     }
 
 #ifndef OPENSSL_NO_COMP
@@ -551,11 +525,6 @@ static void add_policy(apr_hash_t *policies, apr_pool_t *p, const char *name,
 #endif
     policy->sc->session_tickets           = session_tickets ? TRUE : FALSE;
     
-    policy->dc->proxy->auth.verify_mode  = proxy_verify_mode;
-    if (proxy_verify_depth >= 0) {
-        policy->dc->proxy->auth.verify_depth = proxy_verify_depth;
-    }
-    
     apr_hash_set(policies, policy->name, APR_HASH_KEY_STRING, policy);
 }
 
@@ -577,9 +546,7 @@ static apr_hash_t *get_policies(apr_pool_t *p, int create)
                    SSL_POLICY_MODERN_CIPHERS, 
                    SSL_POLICY_HONOR_ORDER, 
                    SSL_POLICY_COMPRESSION, 
-                   SSL_POLICY_SESSION_TICKETS, 
-                   SSL_POLICY_PROXY_VERIFY_MODE, 
-                   SSL_POLICY_PROXY_VERIFY_DEPTH);
+                   SSL_POLICY_SESSION_TICKETS);
 #endif        
 #if SSL_POLICY_INTERMEDIATE
         add_policy(policies, p, "intermediate", 
@@ -587,9 +554,7 @@ static apr_hash_t *get_policies(apr_pool_t *p, int create)
                    SSL_POLICY_INTERMEDIATE_CIPHERS, 
                    SSL_POLICY_HONOR_ORDER, 
                    SSL_POLICY_COMPRESSION, 
-                   SSL_POLICY_SESSION_TICKETS, 
-                   SSL_POLICY_PROXY_VERIFY_MODE, 
-                   SSL_POLICY_PROXY_VERIFY_DEPTH);
+                   SSL_POLICY_SESSION_TICKETS);
 #endif        
 #if SSL_POLICY_OLD
         add_policy(policies, p, "old", 
@@ -597,9 +562,7 @@ static apr_hash_t *get_policies(apr_pool_t *p, int create)
                    SSL_POLICY_OLD_CIPHERS, 
                    SSL_POLICY_HONOR_ORDER, 
                    SSL_POLICY_COMPRESSION, 
-                   SSL_POLICY_SESSION_TICKETS, 
-                   SSL_CVERIFY_NONE, 
-                   SSL_POLICY_PROXY_VERIFY_DEPTH);
+                   SSL_POLICY_SESSION_TICKETS);
 #endif        
         
         apr_pool_userdata_set(policies, SSL_MOD_POLICIES_KEY,
@@ -639,143 +602,21 @@ SSLPolicyRec *ssl_policy_lookup(apr_pool_t *pool, const char *name)
     return apr_hash_get(policies, name, APR_HASH_KEY_STRING);
 }
 
-static void ssl_policy_set(apr_pool_t *pool, SSLPolicyRec *policy)
-{
-    apr_hash_t *policies = get_policies(pool, 1);
-    return apr_hash_set(policies, policy->name, APR_HASH_KEY_STRING, policy);
-}
-
-const char *ssl_cmd_SSLPolicyDefine(cmd_parms *cmd, void *mconfig, const char *arg)
-{
-    server_rec *s = cmd->server;
-    SSLSrvConfigRec *sc = mySrvConfig(s);
-    SSLDirConfigRec *dc = ap_get_module_config(s->lookup_defaults, &ssl_module);
-    SSLPolicyRec *policy;
-    const char *endp = ap_strrchr_c(arg, '>');
-    const char *err, *name;
-
-    if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
-        return err;
-    }
-        
-    if (endp == NULL) {
-        return apr_pstrcat(cmd->pool, cmd->cmd->name, "> directive missing closing '>'", NULL);
-    }
-
-    arg = apr_pstrndup(cmd->pool, arg, endp-arg);
-    if (!arg || !*arg) {
-        return "<SSLPolicyDefine > block must specify a name";
-    }
-
-    name = ap_getword_white(cmd->pool, &arg);
-    if (*arg != '\0') {
-        return apr_pstrcat(cmd->pool, cmd->cmd->name, "> takes only 1 argument", NULL);
-    }
-    
-    policy = apr_pcalloc(cmd->pool, sizeof(*policy));
-    policy->name = name;
-    policy->sc = ssl_config_server_new(cmd->pool);
-    policy->sc->mc = NULL; /* No global configs during SSLPolicy definition */
-    policy->dc = ssl_config_perdir_create(cmd->pool, "/");/* TODO */
-
-    ap_set_module_config(s->module_config,  &ssl_module, policy->sc);
-    ap_set_module_config(s->lookup_defaults,  &ssl_module, policy->dc);
-    
-    err = ap_walk_config(cmd->directive->first_child, cmd, cmd->context);
-    if (!err) {
-        /* If this new policy uses other policies, we need to merge it
-         * before adding, otherwise a policy cannot re-use an existing one */
-        ssl_policy_apply(policy->sc, cmd->pool);
-        ssl_dir_policy_apply(policy->dc, cmd->pool);
-        /* time to persist */
-        ssl_policy_set(cmd->pool, policy);
-    }
-    
-    ap_set_module_config(s->module_config,  &ssl_module, sc);
-    ap_set_module_config(s->lookup_defaults,  &ssl_module, dc);
-
-    return err;
-}
-
 const char *ssl_cmd_SSLPolicyApply(cmd_parms *cmd, void *mconfig, const char *arg)
 {
-    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
-    
-    if (!sc->policies) {
-        sc->policies = apr_array_make(cmd->pool, 5, sizeof(const char*));
-    }
-    APR_ARRAY_PUSH(sc->policies, const char *) = arg;
-
-    /* Also apply the proxy parts of the policy */
-    return ssl_cmd_SSLProxyPolicyApply(cmd, mconfig, arg);
-}
-
-const char *ssl_cmd_SSLProxyPolicyApply(cmd_parms *cmd, void *mconfig, const char *arg)
-{
-    SSLDirConfigRec *dc = ap_get_module_config(cmd->server->lookup_defaults, &ssl_module);
-    
-    if (!dc->policies) {
-        dc->policies = apr_array_make(cmd->pool, 5, sizeof(const char*));
-    }
-    APR_ARRAY_PUSH(dc->policies, const char *) = arg;
-
-    return NULL;
-}
-
-void ssl_policy_apply(SSLSrvConfigRec *sc, apr_pool_t *p)
-{
-    SSLSrvConfigRec *mrg;
+    SSLSrvConfigRec *mrg, *sc = mySrvConfig(cmd->server);
     SSLPolicyRec *policy;
-    apr_array_header_t *policies;
-    const char *name;
-    int i;
-
-    policies = sc->policies;
-    if (policies && policies->nelts > 0 && !sc->error_policy) {
-        sc->policies = NULL;
-        for (i = policies->nelts - 1; i >= 0; --i) {
-            name = APR_ARRAY_IDX(policies, i, const char *);
-            policy = ssl_policy_lookup(p, name);
-            if (policy) {
-                mrg = ssl_config_server_merge(p, policy->sc, sc);
-                /* apply in place */
-                memcpy(sc, mrg, sizeof(*sc));
-            }
-            else {
-                sc->error_policy = name;
-                break;
-                /* report error policies in post_config */
-            }
-        }
-    }
-}
-
-void ssl_dir_policy_apply(SSLDirConfigRec *dc, apr_pool_t *p)
-{
-    SSLDirConfigRec *mrg;
-    SSLPolicyRec *policy;
-    apr_array_header_t *policies;
-    const char *name;
-    int i;
     
-    policies = dc->policies;
-    if (policies && policies->nelts > 0 &&!dc->error_policy) {
-        dc->policies = NULL;
-        for (i = policies->nelts - 1; i >= 0; --i) {
-            name = APR_ARRAY_IDX(policies, i, const char *);
-            policy = ssl_policy_lookup(p, name);
-            if (policy) {
-                mrg = ssl_config_perdir_merge(p, policy->dc, dc);
-                /* apply in place */
-                memcpy(dc, mrg, sizeof(*dc));
-            }
-            else {
-                dc->error_policy = name;
-                break;
-                /* report error policies in post_config */
-            }
-        }
+    policy = ssl_policy_lookup(cmd->pool, arg);
+    if (policy) {
+        mrg = ssl_config_server_merge(cmd->pool, policy->sc, sc);
+        /* apply in place */
+        memcpy(sc, mrg, sizeof(*sc));
+        return NULL;
     }
+    return apr_pstrcat(cmd->pool,
+                       "An SSLPolicy with the name '", arg,
+                       "' does not exist", NULL);
 }
 
 /*
@@ -2366,8 +2207,6 @@ const char *ssl_cmd_SSLOCSPResponderCertificateFile(cmd_parms *cmd, void *dcfg,
 
 static void ssl_srv_dump(SSLSrvConfigRec *sc, apr_pool_t *p, 
                             apr_file_t *out, const char *indent, const char **psep);
-static void ssl_dir_dump(SSLDirConfigRec *dc, apr_pool_t *p, 
-                         apr_file_t *out, const char *indent, const char **psep);
 static void ssl_policy_dump(SSLPolicyRec *policy, apr_pool_t *p, 
                             apr_file_t *out, const char *indent);
 
@@ -2622,20 +2461,6 @@ static void val_crl_check_dump(apr_file_t *out, const char *key, int mask,
     }
 }
 
-static void val_option_dump(apr_file_t *out, const char *key, const char *optname,
-                            int val, int set_mask, int add_mask, int del_mask, 
-                            apr_pool_t *p, const char *indent, const char **psep)
-{
-    const char *op = ((val & set_mask)? "" : 
-                      ((val & add_mask)? "+" :
-                       (val & del_mask)? "-" : NULL));
-    if (op) {
-        apr_file_printf(out, "%s\n%s\"%s\": \"%s%s\"", *psep, indent, key, op, 
-                        json_quote(optname, p));
-        *psep = ", ";
-    }
-}
-
 static const char *protocol_str(ssl_proto_t proto, apr_pool_t *p)
 {
     if (SSL_PROTOCOL_NONE == proto) {
@@ -2798,34 +2623,6 @@ static void ssl_srv_dump(SSLSrvConfigRec *sc, apr_pool_t *p,
     DMP_ON_OFF("SSLFIPS", sc->fips);
 #endif
     DMP_ON_OFF("SSLSessionTickets", sc->session_tickets);
-    DMP_STRARR("SSLPolicy", sc->policies);
-}
-
-static void ssl_dir_dump(SSLDirConfigRec *dc, apr_pool_t *p, 
-                         apr_file_t *out, const char *indent, const char **psep)
-{
-    int i;
-    
-    DMP_ON_OFF("SSLProxyEngine", dc->proxy_enabled);
-
-    modssl_ctx_dump(dc->proxy, p, 1, out, indent, psep);
-
-    if (dc->bSSLRequired == TRUE) {
-        DMP_ON_OFF("SSLRequireSSL", dc->bSSLRequired);
-    }
-    if (dc->aRequirement && dc->aRequirement->nelts > 0) {
-        ssl_require_t *r = (ssl_require_t *)dc->aRequirement->elts;
-        for (i = 0; i < dc->aRequirement->nelts; ++i, ++r) {
-            DMP_STRING("SSLRequire", r->cpExpr);
-        }
-    }
-    DMP_OPTION("StdEnvVars", SSL_OPT_STDENVVARS);
-    DMP_OPTION("ExportCertData", SSL_OPT_EXPORTCERTDATA);
-    DMP_OPTION("FakeBasicAuth", SSL_OPT_FAKEBASICAUTH);
-    DMP_OPTION("StrictRequire", SSL_OPT_STRICTREQUIRE);
-    DMP_OPTION("OptRenegotiate", SSL_OPT_OPTRENEGOTIATE);
-    DMP_OPTION("LegacyDNStringFormat", SSL_OPT_LEGACYDNFORMAT);
-    DMP_STRARR("SSLProxyPolicy", dc->policies);
 }
 
 static void ssl_policy_dump(SSLPolicyRec *policy, apr_pool_t *p, 
@@ -2835,9 +2632,6 @@ static void ssl_policy_dump(SSLPolicyRec *policy, apr_pool_t *p,
     if (policy->sc) {
         ssl_srv_dump(policy->sc, p, out, indent, &sep);
     }
-    if (policy->dc) {
-        ssl_dir_dump(policy->dc, p, out, indent, &sep);
-    }
 }
 
 
index 347631444e661ce78ee2179723beccf135f00e97..8ac64d15715f7d84113fca76c0d654740ba8860c 100644 (file)
@@ -297,13 +297,6 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
             sc->fips = FALSE;
         }
 #endif
-
-        if (sc->error_policy) {
-            rv = ssl_policy_lookup(p, sc->error_policy)? APR_EGENERAL : APR_ENOENT;
-            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(10094) 
-                         "Applying SSLPolicy '%s'", sc->error_policy);
-            return rv;
-        }
     }
 
 #if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API
index 5ce55b75ea44295307b3ab910ba82b1d2e8fed43..8b5e070b11feeac988c7e8e65cbee8dabecc7238 100644 (file)
@@ -51,8 +51,6 @@
 #define SSL_POLICY_HONOR_ORDER              1
 #define SSL_POLICY_COMPRESSION              0
 #define SSL_POLICY_SESSION_TICKETS          0
-#define SSL_POLICY_PROXY_VERIFY_MODE        SSL_CVERIFY_REQUIRE
-#define SSL_POLICY_PROXY_VERIFY_DEPTH       -1
 
 /**
  * Define a core set of policies that are always there:
index 164053c8d1bc8a84e70300fba83eea8b627dede2..16e3de7faff3d9695265ed7fbc4bbb6c8f75d8e5 100644 (file)
@@ -51,8 +51,6 @@
 #define SSL_POLICY_HONOR_ORDER              1
 #define SSL_POLICY_COMPRESSION              0
 #define SSL_POLICY_SESSION_TICKETS          0
-#define SSL_POLICY_PROXY_VERIFY_MODE        SSL_CVERIFY_REQUIRE
-#define SSL_POLICY_PROXY_VERIFY_DEPTH       -1
 
 /**
  * Define a core set of policies that are always there:
index 2260f0c2872b126d7c3c8a86d162821cd94d334d..e3f3aa5abc2a892182013986ca93ae19bc0fb547 100644 (file)
@@ -742,8 +742,6 @@ struct SSLSrvConfigRec {
 #endif
     BOOL             session_tickets;
     
-    apr_array_header_t *policies;      /* policy that shall be applied to this config */
-    const char      *error_policy;     /* error in policy merge, bubble up */
     server_addr_rec *enabled_on;       /* optional list of addresses where ssl is enabled */
 };
 
@@ -767,16 +765,12 @@ struct SSLDirConfigRec {
     modssl_ctx_t *proxy;
     BOOL          proxy_enabled;
     BOOL          proxy_post_config;
-
-    apr_array_header_t *policies;      /* policy that shall be applied to this config */
-    const char      *error_policy;     /* error in policy merge, bubble up */
 };
 
 typedef struct SSLPolicyRec SSLPolicyRec;
 struct SSLPolicyRec {
     const char *name;
     SSLSrvConfigRec *sc;
-    SSLDirConfigRec *dc;
 };
 
 SSLPolicyRec *ssl_policy_lookup(apr_pool_t *pool, const char *name);
@@ -798,7 +792,6 @@ void        *ssl_config_perdir_create(apr_pool_t *, char *);
 void        *ssl_config_perdir_merge(apr_pool_t *, void *, void *);
 void         ssl_config_proxy_merge(apr_pool_t *,
                                     SSLDirConfigRec *, SSLDirConfigRec *);
-const char  *ssl_cmd_SSLPolicyDefine(cmd_parms *, void *, const char *);
 const char  *ssl_cmd_SSLPolicyApply(cmd_parms *, void *, const char *);
 const char  *ssl_cmd_SSLPassPhraseDialog(cmd_parms *, void *, const char *);
 const char  *ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *);
@@ -831,7 +824,6 @@ const char  *ssl_cmd_SSLRenegBufferSize(cmd_parms *cmd, void *dcfg, const char *
 const char  *ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag);
 const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag);
 
-const char  *ssl_cmd_SSLProxyPolicyApply(cmd_parms *, void *, const char *);
 const char  *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
 const char  *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
 const char  *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *);