Skip to content

Commit c9bde8b

Browse files
committed
Remove DevCertWithInvalidPrivateKeyProducesCustomWarning test
- test does not behave consistently across platforms - test already removed in later branches - testing in this area has moved to CTI (manual testing)
1 parent 808b54a commit c9bde8b

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -384,36 +384,6 @@ await Assert.ThrowsAnyAsync<Exception>(() =>
384384
Assert.Equal(LogLevel.Debug, loggerProvider.FilterLogger.LastLogLevel);
385385
}
386386

387-
[ConditionalFact]
388-
[OSSkipCondition(OperatingSystems.Windows)]
389-
public async Task DevCertWithInvalidPrivateKeyProducesCustomWarning()
390-
{
391-
var loggerProvider = new HandshakeErrorLoggerProvider();
392-
LoggerFactory.AddProvider(loggerProvider);
393-
394-
await using (var server = new TestServer(context => Task.CompletedTask,
395-
new TestServiceContext(LoggerFactory),
396-
listenOptions =>
397-
{
398-
listenOptions.UseHttps(TestResources.GetTestCertificate());
399-
}))
400-
{
401-
using (var connection = server.CreateConnection())
402-
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
403-
{
404-
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
405-
await Assert.ThrowsAnyAsync<Exception>(() =>
406-
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
407-
enabledSslProtocols: SslProtocols.Tls,
408-
checkCertificateRevocation: false));
409-
}
410-
}
411-
412-
await loggerProvider.FilterLogger.LogTcs.Task.DefaultTimeout();
413-
Assert.Equal(3, loggerProvider.FilterLogger.LastEventId);
414-
Assert.Equal(LogLevel.Error, loggerProvider.FilterLogger.LastLogLevel);
415-
}
416-
417387
[Fact]
418388
public async Task OnAuthenticate_SeesOtherSettings()
419389
{

0 commit comments

Comments
 (0)