mirror of
https://github.com/curl/curl.git
synced 2026-05-05 00:29:56 +03:00
tls BIOs: handle BIO_CTRL_EOF correctly
Needs to return 1 if EOF from underlying filter has been seen. Fixes #17471 Reported-by: Michael Kaufmann Closes #17526
This commit is contained in:
parent
c7658f274c
commit
f1e1c8b98a
2 changed files with 8 additions and 4 deletions
|
|
@ -698,9 +698,11 @@ static long ossl_bio_cf_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
|||
ret = 1;
|
||||
break;
|
||||
#ifdef BIO_CTRL_EOF
|
||||
case BIO_CTRL_EOF:
|
||||
case BIO_CTRL_EOF: {
|
||||
/* EOF has been reached on input? */
|
||||
return !cf->next || !cf->next->connected;
|
||||
struct ssl_connect_data *connssl = cf->ctx;
|
||||
return connssl->peer_closed;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
ret = 0;
|
||||
|
|
|
|||
|
|
@ -299,9 +299,11 @@ static long wssl_bio_cf_ctrl(WOLFSSL_BIO *bio, int cmd, long num, void *ptr)
|
|||
ret = 1;
|
||||
break;
|
||||
#ifdef WOLFSSL_BIO_CTRL_EOF
|
||||
case WOLFSSL_BIO_CTRL_EOF:
|
||||
case WOLFSSL_BIO_CTRL_EOF: {
|
||||
/* EOF has been reached on input? */
|
||||
return !cf->next || !cf->next->connected;
|
||||
struct ssl_connect_data *connssl = cf->ctx;
|
||||
return connssl->peer_closed;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
ret = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue