diff src/event/ngx_event_openssl.h @ 274:052a7b1d40e5 NGINX_0_5_7

nginx 0.5.7 *) Feature: the ssl_session_cache storage optimization. *) Bugfixes in the "ssl_session_cache" and "limit_zone" directives. *) Bugfix: the segmentation fault was occurred on start or while reconfiguration if the "ssl_session_cache" or "limit_zone" directives were used on 64-bit platforms. *) Bugfix: a segmentation fault occurred if the "add_before_body" or "add_after_body" directives were used and there was no "Content-Type" header line in response. *) Bugfix: the OpenSSL library was always built with the threads support. Thanks to Den Ivanov. *) Bugfix: the PCRE-6.5+ library and the icc compiler compatibility.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Jan 2007 00:00:00 +0300
parents 29a6403156b0
children 9121a0a91f47
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -55,33 +55,29 @@ typedef struct {
 #define NGX_SSL_NO_BUILTIN_SCACHE    -3
 
 
-typedef struct ngx_ssl_cached_sess_s  ngx_ssl_cached_sess_t;
-
+#define NGX_SSL_MAX_SESSION_SIZE (4096)
 
-#define NGX_SSL_MAX_SESSION_SIZE (4096 - offsetof(ngx_ssl_cached_sess_t, asn1))
+typedef struct ngx_ssl_sess_id_s  ngx_ssl_sess_id_t;
 
-
-typedef struct {
+struct ngx_ssl_sess_id_s {
     ngx_rbtree_node_t           node;
     u_char                     *id;
     size_t                      len;
-    ngx_ssl_cached_sess_t      *session;
-} ngx_ssl_sess_id_t;
-
-
-struct ngx_ssl_cached_sess_s {
-    ngx_ssl_cached_sess_t      *prev;
-    ngx_ssl_cached_sess_t      *next;
+    u_char                     *session;
+    ngx_ssl_sess_id_t          *prev;
+    ngx_ssl_sess_id_t          *next;
     time_t                      expire;
-    ngx_ssl_sess_id_t          *sess_id;
-    u_char                      asn1[1];
+#if (NGX_PTR_SIZE == 8)
+    void                       *stub;
+    u_char                      sess_id[32];
+#endif
 };
 
 
 typedef struct {
     ngx_rbtree_t               *session_rbtree;
-    ngx_ssl_cached_sess_t       session_cache_head;
-    ngx_ssl_cached_sess_t       session_cache_tail;
+    ngx_ssl_sess_id_t           session_cache_head;
+    ngx_ssl_sess_id_t           session_cache_tail;
 } ngx_ssl_session_cache_t;