Move SSL session data deserialization up out of the session cache
storage providers; includes a significant change to the shmcb storage structure: * modules/ssl/ssl_private.h (modssl_sesscache_provider): Change retrieve function to take dest/destlen output buffer, to take a constant id paramater, and to return a BOOL. * modules/ssl/ssl_scache.c (ssl_scache_retrieve): Update accordingly, perform SSL deserialization here. * modules/ssl/ssl_scache_dc.c (ssl_scache_dc_retrieve), modules/ssl/ssl_scache_dbm.c (ssl_scache_dbm_retrieve), modules/ssl/ssl_scache_memcache.c (ssl_scache_mc_retrieve): Update accordingly. * modules/ssl/ssl_scache_shmcb.c: Store the whole ID in the cache before the data, so that each index can be compared against the requested ID without deserializing the data. This requires approx 20% extra storage per session in the common case, though should reduce CPU overhead in some retrieval paths. (SHMCBIndex): Replace s_id2 field with id_len. (shmcb_cyclic_memcmp): New function. (ssl_scache_shmcb_init): Change the heuristics to allow for increase in per-session storage requirement. (ssl_scache_shmcb_retrieve): Drop requirement on ID length. (shmcb_subcache_store): Store the ID in the cyclic buffer. (shmcb_subcache_retrieve, shmcb_subcache_remove): Compare against the stored ID rather than deserializing the data. (ssl_scache_shmcb_retrieve, ssl_scache_shmcb_store): Update accordingly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630307 13f79535-47bb-0310-9956-ffa450edef68
parent
12f3bc92
Please register or sign in to comment