php-src icon indicating copy to clipboard operation
php-src copied to clipboard

OpenSSL 3: Support of SSL_OP_IGNORE_UNEXPECTED_EOF context option

Open nrueckmann opened this issue 4 years ago • 23 comments

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

nrueckmann avatar Apr 14 '22 08:04 nrueckmann

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.

codgunt avatar Jun 09 '22 17:06 codgunt

Thank you! I already updated twice my PHP version and the bug is still present. Hope on the next relase it gets fixed.

batata004 avatar Jun 09 '22 17:06 batata004

Working again on my Kubuntu 22.04 development system running PHP 7.4 using a reCaptcha widget for login which failed before.

datenfalke avatar Jun 15 '22 09:06 datenfalke