diff options
author | 2020-07-30 16:57:53 +0000 | |
---|---|---|
committer | 2020-07-30 16:57:53 +0000 | |
commit | 5ea943253137986dd6fd330deab04dda29bc43e6 (patch) | |
tree | 86be5e3cc93a8562e03a54f7aad4d65a822064e6 /lib/libssl/tls13_legacy.c | |
parent | Clean up and simplify some of the SSL3/DTLS1 record writing code. (diff) | |
download | wireguard-openbsd-5ea943253137986dd6fd330deab04dda29bc43e6.tar.xz wireguard-openbsd-5ea943253137986dd6fd330deab04dda29bc43e6.zip |
Have ssl_init_wbio_buffer() push the buffering BIO rather than doing it
ourselves.
Spotted by tb@ during a previous review.
Diffstat (limited to 'lib/libssl/tls13_legacy.c')
-rw-r--r-- | lib/libssl/tls13_legacy.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libssl/tls13_legacy.c b/lib/libssl/tls13_legacy.c index 3feb1431839..39d7f0b3ed9 100644 --- a/lib/libssl/tls13_legacy.c +++ b/lib/libssl/tls13_legacy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_legacy.c,v 1.11 2020/07/25 17:44:30 jsing Exp $ */ +/* $OpenBSD: tls13_legacy.c,v 1.12 2020/07/30 16:57:53 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -295,12 +295,9 @@ tls13_use_legacy_stack(struct tls13_ctx *ctx) return 0; if (!ssl3_setup_buffers(s)) return 0; - if (!ssl_init_wbio_buffer(s, 0)) + if (!ssl_init_wbio_buffer(s, 1)) return 0; - if (s->bbio != s->wbio) - s->wbio = BIO_push(s->bbio, s->wbio); - /* Stash any unprocessed data from the last record. */ tls13_record_layer_rbuf(ctx->rl, &cbs); if (CBS_len(&cbs) > 0) { |