From 22615c792160a29edd331cfa7f314f93bb51a790 Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 14 Apr 2013 08:23:48 +0200 Subject: [PATCH] correctly support default cache in ssl session scaling --- core/ssl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/ssl.c b/core/ssl.c index 5681df19..9784c1e0 100644 --- a/core/ssl.c +++ b/core/ssl.c @@ -252,8 +252,14 @@ SSL_CTX *uwsgi_ssl_new_server_context(char *name, char *crt, char *key, char *ci uwsgi.ssl_sessions_cache = uwsgi_cache_by_name(uwsgi.ssl_sessions_use_cache); if (!uwsgi.ssl_sessions_cache) { - uwsgi_log("unable to find cache \"%s\"\n", uwsgi.ssl_sessions_use_cache ? uwsgi.ssl_sessions_use_cache : "default"); - exit(1); + // check for default cache + if (!strcmp(uwsgi.ssl_sessions_use_cache, "true") && uwsgi.caches) { + uwsgi.ssl_sessions_cache = uwsgi.caches; + } + else { + uwsgi_log("unable to find cache \"%s\"\n", uwsgi.ssl_sessions_use_cache ? uwsgi.ssl_sessions_use_cache : "default"); + exit(1); + } } if (!uwsgi.ssl_sessions_cache->max_items) {