summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_record_layer.c
diff options
context:
space:
mode:
authorjsing <>2021-09-16 19:25:30 +0000
committerjsing <>2021-09-16 19:25:30 +0000
commit2d955253865a6015861bd8fe88e65001b0fcf007 (patch)
tree721c70e4e05fb8482881613ba81112e77e594f1e /src/lib/libssl/tls13_record_layer.c
parenta490f30feab724ed170f288710f349bf893262b4 (diff)
downloadopenbsd-2d955253865a6015861bd8fe88e65001b0fcf007.tar.gz
openbsd-2d955253865a6015861bd8fe88e65001b0fcf007.tar.bz2
openbsd-2d955253865a6015861bd8fe88e65001b0fcf007.zip
Implement flushing for TLSv1.3 handshakes.
When we finish sending a flight of records, flush the record layer output. This effectively means calling BIO_flush() on the wbio. Some things (such as apache2) have custom BIOs that perform buffering and do not actually send on BIO_write(). Without BIO_flush() the server thinks it has sent data and starts receiving records, however the client never sends records since it never received those that the server should have sent. Joint work with tb@ ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_record_layer.c')
-rw-r--r--src/lib/libssl/tls13_record_layer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c
index 2e32cb8a37..6b9f5d1419 100644
--- a/src/lib/libssl/tls13_record_layer.c
+++ b/src/lib/libssl/tls13_record_layer.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_record_layer.c,v 1.63 2021/09/04 16:26:12 jsing Exp $ */ 1/* $OpenBSD: tls13_record_layer.c,v 1.64 2021/09/16 19:25:30 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -1096,6 +1096,12 @@ tls13_record_layer_write(struct tls13_record_layer *rl, uint8_t content_type,
1096 return ret; 1096 return ret;
1097} 1097}
1098 1098
1099ssize_t
1100tls13_record_layer_flush(struct tls13_record_layer *rl)
1101{
1102 return rl->cb.wire_flush(rl->cb_arg);
1103}
1104
1099static const uint8_t tls13_dummy_ccs[] = { 0x01 }; 1105static const uint8_t tls13_dummy_ccs[] = { 0x01 };
1100 1106
1101ssize_t 1107ssize_t