MINOR: ssl: add global statement tune.ssl.force-private-cache.
Boolean: used to force a private ssl session cache for each process in
case of nbproc > 1.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 7176b59..6067409 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -594,6 +594,9 @@
global.tune.chksize = atol(args[1]);
}
#ifdef USE_OPENSSL
+ else if (!strcmp(args[0], "tune.ssl.force-private-cache")) {
+ global.tune.sslprivatecache = 1;
+ }
else if (!strcmp(args[0], "tune.ssl.cachesize")) {
if (*(args[1]) == 0) {
Alert("parsing [%s:%d] : '%s' expects an integer argument.\n", file, linenum, args[0]);
@@ -6760,7 +6763,7 @@
continue;
}
- alloc_ctx = shared_context_init(global.tune.sslcachesize, (global.nbproc > 1) ? 1 : 0);
+ alloc_ctx = shared_context_init(global.tune.sslcachesize, (!global.tune.sslprivatecache && (global.nbproc > 1)) ? 1 : 0);
if (alloc_ctx < 0) {
if (alloc_ctx == SHCTX_E_INIT_LOCK) {
Warning("Unable to init lock for the shared SSL session cache. Falling back to private cache.\n");