summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2020-06-25 07:35:05 +0000
committertb <>2020-06-25 07:35:05 +0000
commitd5ef950f276f9e4913432b3c384f58170d2dca1f (patch)
tree1c4c8124a640a0421a72879e401d6019f8594079 /src
parent7f6da26dff879e33172ea80e6d58b78d96fd9f22 (diff)
downloadopenbsd-d5ef950f276f9e4913432b3c384f58170d2dca1f.tar.gz
openbsd-d5ef950f276f9e4913432b3c384f58170d2dca1f.tar.bz2
openbsd-d5ef950f276f9e4913432b3c384f58170d2dca1f.zip
Switch the order of the two tests in tls13_client_hello_required_extensions
to match the order they are listed in the RFC. No functional change.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/tls13_server.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index 843b572401..12601fa33d 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.59 2020/06/24 07:28:38 tb Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.60 2020/06/25 07:35:05 tb 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>
@@ -108,14 +108,6 @@ tls13_client_hello_required_extensions(struct tls13_ctx *ctx)
108 */ 108 */
109 109
110 /* 110 /*
111 * supported_groups and key_share must either both be present or
112 * both be absent.
113 */
114 if (tlsext_extension_seen(ssl, TLSEXT_TYPE_supported_groups) !=
115 tlsext_extension_seen(ssl, TLSEXT_TYPE_key_share))
116 return 0;
117
118 /*
119 * If we got no pre_shared_key, then signature_algorithms and 111 * If we got no pre_shared_key, then signature_algorithms and
120 * supported_groups must both be present. 112 * supported_groups must both be present.
121 */ 113 */
@@ -127,6 +119,14 @@ tls13_client_hello_required_extensions(struct tls13_ctx *ctx)
127 } 119 }
128 120
129 /* 121 /*
122 * supported_groups and key_share must either both be present or
123 * both be absent.
124 */
125 if (tlsext_extension_seen(ssl, TLSEXT_TYPE_supported_groups) !=
126 tlsext_extension_seen(ssl, TLSEXT_TYPE_key_share))
127 return 0;
128
129 /*
130 * XXX - Require server_name from client? If so, we SHOULD enforce 130 * XXX - Require server_name from client? If so, we SHOULD enforce
131 * this here - RFC 8446, 9.2. 131 * this here - RFC 8446, 9.2.
132 */ 132 */