Fix the SSL session timeout calculation

Issue:		#115
Reported by:	Eun Soo Park
pull/13/head
Daniel Roethlisberger 8 years ago
parent 73324dcd7b
commit b3a3c36b70

@ -1,6 +1,7 @@
### SSLsplit develop
- Fix SSL sessions to actually time out (patch by @eunsoopark, issue #115).
- Add XNU headers for OS X 10.11 El Capitan (issue #116).
- Fix EV_READ event re-enable bug that could lead to stalled connections
after throttling one direction (issue #109).

@ -1666,9 +1666,9 @@ ssl_session_is_valid(SSL_SESSION *sess)
if ((curtime < 0) || ((time_t)curtime != curtimet))
return 0;
timeout = SSL_SESSION_get_timeout(sess);
if (curtime > LONG_MAX - timeout)
if (curtime < timeout)
return 0;
return (SSL_SESSION_get_time(sess) < curtime + timeout);
return (SSL_SESSION_get_time(sess) > curtime - timeout);
}
/*

Loading…
Cancel
Save