summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_client.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_client.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_client.c')
-rw-r--r--lib/libssl/tls13_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c
index d5ac6ba5e07..27b2d712ae9 100644
--- a/lib/libssl/tls13_client.c
+++ b/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_client.c,v 1.56 2020/05/09 15:30:21 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.57 2020/05/09 15:47:11 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -150,6 +150,9 @@ tls13_client_hello_sent(struct tls13_ctx *ctx)
tls1_transcript_freeze(ctx->ssl);
+ if (ctx->middlebox_compat)
+ ctx->send_dummy_ccs = 1;
+
return 1;
}
@@ -544,6 +547,7 @@ tls13_server_certificate_request_recv(struct tls13_ctx *ctx, CBS *cbs)
err:
if (ctx->alert == 0)
ctx->alert = TLS1_AD_DECODE_ERROR;
+
return 0;
}