summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r--src/lib/libssl/ssl_sess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 2ba8b9612e..5f12aa361c 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -118,7 +118,7 @@ SSL_SESSION *SSL_SESSION_new(void)
118 ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */ 118 ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
119 ss->references=1; 119 ss->references=1;
120 ss->timeout=60*5+4; /* 5 minute timeout by default */ 120 ss->timeout=60*5+4; /* 5 minute timeout by default */
121 ss->time=(unsigned long)time(NULL); 121 ss->time=time(NULL);
122 ss->prev=NULL; 122 ss->prev=NULL;
123 ss->next=NULL; 123 ss->next=NULL;
124 ss->compress_meth=0; 124 ss->compress_meth=0;
@@ -377,7 +377,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len)
377 CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION); 377 CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION);
378#endif 378#endif
379 379
380 if (ret->timeout < (long)(time(NULL) - ret->time)) /* timeout */ 380 if ((long)(ret->time+ret->timeout) < (long)time(NULL)) /* timeout */
381 { 381 {
382 s->ctx->stats.sess_timeout++; 382 s->ctx->stats.sess_timeout++;
383 /* remove it from the cache */ 383 /* remove it from the cache */