]> granicus.if.org Git - apache/commit
Move SSL session data deserialization up out of the session cache
authorJoe Orton <jorton@apache.org>
Fri, 22 Feb 2008 19:58:39 +0000 (19:58 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 22 Feb 2008 19:58:39 +0000 (19:58 +0000)
commitdb8d709066a03ae05be1eb77d5820819dd825ef8
tree5d8f0845093bb55b6d7fcc02d43ad5649d333272
parent7e085594337b2311c6aa5998fea413af8b774048
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
modules/ssl/ssl_private.h
modules/ssl/ssl_scache.c
modules/ssl/ssl_scache_dbm.c
modules/ssl/ssl_scache_dc.c
modules/ssl/ssl_scache_memcache.c
modules/ssl/ssl_scache_shmcb.c