mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Allow
using socache provider config defaults by omitting the arguments, so e.g. "SSLSessionCache shmcb" or even "SSLSessionCache default" should now DTRT. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -949,7 +949,7 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
|
||||
const char *arg)
|
||||
{
|
||||
SSLModConfigRec *mc = myModConfig(cmd->server);
|
||||
const char *err, *sep;
|
||||
const char *err, *sep, *name;
|
||||
long enabled_flags;
|
||||
|
||||
if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
|
||||
@@ -974,8 +974,16 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
|
||||
* doing it by default if "none" is used. */
|
||||
mc->sesscache_mode = enabled_flags;
|
||||
}
|
||||
else if ((sep = ap_strchr_c(arg, ':')) != NULL) {
|
||||
char *name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
|
||||
else {
|
||||
/* Argument is of form 'name:args' or just 'name'. */
|
||||
sep = ap_strchr_c(arg, ':');
|
||||
if (sep) {
|
||||
name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
|
||||
sep++;
|
||||
}
|
||||
else {
|
||||
name = arg;
|
||||
}
|
||||
|
||||
/* Find the provider of given name. */
|
||||
mc->sesscache = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP,
|
||||
@@ -984,7 +992,7 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
|
||||
if (mc->sesscache) {
|
||||
/* Cache found; create it, passing anything beyond the colon. */
|
||||
mc->sesscache_mode = enabled_flags;
|
||||
err = mc->sesscache->create(&mc->sesscache_context, sep + 1,
|
||||
err = mc->sesscache->create(&mc->sesscache_context, sep,
|
||||
cmd->temp_pool, cmd->pool);
|
||||
}
|
||||
else {
|
||||
@@ -1002,10 +1010,6 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
|
||||
"(known names: %s)", name, all_names);
|
||||
}
|
||||
}
|
||||
else {
|
||||
err = apr_psprintf(cmd->pool, "'%s' session cache not supported or missing argument",
|
||||
arg);
|
||||
}
|
||||
|
||||
if (err) {
|
||||
return apr_psprintf(cmd->pool, "SSLSessionCache: %s", err);
|
||||
|
Reference in New Issue
Block a user