summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <>2020-09-17 15:23:29 +0000
committerjsing <>2020-09-17 15:23:29 +0000
commit8b329cf90019dcaa45de44d9c3b2eed853ec9429 (patch)
treeab0f21a1d37a85215ffbd688a792523e6b1b6726 /src/lib/libssl/ssl_locl.h
parentc48a963f213a6f89d842f72d054aaa8907dee25f (diff)
downloadopenbsd-8b329cf90019dcaa45de44d9c3b2eed853ec9429.tar.gz
openbsd-8b329cf90019dcaa45de44d9c3b2eed853ec9429.tar.bz2
openbsd-8b329cf90019dcaa45de44d9c3b2eed853ec9429.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 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h8
1 files changed, 3 insertions, 5 deletions
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 @@
1/* $OpenBSD: ssl_locl.h,v 1.292 2020/09/15 09:41:24 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.293 2020/09/17 15:23:29 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 *
@@ -1131,10 +1131,8 @@ const SSL_METHOD *tls_legacy_method(void);
1131const SSL_METHOD *tls_legacy_client_method(void); 1131const SSL_METHOD *tls_legacy_client_method(void);
1132const SSL_METHOD *tls_legacy_server_method(void); 1132const SSL_METHOD *tls_legacy_server_method(void);
1133 1133
1134const SSL_METHOD *dtls1_get_client_method(int ver); 1134const SSL_METHOD *ssl_get_client_method(uint16_t version);
1135const SSL_METHOD *dtls1_get_server_method(int ver); 1135const SSL_METHOD *ssl_get_server_method(uint16_t version);
1136const SSL_METHOD *tls1_get_client_method(int ver);
1137const SSL_METHOD *tls1_get_server_method(int ver);
1138 1136
1139extern SSL3_ENC_METHOD DTLSv1_enc_data; 1137extern SSL3_ENC_METHOD DTLSv1_enc_data;
1140extern SSL3_ENC_METHOD TLSv1_enc_data; 1138extern SSL3_ENC_METHOD TLSv1_enc_data;