Unverified Commit 9b5bb2e2 authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #733 from capnproto/openssl-1.1.1

Fix tls-test for OpenSSL 1.1.1.
parents e0118b4e 550f0116
...@@ -518,7 +518,11 @@ KJ_TEST("TLS client certificate verification") { ...@@ -518,7 +518,11 @@ KJ_TEST("TLS client certificate verification") {
auto pipe = test.io.provider->newTwoWayPipe(); auto pipe = test.io.provider->newTwoWayPipe();
auto clientPromise = test.tlsClient.wrapClient(kj::mv(pipe.ends[0]), "example.com"); auto clientPromise = test.tlsClient.wrapClient(kj::mv(pipe.ends[0]), "example.com")
.then([](kj::Own<kj::AsyncIoStream> stream) {
auto promise = stream->readAllBytes();
return promise.attach(kj::mv(stream));
});
auto serverPromise = test.tlsServer.wrapServer(kj::mv(pipe.ends[1])); auto serverPromise = test.tlsServer.wrapServer(kj::mv(pipe.ends[1]));
KJ_EXPECT_THROW_MESSAGE( KJ_EXPECT_THROW_MESSAGE(
...@@ -526,7 +530,7 @@ KJ_TEST("TLS client certificate verification") { ...@@ -526,7 +530,7 @@ KJ_TEST("TLS client certificate verification") {
"PEER_DID_NOT_RETURN_A_CERTIFICATE"), "PEER_DID_NOT_RETURN_A_CERTIFICATE"),
serverPromise.wait(test.io.waitScope)); serverPromise.wait(test.io.waitScope));
KJ_EXPECT_THROW_MESSAGE( KJ_EXPECT_THROW_MESSAGE(
SSL_MESSAGE("alert handshake failure", SSL_MESSAGE("alert", // "alert handshake failure" or "alert certificate required"
"SSLV3_ALERT_HANDSHAKE_FAILURE"), "SSLV3_ALERT_HANDSHAKE_FAILURE"),
clientPromise.wait(test.io.waitScope)); clientPromise.wait(test.io.waitScope));
} }
...@@ -540,7 +544,11 @@ KJ_TEST("TLS client certificate verification") { ...@@ -540,7 +544,11 @@ KJ_TEST("TLS client certificate verification") {
auto pipe = test.io.provider->newTwoWayPipe(); auto pipe = test.io.provider->newTwoWayPipe();
auto clientPromise = test.tlsClient.wrapClient(kj::mv(pipe.ends[0]), "example.com"); auto clientPromise = test.tlsClient.wrapClient(kj::mv(pipe.ends[0]), "example.com")
.then([](kj::Own<kj::AsyncIoStream> stream) {
auto promise = stream->readAllBytes();
return promise.attach(kj::mv(stream));
});
auto serverPromise = test.tlsServer.wrapServer(kj::mv(pipe.ends[1])); auto serverPromise = test.tlsServer.wrapServer(kj::mv(pipe.ends[1]));
KJ_EXPECT_THROW_MESSAGE( KJ_EXPECT_THROW_MESSAGE(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment