summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_methods.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-10-14 16:44:15 +0000
committerjsing <jsing@openbsd.org>2020-10-14 16:44:15 +0000
commit354e02d3863e354b89a34196bc9a9f80c45196b0 (patch)
tree06d92ad18243f86f8f49d31fef2f9a815fc92c7b /lib/libssl/ssl_methods.c
parentHook up dtls regress. (diff)
downloadwireguard-openbsd-354e02d3863e354b89a34196bc9a9f80c45196b0.tar.xz
wireguard-openbsd-354e02d3863e354b89a34196bc9a9f80c45196b0.zip
Mark DTLS methods as DTLS.
Rather than inferring DTLS from the method version, add a field that marks a method as specifically being DTLS. Have SSL_IS_DTLS condition on this rather than on version. ok tb@
Diffstat (limited to 'lib/libssl/ssl_methods.c')
-rw-r--r--lib/libssl/ssl_methods.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/ssl_methods.c b/lib/libssl/ssl_methods.c
index e2d5766e0f2..600aa89095f 100644
--- a/lib/libssl/ssl_methods.c
+++ b/lib/libssl/ssl_methods.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_methods.c,v 1.19 2020/10/11 12:45:52 guenther Exp $ */
+/* $OpenBSD: ssl_methods.c,v 1.20 2020/10/14 16:44:15 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -60,6 +60,7 @@
#include "tls13_internal.h"
static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = {
+ .dtls = 1,
.version = DTLS1_VERSION,
.min_version = DTLS1_VERSION,
.max_version = DTLS1_VERSION,
@@ -124,6 +125,7 @@ DTLS_server_method(void)
#if defined(LIBRESSL_HAS_TLS1_3_CLIENT) && defined(LIBRESSL_HAS_TLS1_3_SERVER)
static const SSL_METHOD_INTERNAL TLS_method_internal_data = {
+ .dtls = 0,
.version = TLS1_3_VERSION,
.min_version = TLS1_VERSION,
.max_version = TLS1_3_VERSION,
@@ -152,6 +154,7 @@ static const SSL_METHOD TLS_method_data = {
#endif
static const SSL_METHOD_INTERNAL TLS_legacy_method_internal_data = {
+ .dtls = 0,
.version = TLS1_2_VERSION,
.min_version = TLS1_VERSION,
.max_version = TLS1_2_VERSION,
@@ -179,6 +182,7 @@ static const SSL_METHOD TLS_legacy_method_data = {
};
static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = {
+ .dtls = 0,
.version = TLS1_VERSION,
.min_version = TLS1_VERSION,
.max_version = TLS1_VERSION,
@@ -206,6 +210,7 @@ static const SSL_METHOD TLSv1_method_data = {
};
static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = {
+ .dtls = 0,
.version = TLS1_1_VERSION,
.min_version = TLS1_1_VERSION,
.max_version = TLS1_1_VERSION,
@@ -233,6 +238,7 @@ static const SSL_METHOD TLSv1_1_method_data = {
};
static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = {
+ .dtls = 0,
.version = TLS1_2_VERSION,
.min_version = TLS1_2_VERSION,
.max_version = TLS1_2_VERSION,