Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing ConnectWithRevocation_ServerCertWithoutContext_NoStapleOcsp failures #83013

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ internal void UpdateOptions(SslServerAuthenticationOptions sslServerAuthenticati
if (certificateWithKey != null && certificateWithKey.HasPrivateKey)
{
// given cert is X509Certificate2 with key. We can use it directly.
CertificateContext = SslStreamCertificateContext.Create(certificateWithKey, null);
CertificateContext = SslStreamCertificateContext.Create(certificateWithKey, additionalCertificates: null, offline: false, trust: null, noOcspFetch: true);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,9 @@ public Task ConnectWithRevocation_StapledOcsp(bool offlineContext, bool noInterm

[Fact]
[PlatformSpecific(TestPlatforms.Linux)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/70981", typeof(PlatformDetection), nameof(PlatformDetection.IsDebian10))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/70981", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public Task ConnectWithRevocation_ServerCertWithoutContext_NoStapledOcsp()
{
// Offline will only work if
// a) the revocation has been checked recently enough that it is cached, or
// b) the server stapled the response
//
// At high load, the server's background fetch might not have completed before
// this test runs.
// When using specific certificate, OCSP is disabled e.g. when SslStreamCertificateContext is passed in explicitly.
return ConnectWithRevocation_WithCallback_Core(X509RevocationMode.Offline, offlineContext: null);
}

Expand Down