diff options
author | Joe Orton <jorton@apache.org> | 2008-02-25 21:28:09 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2008-02-25 21:28:09 +0000 |
commit | b6317ebc810bc0490c2657398fb7db579a9f071f (patch) | |
tree | 6967e42b711e2a48207051cacb5f2b948980d4b3 /modules/ssl/ssl_engine_init.c | |
parent | 785c643624c582b9f9a0b4d8c1ea1af728eb3eba (diff) | |
download | httpd-b6317ebc810bc0490c2657398fb7db579a9f071f.tar.gz |
Session cache interface redesign, Part 5:
Use the ap_provider interface for session cache storage providers.
* modules/ssl/mod_ssl.c (modssl_register_scache): New function.
(ssl_register_hooks): Call it.
* modules/ssl/ssl_private.h: Define MODSSL_SESSCACHE_PROVIDER_GROUP
and MODSSL_SESSCACHE_PROVIDER_VERSION constants.
Remove ssl_scmode_t type. Change nSessionCacheMode in
SSLModConfigRec into a long sesscache_mode, storing the OpenSSL
SSL_SESS_CACHE_* flags directly.
* modules/ssl/ssl_engine_config.c (ssl_config_global_create): Set
sesscache_mode to SSL_SESS_CACHE_OFF by default.
(ssl_cmd_SSLSessionCache): Remove ifdef spaghetti; fetch configured
session cache by provider name. Set mc->sesscache_mode for
configured providers.
* modules/ssl/ssl_engine_init.c (ssl_init_ctx_session_cache): Use the
configured mode flags directly from mc->sesscache_mode.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@631000 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_engine_init.c')
-rw-r--r-- | modules/ssl/ssl_engine_init.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index 39c45828bc..df68601cc3 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -481,16 +481,8 @@ static void ssl_init_ctx_session_cache(server_rec *s, { SSL_CTX *ctx = mctx->ssl_ctx; SSLModConfigRec *mc = myModConfig(s); - long cache_mode = SSL_SESS_CACHE_OFF; - if (mc->nSessionCacheMode != SSL_SCMODE_NONE) { - /* SSL_SESS_CACHE_NO_INTERNAL will force OpenSSL - * to ignore process local-caching and - * to always get/set/delete sessions using mod_ssl's callbacks. - */ - cache_mode = SSL_SESS_CACHE_SERVER|SSL_SESS_CACHE_NO_INTERNAL; - } - SSL_CTX_set_session_cache_mode(ctx, cache_mode); + SSL_CTX_set_session_cache_mode(ctx, mc->sesscache_mode); if (mc->sesscache) { SSL_CTX_sess_set_new_cb(ctx, ssl_callback_NewSessionCacheEntry); |