diff options
author | jsing <> | 2020-04-22 17:05:07 +0000 |
---|---|---|
committer | jsing <> | 2020-04-22 17:05:07 +0000 |
commit | c18a60d45888295bb8cf344e076d84ef817a65a5 (patch) | |
tree | c7a924ebca094d3b2e25924b18e7bcf1cf4da7b7 /src/lib/libssl/tls13_internal.h | |
parent | c430432c2ef1ea560124b642f581c3e1ddb24f69 (diff) | |
download | openbsd-c18a60d45888295bb8cf344e076d84ef817a65a5.tar.gz openbsd-c18a60d45888295bb8cf344e076d84ef817a65a5.tar.bz2 openbsd-c18a60d45888295bb8cf344e076d84ef817a65a5.zip |
Improve TLSv1.3 state machine for HelloRetryRequest handling.
The state machine currently handles the HelloRetryRequest case by using
WITH_HRR - in other words, we're explicitly indicating when we transition
to the alternate path. The problem here is that we do not know if we're
going to receive a ServerHello or a HelloRetryRequest until we process
the message. This means that the ServerHello processing code has to handle
both types of messages.
The state machine and associated processing code becomes cleaner if we flip
this around so that we assume we are going to receive a HelloRetryRequest
and upon discovering that it is not, trigger WITHOUT_HRR and hand off to
the ServerHello processing function. In particular, this makes the logic
much more straight forward on the server side, when adding support for HRR.
With feedback from tb@
ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_internal.h')
-rw-r--r-- | src/lib/libssl/tls13_internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h index c5b893bc16..ee82a44693 100644 --- a/src/lib/libssl/tls13_internal.h +++ b/src/lib/libssl/tls13_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_internal.h,v 1.64 2020/04/21 16:55:17 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_internal.h,v 1.65 2020/04/22 17:05:07 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> |
4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -309,8 +309,8 @@ int tls13_client_finished_sent(struct tls13_ctx *ctx); | |||
309 | int tls13_server_hello_recv(struct tls13_ctx *ctx, CBS *cbs); | 309 | int tls13_server_hello_recv(struct tls13_ctx *ctx, CBS *cbs); |
310 | int tls13_server_hello_send(struct tls13_ctx *ctx, CBB *cbb); | 310 | int tls13_server_hello_send(struct tls13_ctx *ctx, CBB *cbb); |
311 | int tls13_server_hello_sent(struct tls13_ctx *ctx); | 311 | int tls13_server_hello_sent(struct tls13_ctx *ctx); |
312 | int tls13_server_hello_retry_recv(struct tls13_ctx *ctx, CBS *cbs); | 312 | int tls13_server_hello_retry_request_recv(struct tls13_ctx *ctx, CBS *cbs); |
313 | int tls13_server_hello_retry_send(struct tls13_ctx *ctx, CBB *cbb); | 313 | int tls13_server_hello_retry_request_send(struct tls13_ctx *ctx, CBB *cbb); |
314 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs); | 314 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs); |
315 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb); | 315 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb); |
316 | int tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs); | 316 | int tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs); |