diff options
author | tb <> | 2020-05-10 17:13:30 +0000 |
---|---|---|
committer | tb <> | 2020-05-10 17:13:30 +0000 |
commit | b8698e11d9883dab7da69566fc2cd28afaf199a8 (patch) | |
tree | 9b324a09d611e1d490ffe26c5e54d2031501ff81 /src/lib/libssl/tls13_internal.h | |
parent | d8a73cb59ee68723f87063e50ae6037929f06a83 (diff) | |
download | openbsd-b8698e11d9883dab7da69566fc2cd28afaf199a8.tar.gz openbsd-b8698e11d9883dab7da69566fc2cd28afaf199a8.tar.bz2 openbsd-b8698e11d9883dab7da69566fc2cd28afaf199a8.zip |
Send dummy ChangeCipherSpec messages from the TLSv1.3 server
If the client has requested middle box compatibility mode by sending
a non-empty legacy_session_id, the server must send a dummy CCS right
after its first handshake message. This means right after ServerHello
or HelloRetryRequest.
Two important improvements over the backed-out diffr: make sure that
First: client and server can send their dummy CCS at the correct moment
(right before the next flight or right after the current flight).
Second: as jsing noted, we also need to deal with the corner case that
tls13_send_dummy_ccs() can return TLS13_IO_WANT_POLLOUT.
with/ok jsing
Diffstat (limited to 'src/lib/libssl/tls13_internal.h')
-rw-r--r-- | src/lib/libssl/tls13_internal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h index f27f46df52..7ec166f3fa 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.74 2020/05/10 16:59:51 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_internal.h,v 1.75 2020/05/10 17:13:30 tb 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> |
@@ -253,6 +253,7 @@ struct tls13_ctx { | |||
253 | int handshake_completed; | 253 | int handshake_completed; |
254 | int middlebox_compat; | 254 | int middlebox_compat; |
255 | int send_dummy_ccs; | 255 | int send_dummy_ccs; |
256 | int send_dummy_ccs_after; | ||
256 | 257 | ||
257 | int close_notify_sent; | 258 | int close_notify_sent; |
258 | int close_notify_recv; | 259 | int close_notify_recv; |
@@ -355,6 +356,7 @@ int tls13_server_hello_send(struct tls13_ctx *ctx, CBB *cbb); | |||
355 | int tls13_server_hello_sent(struct tls13_ctx *ctx); | 356 | int tls13_server_hello_sent(struct tls13_ctx *ctx); |
356 | int tls13_server_hello_retry_request_recv(struct tls13_ctx *ctx, CBS *cbs); | 357 | int tls13_server_hello_retry_request_recv(struct tls13_ctx *ctx, CBS *cbs); |
357 | int tls13_server_hello_retry_request_send(struct tls13_ctx *ctx, CBB *cbb); | 358 | int tls13_server_hello_retry_request_send(struct tls13_ctx *ctx, CBB *cbb); |
359 | int tls13_server_hello_retry_request_sent(struct tls13_ctx *ctx); | ||
358 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs); | 360 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs); |
359 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb); | 361 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb); |
360 | int tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs); | 362 | int tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs); |