diff options
author | jsing <> | 2020-04-25 18:06:28 +0000 |
---|---|---|
committer | jsing <> | 2020-04-25 18:06:28 +0000 |
commit | 0c17397515d125e3fcf933229b2031dbee799fc3 (patch) | |
tree | 91fbf28138e5aba97316d4a5a728da1bd6647636 /src/lib | |
parent | 9b1773998e4fae89c6d48348232d7eae5e73e46d (diff) | |
download | openbsd-0c17397515d125e3fcf933229b2031dbee799fc3.tar.gz openbsd-0c17397515d125e3fcf933229b2031dbee799fc3.tar.bz2 openbsd-0c17397515d125e3fcf933229b2031dbee799fc3.zip |
Switch to NEGOTIATED when using WITHOUT_HRR.
This ensures that we remain in a valid handshake state in the TLSv1.3
server. Ideally we would not switch to NEGOTIATED until after record
protection has been enabled, but we'll revisit this later.
Issue noted by inoguchi@
ok tb@
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 9bc4cb6170..16c2e32dba 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.31 2020/04/22 17:05:07 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_server.c,v 1.32 2020/04/25 18:06:28 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> |
@@ -280,11 +280,16 @@ tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs) | |||
280 | return 1; | 280 | return 1; |
281 | 281 | ||
282 | /* | 282 | /* |
283 | * If a matching key share was provided, we do not need to | 283 | * If a matching key share was provided, we do not need to send a |
284 | * send a HelloRetryRequest. | 284 | * HelloRetryRequest. |
285 | */ | ||
286 | /* | ||
287 | * XXX - ideally NEGOTIATED would only be added after record protection | ||
288 | * has been enabled. This would probably mean using either an | ||
289 | * INITIAL | WITHOUT_HRR state, or another intermediate state. | ||
285 | */ | 290 | */ |
286 | if (ctx->hs->key_share != NULL) | 291 | if (ctx->hs->key_share != NULL) |
287 | ctx->handshake_stage.hs_type |= WITHOUT_HRR; | 292 | ctx->handshake_stage.hs_type |= NEGOTIATED | WITHOUT_HRR; |
288 | 293 | ||
289 | /* XXX - check this is the correct point */ | 294 | /* XXX - check this is the correct point */ |
290 | tls13_record_layer_allow_ccs(ctx->rl, 1); | 295 | tls13_record_layer_allow_ccs(ctx->rl, 1); |