From 8b329cf90019dcaa45de44d9c3b2eed853ec9429 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 17 Sep 2020 15:23:29 +0000 Subject: 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@ --- src/lib/libssl/ssl_locl.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/libssl/ssl_locl.h') diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 4ac6b76cd3..a3b8a80572 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/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; -- cgit v1.2.3-55-g6feb