summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <>2020-07-07 19:31:11 +0000
committerjsing <>2020-07-07 19:31:11 +0000
commitfbb23402e63e54d6d2231406a88302014f0c6ca6 (patch)
tree1085279d989b13f602e3533c7b4f7b4447017733 /src/lib/libssl/ssl_lib.c
parenta61f9f14c0b9e8d1dff514c4937c7c2167ebb243 (diff)
downloadopenbsd-fbb23402e63e54d6d2231406a88302014f0c6ca6.tar.gz
openbsd-fbb23402e63e54d6d2231406a88302014f0c6ca6.tar.bz2
openbsd-fbb23402e63e54d6d2231406a88302014f0c6ca6.zip
Remove some unnecessary function pointers from SSL_METHOD_INTERNAL.
ssl_version is completely unused and get_timeout is the same everywhere. ok beck@ inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 6ef2083f52..b93a851507 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.217 2020/05/23 12:14:52 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.218 2020/07/07 19:31:11 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -942,10 +942,20 @@ SSL_is_server(const SSL *s)
942 return s->server; 942 return s->server;
943} 943}
944 944
945static long
946ssl_get_default_timeout()
947{
948 /*
949 * 2 hours, the 24 hours mentioned in the TLSv1 spec
950 * is way too long for http, the cache would over fill.
951 */
952 return (2 * 60 * 60);
953}
954
945long 955long
946SSL_get_default_timeout(const SSL *s) 956SSL_get_default_timeout(const SSL *s)
947{ 957{
948 return (s->method->internal->get_timeout()); 958 return (ssl_get_default_timeout());
949} 959}
950 960
951int 961int
@@ -1752,7 +1762,7 @@ SSL_CTX_new(const SSL_METHOD *meth)
1752 ret->internal->session_cache_tail = NULL; 1762 ret->internal->session_cache_tail = NULL;
1753 1763
1754 /* We take the system default */ 1764 /* We take the system default */
1755 ret->session_timeout = meth->internal->get_timeout(); 1765 ret->session_timeout = ssl_get_default_timeout();
1756 1766
1757 ret->internal->new_session_cb = 0; 1767 ret->internal->new_session_cb = 0;
1758 ret->internal->remove_session_cb = 0; 1768 ret->internal->remove_session_cb = 0;