From 0c8fc308e45029ff43e36ab5936f3e7369954aa2 Mon Sep 17 00:00:00 2001 From: Hakase Date: Thu, 25 Apr 2019 10:30:22 +0900 Subject: [PATCH] Add patch - Session time --- openssl-3.0.0-session_tls13.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 openssl-3.0.0-session_tls13.patch diff --git a/openssl-3.0.0-session_tls13.patch b/openssl-3.0.0-session_tls13.patch new file mode 100644 index 0000000..0fa3a80 --- /dev/null +++ b/openssl-3.0.0-session_tls13.patch @@ -0,0 +1,29 @@ +diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c +index d04b4fab77..d240f3595c 100644 +--- a/ssl/ssl_sess.c ++++ b/ssl/ssl_sess.c +@@ -403,7 +403,10 @@ int ssl_get_new_session(SSL *s, int session) + if (s->session_ctx->session_timeout == 0) + ss->timeout = SSL_get_default_timeout(s); + else +- ss->timeout = s->session_ctx->session_timeout; ++ if (SSL_IS_TLS13(s)) ++ ss->timeout = (60 * 60 * 24 * 2); /* 172800 = 2 days */ ++ else ++ ss->timeout = s->session_ctx->session_timeout; + + SSL_SESSION_free(s->session); + s->session = NULL; +@@ -1019,8 +1022,11 @@ long SSL_CTX_set_timeout(SSL_CTX *s, long t) + long l; + if (s == NULL) + return 0; ++ if (SSL_IS_TLS13(s)) ++ s->session_timeout = 60 * 60 * 24 * 2; /* 172800 */ ++ else ++ s->session_timeout = t; + l = s->session_timeout; +- s->session_timeout = t; + return l; + } +