diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/tls13_server.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c index 4ac84a808c..815c394737 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.96 2022/02/03 16:33:12 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_server.c,v 1.97 2022/06/03 13:26:13 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,10 +108,15 @@ tls13_client_hello_required_extensions(struct tls13_ctx *ctx) | |||
108 | */ | 108 | */ |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * If we got no pre_shared_key, then signature_algorithms and | 111 | * RFC 8446, 4.2.9: if we got a pre_shared_key, then we also need |
112 | * supported_groups must both be present. | 112 | * psk_key_exchange_modes. Otherwise, section 9.2 specifies that we |
113 | * need both signature_algorithms and supported_groups. | ||
113 | */ | 114 | */ |
114 | if (!tlsext_extension_seen(s, TLSEXT_TYPE_pre_shared_key)) { | 115 | if (tlsext_extension_seen(s, TLSEXT_TYPE_pre_shared_key)) { |
116 | if (!tlsext_extension_seen(s, | ||
117 | TLSEXT_TYPE_psk_key_exchange_modes)) | ||
118 | return 0; | ||
119 | } else { | ||
115 | if (!tlsext_extension_seen(s, TLSEXT_TYPE_signature_algorithms)) | 120 | if (!tlsext_extension_seen(s, TLSEXT_TYPE_signature_algorithms)) |
116 | return 0; | 121 | return 0; |
117 | if (!tlsext_extension_seen(s, TLSEXT_TYPE_supported_groups)) | 122 | if (!tlsext_extension_seen(s, TLSEXT_TYPE_supported_groups)) |