summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_client.c
diff options
context:
space:
mode:
authortb <>2026-08-21 17:15:22 +0000
committertb <>2026-08-21 17:15:22 +0000
commitfcc903ee8faa79f7dedb22f05008724ea327bdba (patch)
treed5921661f11d1c73ddb6d9c2302499f7d3466cf1 /src/lib/libssl/tls13_client.c
parentc59d718905f8bfe12745fa599341256608e132f4 (diff)
downloadopenbsd-fcc903ee8faa79f7dedb22f05008724ea327bdba.tar.gz
openbsd-fcc903ee8faa79f7dedb22f05008724ea327bdba.tar.bz2
openbsd-fcc903ee8faa79f7dedb22f05008724ea327bdba.zip
Change RFC references from 8446 to 9846 and adjust section numbers
with/ok kenjiro
Diffstat (limited to 'src/lib/libssl/tls13_client.c')
-rw-r--r--src/lib/libssl/tls13_client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c
index fec3e825fe..8abfdbdd1f 100644
--- a/src/lib/libssl/tls13_client.c
+++ b/src/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_client.c,v 1.108 2026/06/14 15:51:17 jsing Exp $ */ 1/* $OpenBSD: tls13_client.c,v 1.109 2026/08/21 17:15:22 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -73,8 +73,8 @@ tls13_client_init(struct tls13_ctx *ctx)
73 /* 73 /*
74 * The legacy session identifier should either be set to an 74 * The legacy session identifier should either be set to an
75 * unpredictable 32-byte value or zero length... a non-zero length 75 * unpredictable 32-byte value or zero length... a non-zero length
76 * legacy session identifier triggers compatibility mode (see RFC 8446 76 * legacy session identifier triggers compatibility mode (see RFC 9846
77 * Appendix D.4). In the pre-TLSv1.3 case a zero length value is used. 77 * Appendix E.4). In the pre-TLSv1.3 case a zero length value is used.
78 */ 78 */
79 if (ctx->middlebox_compat && 79 if (ctx->middlebox_compat &&
80 ctx->hs->our_max_tls_version >= TLS1_3_VERSION) { 80 ctx->hs->our_max_tls_version >= TLS1_3_VERSION) {
@@ -242,7 +242,7 @@ tls13_server_hello_process(struct tls13_ctx *ctx, CBS *cbs)
242 if (tls13_server_hello_is_legacy(cbs)) { 242 if (tls13_server_hello_is_legacy(cbs)) {
243 if (ctx->hs->our_max_tls_version >= TLS1_3_VERSION) { 243 if (ctx->hs->our_max_tls_version >= TLS1_3_VERSION) {
244 /* 244 /*
245 * RFC 8446 section 4.1.3: we must not downgrade if 245 * RFC 9846 section 4.2.3: we must not downgrade if
246 * the server random value contains the TLS 1.2 or 1.1 246 * the server random value contains the TLS 1.2 or 1.1
247 * magical value. 247 * magical value.
248 */ 248 */
@@ -285,7 +285,7 @@ tls13_server_hello_process(struct tls13_ctx *ctx, CBS *cbs)
285 /* 285 /*
286 * The supported versions extension indicated 0x0304 or greater. 286 * The supported versions extension indicated 0x0304 or greater.
287 * Ensure that it was 0x0304 and that legacy version is set to 0x0303 287 * Ensure that it was 0x0304 and that legacy version is set to 0x0303
288 * (RFC 8446 section 4.2.1). 288 * (RFC 9846 section 4.3.1).
289 */ 289 */
290 if (ctx->hs->tls13.server_version != TLS1_3_VERSION || 290 if (ctx->hs->tls13.server_version != TLS1_3_VERSION ||
291 legacy_version != TLS1_2_VERSION) { 291 legacy_version != TLS1_2_VERSION) {
@@ -318,7 +318,7 @@ tls13_server_hello_process(struct tls13_ctx *ctx, CBS *cbs)
318 if (!(ctx->handshake_stage.hs_type & WITHOUT_HRR) && !ctx->hs->tls13.hrr) { 318 if (!(ctx->handshake_stage.hs_type & WITHOUT_HRR) && !ctx->hs->tls13.hrr) {
319 /* 319 /*
320 * A ServerHello following a HelloRetryRequest MUST use the same 320 * A ServerHello following a HelloRetryRequest MUST use the same
321 * cipher suite (RFC 8446 section 4.1.4). 321 * cipher suite (RFC 9846 section 4.2.4).
322 */ 322 */
323 if (ctx->hs->cipher != cipher) { 323 if (ctx->hs->cipher != cipher) {
324 ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER; 324 ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
@@ -450,7 +450,7 @@ tls13_client_hello_retry_send(struct tls13_ctx *ctx, CBB *cbb)
450 /* 450 /*
451 * Ensure that the server supported group is one that we listed in our 451 * Ensure that the server supported group is one that we listed in our
452 * supported groups and is not the same as the key share we previously 452 * supported groups and is not the same as the key share we previously
453 * offered. See RFC 8446 section 4.2.8. 453 * offered. See RFC 9846 section 4.3.8.
454 */ 454 */
455 if (!tls1_check_group(ctx->ssl, ctx->hs->tls13.server_group)) { 455 if (!tls1_check_group(ctx->ssl, ctx->hs->tls13.server_group)) {
456 ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER; 456 ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
@@ -855,8 +855,8 @@ tls13_client_select_certificate(struct tls13_ctx *ctx, SSL_CERT_PKEY **out_cpk,
855 *out_sigalg = NULL; 855 *out_sigalg = NULL;
856 856
857 /* 857 /*
858 * XXX - RFC 8446, 4.4.2.3: the server can communicate preferences 858 * XXX - RFC 9846, 4.5.1.2: the server can communicate preferences
859 * with the certificate_authorities (4.2.4) and oid_filters (4.2.5) 859 * with the certificate_authorities (4.3.4) and oid_filters (4.3.5)
860 * extensions. We should honor the former and must apply the latter. 860 * extensions. We should honor the former and must apply the latter.
861 */ 861 */
862 862