diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-08-18 12:06:10 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-09-01 10:45:36 +0100 |
commit | abeb41b42fa3cdca99d3f3fef48ea6ee04023d68 (patch) | |
tree | ad5bbfde951a8dcfcdc624a3780d5154431cd23b /crypto | |
parent | 4426c47d662768b0f087c9099b76cabef4c1f540 (diff) |
Minor updates
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bio/bss_conn.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 8d29f94bd1..f09160b3c0 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -347,8 +347,7 @@ static int conn_free(BIO *a) return 0; data = (BIO_CONNECT *)a->ptr; - if (data->dgram_bio != NULL) - BIO_free(data->dgram_bio); + BIO_free(data->dgram_bio); if (a->shutdown) { conn_close_socket(a); @@ -372,8 +371,12 @@ static int conn_read(BIO *b, char *out, int outl) return ret; } - if (data->dgram_bio != NULL) - return BIO_read(data->dgram_bio, out, outl); + if (data->dgram_bio != NULL) { + BIO_clear_retry_flags(b); + ret = BIO_read(data->dgram_bio, out, outl); + BIO_set_flags(b, BIO_get_retry_flags(data->dgram_bio)); + return ret; + } if (out != NULL) { clear_socket_error(); @@ -406,8 +409,12 @@ static int conn_write(BIO *b, const char *in, int inl) return ret; } - if (data->dgram_bio != NULL) - return BIO_write(data->dgram_bio, in, inl); + if (data->dgram_bio != NULL) { + BIO_clear_retry_flags(b); + ret = BIO_write(data->dgram_bio, in, inl); + BIO_set_flags(b, BIO_get_retry_flags(data->dgram_bio)); + return ret; + } clear_socket_error(); # ifndef OPENSSL_NO_KTLS |