Skip to content
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

Failed tests with OpenSSL 3 #275

Closed
remicollet opened this issue Nov 29, 2021 · 5 comments · Fixed by #281
Closed

Failed tests with OpenSSL 3 #275

remicollet opened this issue Nov 29, 2021 · 5 comments · Fixed by #281

Comments

@remicollet
Copy link

Found in Fedora CI since Fedora 36 was updated to OpenSSL 3.0
https://koschei.fedoraproject.org/package/php-react-socket

Also found on RHEL 9-Beta

There was 1 error:

1) React\Tests\Socket\FunctionalSecureServerTest::testClientUsesTls10WhenCryptoMethodIsExplicitlyConfiguredByClient
RuntimeException: Connection to tls://127.0.0.1:46863 failed during TLS handshake: Connection lost during TLS handshake (ECONNRESET)

/builddir/build/BUILDROOT/php-react-socket-1.10.0-1.el9.remi.x86_64/usr/share/php/React/Socket/SecureConnector.php:67
/usr/share/php/React/Promise/RejectedPromise.php:28
/usr/share/php/React/Promise/Promise.php:134
/usr/share/php/React/Promise/Promise.php:168
/usr/share/php/React/Promise/Promise.php:148
/usr/share/php/React/Promise/Promise.php:237
/usr/share/php/React/Promise/RejectedPromise.php:42
/usr/share/php/React/Promise/Promise.php:135
/usr/share/php/React/Promise/Promise.php:168
/usr/share/php/React/Promise/Promise.php:148
/usr/share/php/React/Promise/Promise.php:237
/usr/share/php/React/Promise/Deferred.php:43
/builddir/build/BUILDROOT/php-react-socket-1.10.0-1.el9.remi.x86_64/usr/share/php/React/Socket/StreamEncryption.php:129
/builddir/build/BUILDROOT/php-react-socket-1.10.0-1.el9.remi.x86_64/usr/share/php/React/Socket/StreamEncryption.php:76
/usr/share/php/React/EventLoop/StreamSelectLoop.php:245
/usr/share/php/React/EventLoop/StreamSelectLoop.php:212
/usr/share/php/Clue/React/Block/functions.php:147
/builddir/build/BUILD/socket-d132fde589ea97f4165f2d94b5296499eac125ec/tests/FunctionalSecureServerTest.php:175

@WyriHaximus
Copy link
Member

Thanks for reporting @remicollet, it this also with the latest 1.10 release from a few hours ago?

@WyriHaximus
Copy link
Member

If I'm interpreting https://koji.fedoraproject.org/koji/taskinfo?taskID=79402997 and https://koji.fedoraproject.org/koji/taskinfo?taskID=79257205 correctly this was resolved in 1.10? (Seems that results on that just came in.)

@remicollet
Copy link
Author

This report is about 1.9.0 and 1.10.0, build passes because this test is temporarily disabled for 1.10

@remicollet
Copy link
Author

remicollet commented Nov 29, 2021

FYI /usr/bin/phpunit9 --bootstrap bootstrap.php --filter '^((?!(testConnectorUsesGivenResolverInstance|testConnectorUsesResolvedHostnameIfDnsIsUsed|testClientUsesTls10WhenCryptoMethodIsExplicitlyConfiguredByClient)).)*$' --exclude-group internet --verbose

I need to check testConnectorUsesGivenResolverInstance and testConnectorUsesResolvedHostnameIfDnsIsUsed, pêrhaps they need to be added in the "internet" group => PR #276

@clue
Copy link
Member

clue commented Nov 30, 2021

@remicollet Thank you for reporting!

I can confirm this may indeed cause a test failure on some systems, but this should not affect normal usage of this library in any way.

The test in question explicitly creates a legacy TLS 1.0 connection, which by today's standards would be considered insecure. In fact, this would be prohibited on modern deployments (see MinProtocol = TLSv1.2 in openssl.conf).

The test already has a number of skip sections that check for specific error codes, but it looks like a dropped connection with no error is not among these checks at the moment.

It probably makes sense to refactor these tests to be more robust. I'll look into this when I can find some time, but happy to accept PRs if anybody wants to look into this before I get a chance! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants