Skip to content

Commit c180668

Browse files
React to dotnet/runtime SSL changes (#18584)
1 parent 879ce96 commit c180668

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionMiddlewareTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
383383
using (var connection = server.CreateConnection())
384384
{
385385
var stream = OpenSslStreamWithCert(connection.Stream);
386-
var ex = await Assert.ThrowsAsync<IOException>(
386+
var ex = await Assert.ThrowsAnyAsync<Exception>(
387387
async () => await stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls, false));
388388
}
389389
}

src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public async Task ClientAttemptingToUseUnsupportedProtocolIsLoggedAsDebug()
371371
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
372372
{
373373
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
374-
await Assert.ThrowsAsync<IOException>(() =>
374+
await Assert.ThrowsAnyAsync<Exception>(() =>
375375
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
376376
enabledSslProtocols: SslProtocols.Tls,
377377
checkCertificateRevocation: false));
@@ -400,7 +400,7 @@ public async Task DevCertWithInvalidPrivateKeyProducesCustomWarning()
400400
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
401401
{
402402
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
403-
await Assert.ThrowsAsync<IOException>(() =>
403+
await Assert.ThrowsAnyAsync<Exception>(() =>
404404
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
405405
enabledSslProtocols: SslProtocols.Tls,
406406
checkCertificateRevocation: false));

0 commit comments

Comments
 (0)