React to dotnet/runtime SSL changes (#18584)
This commit is contained in:
parent
879ce96be8
commit
c180668c35
|
|
@ -383,7 +383,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
|
||||||
using (var connection = server.CreateConnection())
|
using (var connection = server.CreateConnection())
|
||||||
{
|
{
|
||||||
var stream = OpenSslStreamWithCert(connection.Stream);
|
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));
|
async () => await stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
|
||||||
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
|
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.
|
// 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,
|
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
|
||||||
enabledSslProtocols: SslProtocols.Tls,
|
enabledSslProtocols: SslProtocols.Tls,
|
||||||
checkCertificateRevocation: false));
|
checkCertificateRevocation: false));
|
||||||
|
|
@ -400,7 +400,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
|
||||||
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
|
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.
|
// 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,
|
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
|
||||||
enabledSslProtocols: SslProtocols.Tls,
|
enabledSslProtocols: SslProtocols.Tls,
|
||||||
checkCertificateRevocation: false));
|
checkCertificateRevocation: false));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue