From 3bc7015b0673a7431028b69c0d56d0217b79bebd Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 27 Feb 2021 13:38:35 +0000 Subject: Identify DTLS based on the version major value. This avoids the need to match specific DTLS version numbers. --- src/lib/libssl/tls12_record_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libssl/tls12_record_layer.c') diff --git a/src/lib/libssl/tls12_record_layer.c b/src/lib/libssl/tls12_record_layer.c index 05465e430b..f090e2d940 100644 --- a/src/lib/libssl/tls12_record_layer.c +++ b/src/lib/libssl/tls12_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls12_record_layer.c,v 1.17 2021/01/28 18:32:46 jsing Exp $ */ +/* $OpenBSD: tls12_record_layer.c,v 1.18 2021/02/27 13:38:35 jsing Exp $ */ /* * Copyright (c) 2020 Joel Sing * @@ -250,7 +250,7 @@ void tls12_record_layer_set_version(struct tls12_record_layer *rl, uint16_t version) { rl->version = version; - rl->dtls = (version == DTLS1_VERSION); + rl->dtls = ((version >> 8) == DTLS1_VERSION_MAJOR); } void -- cgit v1.2.3-55-g6feb