diff options
author | Lutz Jänicke <jaenicke@openssl.org> | 2002-02-08 15:15:04 +0000 |
---|---|---|
committer | Lutz Jänicke <jaenicke@openssl.org> | 2002-02-08 15:15:04 +0000 |
commit | 4de920c91d7240fb0818d81eec3d8cd87ca0424a (patch) | |
tree | b915b57fe57e5deb34450d4334177ef3be90297c /ssl/ssl_lib.c | |
parent | 3cd039dd8fc8fdfd4d34bd9a3b37312b836794a7 (diff) |
Do not store unneeded data.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 49e22bf7fc..1195171a57 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1646,9 +1646,10 @@ void ssl_update_cache(SSL *s,int mode) * and it would be rather hard to do anyway :-) */ if (s->session->session_id_length == 0) return; - if ((s->ctx->session_cache_mode & mode) - && (!s->hit) - && SSL_CTX_add_session(s->ctx,s->session) + i=s->ctx->session_cache_mode; + if ((i & mode) && (!s->hit) + && ((i & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP) + || SSL_CTX_add_session(s->ctx,s->session)) && (s->ctx->new_session_cb != NULL)) { CRYPTO_add(&s->session->references,1,CRYPTO_LOCK_SSL_SESSION); @@ -1657,7 +1658,6 @@ void ssl_update_cache(SSL *s,int mode) } /* auto flush every 255 connections */ - i=s->ctx->session_cache_mode; if ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) && ((i & mode) == mode)) { |