Skip to content

Commit

Permalink
Merge pull request #281 from clue-labs/tls1.0
Browse files Browse the repository at this point in the history
Skip legacy TLS 1.0 tests if disabled by system
  • Loading branch information
WyriHaximus authored Jan 10, 2022
2 parents 894c711 + f0d894c commit 85a920a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/FunctionalSecureServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,13 @@ public function testClientUsesTls10WhenCryptoMethodIsExplicitlyConfiguredByClien
try {
$client = Block\await($promise, $loop, self::TIMEOUT);
} catch (\RuntimeException $e) {
if (strpos($e->getMessage(), 'no protocols available') !== false || strpos($e->getMessage(), 'routines:state_machine:internal error') !== false) {
$this->markTestSkipped('TLS v1.0 not available on this system');
}

throw $e;
// legacy TLS 1.0 would be considered insecure by today's standards, so skip test if connection fails
// OpenSSL error messages are version/platform specific
// […] no protocols available
// […] routines:state_machine:internal error
// SSL operation failed with code 1. OpenSSL Error messages: error:0A000438:SSL routines::tlsv1 alert internal error
// Connection lost during TLS handshake (ECONNRESET)
$this->markTestSkipped('TLS 1.0 not available on this system (' . $e->getMessage() . ')');
}

$this->assertInstanceOf('React\Socket\Connection', $client);
Expand Down

0 comments on commit 85a920a

Please sign in to comment.