Skip to content

Commit

Permalink
React to dotnet/runtime SSL changes (#18584)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Jan 26, 2020
1 parent 879ce96 commit c180668
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
using (var connection = server.CreateConnection())
{
var stream = OpenSslStreamWithCert(connection.Stream);
var ex = await Assert.ThrowsAsync<IOException>(
var ex = await Assert.ThrowsAnyAsync<Exception>(
async () => await stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls, false));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public async Task ClientAttemptingToUseUnsupportedProtocolIsLoggedAsDebug()
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
{
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
await Assert.ThrowsAsync<IOException>(() =>
await Assert.ThrowsAnyAsync<Exception>(() =>
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
enabledSslProtocols: SslProtocols.Tls,
checkCertificateRevocation: false));
Expand Down Expand Up @@ -400,7 +400,7 @@ public async Task DevCertWithInvalidPrivateKeyProducesCustomWarning()
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
{
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
await Assert.ThrowsAsync<IOException>(() =>
await Assert.ThrowsAnyAsync<Exception>(() =>
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
enabledSslProtocols: SslProtocols.Tls,
checkCertificateRevocation: false));
Expand Down

0 comments on commit c180668

Please sign in to comment.