summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2020-05-13 17:53:15 +0000
committerjsing <>2020-05-13 17:53:15 +0000
commit17c83fde24fc5a6293d9a7cd999bf4dd8ee866da (patch)
tree0ff0eb0bda38440abe92bbc5472954e54183d52a /src
parentba1709c6646816bffd9caeb42503abf95c44e3e2 (diff)
downloadopenbsd-17c83fde24fc5a6293d9a7cd999bf4dd8ee866da.tar.gz
openbsd-17c83fde24fc5a6293d9a7cd999bf4dd8ee866da.tar.bz2
openbsd-17c83fde24fc5a6293d9a7cd999bf4dd8ee866da.zip
Switch back to the legacy stack where the maximum is less than TLSv1.3.
This allows a server configured to only support TLSv1.2 and earlier, to correctly handle connections from a TLSv1.3 capable client. Issue reported by pvk@ ok inoguchi@ tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/tls13_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index ec612df90e..cd5f19afeb 100644
--- a/src/lib/libssl/tls13_server.c
+++ b/src/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_server.c,v 1.45 2020/05/11 17:49:46 jsing Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.46 2020/05/13 17:53:15 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -115,7 +115,7 @@ tls13_client_hello_process(struct tls13_ctx *ctx, CBS *cbs)
115 if (!CBS_get_u8_length_prefixed(cbs, &compression_methods)) 115 if (!CBS_get_u8_length_prefixed(cbs, &compression_methods))
116 goto err; 116 goto err;
117 117
118 if (tls13_client_hello_is_legacy(cbs)) { 118 if (tls13_client_hello_is_legacy(cbs) || s->version < TLS1_3_VERSION) {
119 if (!CBS_skip(cbs, CBS_len(cbs))) 119 if (!CBS_skip(cbs, CBS_len(cbs)))
120 goto err; 120 goto err;
121 return tls13_use_legacy_server(ctx); 121 return tls13_use_legacy_server(ctx);