summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_handshake.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-05-09 15:47:11 +0000
committerjsing <jsing@openbsd.org>2020-05-09 15:47:11 +0000
commitef59065f34c38d262514ca2af0d95c4bf1996e48 (patch)
tree95c60de481c01a6220d98d8ab4ab4a53a945dc8c /lib/libssl/tls13_handshake.c
parentCorrect return value check to handle TLS13_IO_EOF case. (diff)
downloadwireguard-openbsd-ef59065f34c38d262514ca2af0d95c4bf1996e48.tar.xz
wireguard-openbsd-ef59065f34c38d262514ca2af0d95c4bf1996e48.zip
Send dummy ChangeCipherSpec messages from the TLSv1.3 client.
When operating in middlebox compatibility mode, the TLSv1.3 client needs to send a dummy ChangeCipherSpec message immediately before its second flight of handshake messages (when early data is not offered). ok tb@
Diffstat (limited to 'lib/libssl/tls13_handshake.c')
-rw-r--r--lib/libssl/tls13_handshake.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/tls13_handshake.c b/lib/libssl/tls13_handshake.c
index d739dc99e58..05446380ddb 100644
--- a/lib/libssl/tls13_handshake.c
+++ b/lib/libssl/tls13_handshake.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_handshake.c,v 1.56 2020/05/09 08:39:44 jsing Exp $ */
+/* $OpenBSD: tls13_handshake.c,v 1.57 2020/05/09 15:47:11 jsing Exp $ */
/*
* Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
@@ -332,6 +332,12 @@ tls13_handshake_send_action(struct tls13_ctx *ctx,
ssize_t ret;
CBB cbb;
+ if (ctx->send_dummy_ccs) {
+ if ((ret = tls13_send_dummy_ccs(ctx->rl)) != TLS13_IO_SUCCESS)
+ return ret;
+ ctx->send_dummy_ccs = 0;
+ }
+
/* If we have no handshake message, we need to build one. */
if (ctx->hs_msg == NULL) {
if ((ctx->hs_msg = tls13_handshake_msg_new()) == NULL)