diff options
| author | jsing <> | 2020-07-07 19:31:11 +0000 |
|---|---|---|
| committer | jsing <> | 2020-07-07 19:31:11 +0000 |
| commit | af06ca6427e355a07e5ee9751f9d0ef96f73e5a7 (patch) | |
| tree | 1085279d989b13f602e3533c7b4f7b4447017733 /src/lib/libssl/ssl_lib.c | |
| parent | c4b64f051678a521c080a0715d1052aeb6286d7e (diff) | |
| download | openbsd-af06ca6427e355a07e5ee9751f9d0ef96f73e5a7.tar.gz openbsd-af06ca6427e355a07e5ee9751f9d0ef96f73e5a7.tar.bz2 openbsd-af06ca6427e355a07e5ee9751f9d0ef96f73e5a7.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 '')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 16 |
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 | ||
| 945 | static long | ||
| 946 | ssl_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 | |||
| 945 | long | 955 | long |
| 946 | SSL_get_default_timeout(const SSL *s) | 956 | SSL_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 | ||
| 951 | int | 961 | int |
| @@ -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; |
