diff options
author | ihciah <ihciah@gmail.com> | 2023-05-11 11:30:14 +0200 |
---|---|---|
committer | Todd Short <todd.short@me.com> | 2023-08-04 16:30:58 +0200 |
commit | bcbc7d60679b79fa4347e33c865306dce41ed985 (patch) | |
tree | 6c679fda97f2d353cb6106ab7889a4ca692474c9 /crypto/comp | |
parent | Add linux-x86-latomic target (diff) | |
download | openssl-bcbc7d60679b79fa4347e33c865306dce41ed985.tar.xz openssl-bcbc7d60679b79fa4347e33c865306dce41ed985.zip |
bio: pass flags on BIO_ctrl to make flush retriable
Co-authored-by: suikammd <suikalala@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21298)
Diffstat (limited to 'crypto/comp')
-rw-r--r-- | crypto/comp/c_brotli.c | 4 | ||||
-rw-r--r-- | crypto/comp/c_zlib.c | 4 | ||||
-rw-r--r-- | crypto/comp/c_zstd.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/crypto/comp/c_brotli.c b/crypto/comp/c_brotli.c index 2d98b63a89..df63a43b41 100644 --- a/crypto/comp/c_brotli.c +++ b/crypto/comp/c_brotli.c @@ -716,8 +716,10 @@ static long bio_brotli_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: ret = bio_brotli_flush(b); - if (ret > 0) + if (ret > 0) { ret = BIO_flush(next); + BIO_copy_next_retry(b); + } break; case BIO_C_SET_BUFF_SIZE: diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c index 90a1840ecd..52f2e26a73 100644 --- a/crypto/comp/c_zlib.c +++ b/crypto/comp/c_zlib.c @@ -640,8 +640,10 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: ret = bio_zlib_flush(b); - if (ret > 0) + if (ret > 0) { ret = BIO_flush(next); + BIO_copy_next_retry(b); + } break; case BIO_C_SET_BUFF_SIZE: diff --git a/crypto/comp/c_zstd.c b/crypto/comp/c_zstd.c index 17dc0f64a4..7f6c5cc72c 100644 --- a/crypto/comp/c_zstd.c +++ b/crypto/comp/c_zstd.c @@ -762,8 +762,10 @@ static long bio_zstd_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: ret = bio_zstd_flush(b); - if (ret > 0) + if (ret > 0) { ret = BIO_flush(next); + BIO_copy_next_retry(b); + } break; case BIO_C_SET_BUFF_SIZE: |