summaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
authorihciah <ihciah@gmail.com>2023-05-11 09:30:14 +0000
committerTodd Short <todd.short@me.com>2023-08-04 10:30:58 -0400
commitbcbc7d60679b79fa4347e33c865306dce41ed985 (patch)
tree6c679fda97f2d353cb6106ab7889a4ca692474c9 /crypto/bio
parente1b6ecbab41514f45e9c355d01400691f74041c4 (diff)
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/bio')
-rw-r--r--crypto/bio/bf_buff.c2
-rw-r--r--crypto/bio/bf_lbuf.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c
index b94c58c0a3..bad465c072 100644
--- a/crypto/bio/bf_buff.c
+++ b/crypto/bio/bf_buff.c
@@ -360,6 +360,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
return 0;
if (ctx->obuf_len <= 0) {
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
+ BIO_copy_next_retry(b);
break;
}
@@ -380,6 +381,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
}
}
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
+ BIO_copy_next_retry(b);
break;
case BIO_CTRL_DUP:
dbio = (BIO *)ptr;
diff --git a/crypto/bio/bf_lbuf.c b/crypto/bio/bf_lbuf.c
index eb23c88647..170e375e7f 100644
--- a/crypto/bio/bf_lbuf.c
+++ b/crypto/bio/bf_lbuf.c
@@ -259,6 +259,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr)
return 0;
if (ctx->obuf_len <= 0) {
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
+ BIO_copy_next_retry(b);
break;
}
@@ -278,6 +279,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr)
}
}
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
+ BIO_copy_next_retry(b);
break;
case BIO_CTRL_DUP:
dbio = (BIO *)ptr;