summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2021-02-27 13:38:35 +0000
committerjsing <>2021-02-27 13:38:35 +0000
commit3bc7015b0673a7431028b69c0d56d0217b79bebd (patch)
tree073450e90d20e9ffcc54cfa02f9206fa8efe7919 /src/lib
parentf914bd4f3e8d02ef907d70fad806e645f65d1f16 (diff)
downloadopenbsd-3bc7015b0673a7431028b69c0d56d0217b79bebd.tar.gz
openbsd-3bc7015b0673a7431028b69c0d56d0217b79bebd.tar.bz2
openbsd-3bc7015b0673a7431028b69c0d56d0217b79bebd.zip
Identify DTLS based on the version major value.
This avoids the need to match specific DTLS version numbers.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/tls12_record_layer.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: tls12_record_layer.c,v 1.17 2021/01/28 18:32:46 jsing Exp $ */ 1/* $OpenBSD: tls12_record_layer.c,v 1.18 2021/02/27 13:38:35 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -250,7 +250,7 @@ void
250tls12_record_layer_set_version(struct tls12_record_layer *rl, uint16_t version) 250tls12_record_layer_set_version(struct tls12_record_layer *rl, uint16_t version)
251{ 251{
252 rl->version = version; 252 rl->version = version;
253 rl->dtls = (version == DTLS1_VERSION); 253 rl->dtls = ((version >> 8) == DTLS1_VERSION_MAJOR);
254} 254}
255 255
256void 256void