Skip to content

Commit

Permalink
mod_ssl: Disallow SSLOpenSSLConfCmd within vhost context since it
Browse files Browse the repository at this point in the history
has global effect.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLOpenSSLConfCmd):
  Disallow use within vhost context.

PR: 69397


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921336 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Oct 15, 2024
1 parent 584ed86 commit fbf57b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changes-entries/pr69397.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*) mod_ssl: Disallow use of "SSLOpenSSLConfCmd" in <VirtualHost>
context. PR 69397. [Joe Orton]
3 changes: 1 addition & 2 deletions docs/manual/mod/mod_ssl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2935,8 +2935,7 @@ forward secrecy.</p>
<name>SSLOpenSSLConfCmd</name>
<description>Configure OpenSSL parameters through its <em>SSL_CONF</em> API</description>
<syntax>SSLOpenSSLConfCmd <em>command-name</em> <em>command-value</em></syntax>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>
<contextlist><context>server config</context></contextlist>
<compatibility>Available in httpd 2.4.8 and later, if using OpenSSL 1.0.2 or later</compatibility>

<usage>
Expand Down
4 changes: 4 additions & 0 deletions modules/ssl/ssl_engine_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,10 @@ const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg,
const char *err;
ssl_ctx_param_t *param;

if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
return err;
}

if (value_type == SSL_CONF_TYPE_UNKNOWN) {
return apr_psprintf(cmd->pool,
"'%s': invalid OpenSSL configuration command",
Expand Down

0 comments on commit fbf57b8

Please sign in to comment.