summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-09-17 15:23:29 +0000
committerjsing <jsing@openbsd.org>2020-09-17 15:23:29 +0000
commitbfc125def3cf0f5ce55e16d56d0074d883706f74 (patch)
treee548ee5ca9a6d30f6da28dfc46c9419e34f16970 /lib/libssl/ssl_locl.h
parentFix the previous commit whose conditions were reversed. (diff)
downloadwireguard-openbsd-bfc125def3cf0f5ce55e16d56d0074d883706f74.tar.xz
wireguard-openbsd-bfc125def3cf0f5ce55e16d56d0074d883706f74.zip
Simplify SSL method lookups.
There are three places where we call tls1_get_{client,server}_method() and if that returns NULL, call dtls1_get_{client,server}_method(). Simplify this by combining the lookup into a single function. While here also use uint16_t for version types. ok inoguchi@ millert@
Diffstat (limited to 'lib/libssl/ssl_locl.h')
-rw-r--r--lib/libssl/ssl_locl.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h
index 4ac6b76cd37..a3b8a805720 100644
--- a/lib/libssl/ssl_locl.h
+++ b/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_locl.h,v 1.292 2020/09/15 09:41:24 jsing Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.293 2020/09/17 15:23:29 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1131,10 +1131,8 @@ const SSL_METHOD *tls_legacy_method(void);
const SSL_METHOD *tls_legacy_client_method(void);
const SSL_METHOD *tls_legacy_server_method(void);
-const SSL_METHOD *dtls1_get_client_method(int ver);
-const SSL_METHOD *dtls1_get_server_method(int ver);
-const SSL_METHOD *tls1_get_client_method(int ver);
-const SSL_METHOD *tls1_get_server_method(int ver);
+const SSL_METHOD *ssl_get_client_method(uint16_t version);
+const SSL_METHOD *ssl_get_server_method(uint16_t version);
extern SSL3_ENC_METHOD DTLSv1_enc_data;
extern SSL3_ENC_METHOD TLSv1_enc_data;