Fix the backout commit
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f86beac7 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f86beac7 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f86beac7 Branch: refs/heads/6.0.x Commit: f86beac70ffb81b84662497827b1b0f338ebb41e Parents: 13c76b3 Author: Leif Hedstrom <zw...@apache.org> Authored: Tue Jul 28 17:38:37 2015 -0600 Committer: Leif Hedstrom <zw...@apache.org> Committed: Tue Jul 28 17:38:37 2015 -0600 ---------------------------------------------------------------------- iocore/net/SSLUtils.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f86beac7/iocore/net/SSLUtils.cc ---------------------------------------------------------------------- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 7ebce4b..e9f30a6 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -186,6 +186,14 @@ SSL_CTX_add_extra_chain_cert_file(SSL_CTX *ctx, const char *chainfile) return true; } +bool +ssl_session_timed_out(SSL_SESSION *session) +{ + return SSL_SESSION_get_timeout(session) < (long)(time(NULL) - SSL_SESSION_get_time(session)); +} + +static void ssl_rm_cached_session(SSL_CTX *ctx, SSL_SESSION *sess); + static SSL_SESSION * ssl_get_cached_session(SSL *ssl, unsigned char *id, int len, int *copy) { @@ -220,8 +228,7 @@ ssl_get_cached_session(SSL *ssl, unsigned char *id, int len, int *copy) } else { SSL_INCREMENT_DYN_STAT(ssl_session_cache_miss); } - - return NULL; + return session; } static int