summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls12_record_layer.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2021-02-27 13:38:35 +0000
committerjsing <jsing@openbsd.org>2021-02-27 13:38:35 +0000
commitfe0929e2b6926a8a2cb7f8acf39a017d563f3587 (patch)
tree5a7858e1c737a52b18b973892099191bdd69e936 /lib/libssl/tls12_record_layer.c
parentAdd dobeep functions that take messages to basic.c. (diff)
downloadwireguard-openbsd-fe0929e2b6926a8a2cb7f8acf39a017d563f3587.tar.xz
wireguard-openbsd-fe0929e2b6926a8a2cb7f8acf39a017d563f3587.zip
Identify DTLS based on the version major value.
This avoids the need to match specific DTLS version numbers.
Diffstat (limited to 'lib/libssl/tls12_record_layer.c')
-rw-r--r--lib/libssl/tls12_record_layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/tls12_record_layer.c b/lib/libssl/tls12_record_layer.c
index 05465e430b5..f090e2d940a 100644
--- a/lib/libssl/tls12_record_layer.c
+++ b/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 <jsing@openbsd.org>
*
@@ -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