aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2010-11-16 15:05:00 +0100
committerGravatar Nikos Mavrogiannopoulos 2010-11-16 15:05:30 +0100
commitb59327cde81cddced2a35742bd203c242669d6dc (patch)
treefb1c4df3e8baa6853cb550911eb175f97d662e08 /src
parente02dd8c03ce5b66c81a47830eebe73a21ce71002 (diff)
GnuTLSCache can now take a single argument (none).
Diffstat (limited to 'src')
-rw-r--r--src/gnutls_config.c5
-rw-r--r--src/gnutls_hooks.c3
-rw-r--r--src/mod_gnutls.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gnutls_config.c b/src/gnutls_config.c
index fc3e166..517dbfb 100644
--- a/src/gnutls_config.c
+++ b/src/gnutls_config.c
@@ -370,6 +370,8 @@ const char *mgs_set_cache(cmd_parms * parms, void *dummy,
370 370
371 if (strcasecmp("none", type) == 0) { 371 if (strcasecmp("none", type) == 0) {
372 sc->cache_type = mgs_cache_none; 372 sc->cache_type = mgs_cache_none;
373 sc->cache_config = NULL;
374 return NULL;
373 } else if (strcasecmp("dbm", type) == 0) { 375 } else if (strcasecmp("dbm", type) == 0) {
374 sc->cache_type = mgs_cache_dbm; 376 sc->cache_type = mgs_cache_dbm;
375 } else if (strcasecmp("gdbm", type) == 0) { 377 } else if (strcasecmp("gdbm", type) == 0) {
@@ -383,6 +385,9 @@ const char *mgs_set_cache(cmd_parms * parms, void *dummy,
383 else { 385 else {
384 return "Invalid Type for GnuTLSCache!"; 386 return "Invalid Type for GnuTLSCache!";
385 } 387 }
388
389 if (arg == NULL)
390 return "Invalid argument 2 for GnuTLSCache!";
386 391
387 if (sc->cache_type == mgs_cache_dbm 392 if (sc->cache_type == mgs_cache_dbm
388 || sc->cache_type == mgs_cache_gdbm) { 393 || sc->cache_type == mgs_cache_gdbm) {
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c
index 34c3585..2999aae 100644
--- a/src/gnutls_hooks.c
+++ b/src/gnutls_hooks.c
@@ -506,9 +506,6 @@ void mgs_hook_child_init(apr_pool_t * p, server_rec * s)
506 ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, 506 ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
507 "[GnuTLS] - Failed to run Cache Init"); 507 "[GnuTLS] - Failed to run Cache Init");
508 } 508 }
509 } else {
510 ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
511 "[GnuTLS] - No Cache Configured. Hint: GnuTLSCache");
512 } 509 }
513} 510}
514 511
diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c
index 49f4e43..713c2e6 100644
--- a/src/mod_gnutls.c
+++ b/src/mod_gnutls.c
@@ -119,7 +119,7 @@ static const command_rec mgs_config_cmds[] = {
119 NULL, 119 NULL,
120 RSRC_CONF, 120 RSRC_CONF,
121 "Cache Timeout"), 121 "Cache Timeout"),
122 AP_INIT_TAKE2("GnuTLSCache", mgs_set_cache, 122 AP_INIT_TAKE12("GnuTLSCache", mgs_set_cache,
123 NULL, 123 NULL,
124 RSRC_CONF, 124 RSRC_CONF,
125 "Cache Configuration"), 125 "Cache Configuration"),