OpenSSL 3: Support of SSL_OP_IGNORE_UNEXPECTED_EOF context option
Description
OpenSSL became more strict about unexpected EOF (not sending close notify) in 1.1.1e but reverted that change in 1.1.1f due to the huge amount of non-compliant servers. With the new major release 3.0.0 it came back. See https://github.com/openssl/openssl/issues/11378 for more details.
Unfortunately, the situation of non-compliant servers did not change. And with OpenSSL 3 being the default version of Ubuntu 22.04 (and other distributions) the issue will raise more frequently.
I propose to add a new SSL context option ignore_unexpected_eof to set the SSL_OP_IGNORE_UNEXPECTED_EOF bit.
Documentation: https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html#SSL_OP_IGNORE_UNEXPECTED_EOF
Just wanting to note for anyone that is like me waiting on the fix, that theoretically this will be showing up in distros shortly as it is included in PHP 8.1.7:
https://www.php.net/ChangeLog-8.php#8.1.7
Older versions though will probably need manual patching.
Thank you! I already updated twice my PHP version and the bug is still present. Hope on the next relase it gets fixed.
Working again on my Kubuntu 22.04 development system running PHP 7.4 using a reCaptcha widget for login which failed before.