apache /
serf /
bfb9ca526234dd1b131cd58db588c6c6e12909e3 Add support for BIO_CTRL_EOF and implement the hit eof logic for ssl buckets
and APR files.
Potentially OpenSSL can check BIOs for EOF. For example, OpenSSL 1.1.1e [1] and
OpenSSL 3.0+ [2] have such checks.
[1] https://github.com/openssl/openssl/commit/db943f43a60d1b5b1277e4b5317e8f288e7a0a3a
[2] https://github.com/openssl/openssl/commit/d924dbf4ae127c68463bcbece04b6e06abc58928
Patch by: Denis Kovalchuk <denis.kovalchuk{_AT_}visualsvn.com>
* buckets/ssl_buckets.c
(serf_ssl_context_t): New hit_eof variable.
(bio_bucket_read): Properly set the hit_eof variable.
(bio_bucket_ctrl): Rework to support BIO_CTRL_EOF.
(bio_file_ctrl): New ctrl function for APR files to support BIO_CTRL_EOF.
(bio_file_method,
bio_meth_file_new): Use the new bio_file_ctrl().
(ssl_init_context): Init the hit_eof variable.
* test/MockHTTPinC/MockHTTP_server.c
(sslCtx_t): New hit_eof variable.
(bio_apr_socket_ctrl): Rework to support BIO_CTRL_EOF.
(bio_apr_socket_read): Properly set the hit_eof variable.
(initSSLCtx): Init the hit_eof variable.
git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1902208 13f79535-47bb-0310-9956-ffa450edef68
2 files changed