-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for OpenSSL 3 SSL_OP_IGNORE_UNEXPECTED_EOF option #9024
Comments
At this time, there is no measures to set SSL_OP_IGNORE_UNEXPECTED_EOF option by php curl / php http, isn't it ? |
to resolve this isssue with the PHP curl extension for php7.4 on Ubuntu 22.04.1 LTS (jammy) , i've changed the php-curl extension to add the SSL_OP_IGNORE_UNEXPECTED_EOF flag as follows apt install php7.4-dev && apt install libcurl4-openssl-dev && wget https://www.php.net/distributions/php-7.4.32.tar.gz) && tar xfz php-7.4.32.tar.gz && cd php-7.4.32/ext/curl/ in php-7.4.32/ext/curl/interface.c i've added a ssl-context-function static CURLcode rslctx(CURL *curl, void *sslctx, void parm) and added curl_easy_setopt(ch->cp, CURLOPT_SSL_CTX_FUNCTION, rslctx); to the _php_curl_set_default_options method replace interface.c with my version and then phpize && ./configure && make && make install afterwards reload the service (in case you're using php7.4-fpm or libapache-mod-php7.4) |
Thanks, but this description sounds as if you're asking for a new feature/change. We use this tracker for bugs and issues only, we put ideas to work on in the future in the TODO document. We basically drown in good ideas so they don't do much use in our tracker. If you really want to see this happen, start working on an implementation and submit a PR for it or join the mailing list and talk up more interest for it and see what help from others you can get! |
The OpenSSL 3 has added the SSL_OP_IGNORE_UNEXPECTED_EOF option, should curl also add the option to support that?
I'm creating this because the issue #5138 and #7800 was closed.
I am using PHP curl extension which relies on this lib and upgrade my OpenSSL to version 3 then I am getting through the
curl: (56) OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
error.I am thinking if curl can add the option then the PHP curl extension may have the possibility to expose the option to PHP users and PHP users can have a choice to decide whether to turn on the option.
The text was updated successfully, but these errors were encountered: