diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2020-09-17 15:23:30 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2020-09-17 15:23:30 +0000 |
commit | f54899523eb5d5d3b68a4401bf05ea642bb08754 (patch) | |
tree | b0dc3ef9cd8fe597f7d6e550f085ee8b0caa3540 /lib/libssl/ssl_locl.h | |
parent | 2c6687089e8711e26c6388eafd3160bff307297e (diff) |
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.h | 8 |
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; |