1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Re-implement the SSL session cache abstraction using a vtable; first

step towards use of the ap_provider interface:

* modules/ssl/ssl_private.h (modssl_sesscache_provider): Add new
  vtable type.
  (SSLModConfigRec): Reference the vtable here.
  Replace all the ssl_scache_* prototypes with provider vtable objects.

* modules/ssl/ssl_scache.c (ssl_scache_init, ssl_scache_kill, 
  ssl_scache_retrieve, ssl_scache_store, ssl_scache_remove,
  ssl_ext_status_hook): Use callbacks from vtable rather than ifdef
  spaghetti.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_session_cache):
  Only install the OpenSSL callbacks if a vtable is configured.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Set up
  vtable pointer.

* modules/ssl/ssl_scache_dc.c, modules/ssl_scache_mc.c: Adjust to make
  implementations static, and add vtable definition.

* modules/ssl_scache_shmcb.c: Likewise; also move the init
  one-per-process requirement down here.

* modules/ssl_scache_dbm.c: Likewise; also (temporarily) use a local
  subpool in the store callback.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2008-02-22 11:36:51 +00:00
parent c40628c172
commit fb38ad47ec
8 changed files with 132 additions and 158 deletions

View File

@@ -492,9 +492,11 @@ static void ssl_init_ctx_session_cache(server_rec *s,
SSL_CTX_set_session_cache_mode(ctx, cache_mode);
SSL_CTX_sess_set_new_cb(ctx, ssl_callback_NewSessionCacheEntry);
SSL_CTX_sess_set_get_cb(ctx, ssl_callback_GetSessionCacheEntry);
SSL_CTX_sess_set_remove_cb(ctx, ssl_callback_DelSessionCacheEntry);
if (mc->sesscache) {
SSL_CTX_sess_set_new_cb(ctx, ssl_callback_NewSessionCacheEntry);
SSL_CTX_sess_set_get_cb(ctx, ssl_callback_GetSessionCacheEntry);
SSL_CTX_sess_set_remove_cb(ctx, ssl_callback_DelSessionCacheEntry);
}
}
static void ssl_init_ctx_callbacks(server_rec *s,