diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs index d9039f4bd88715..b45b24273199a8 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs +++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs @@ -42,7 +42,6 @@ public static void EmptyAiaResponseIsIgnored() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/47492", TestPlatforms.OSX)] public static void DisableAiaOptionWorks() { CertificateAuthority.BuildPrivatePki( @@ -65,6 +64,14 @@ public static void DisableAiaOptionWorks() cuCaStore.Open(OpenFlags.ReadWrite); X509Chain chain = holder.Chain; + + // macOS combines revocation and AIA fetching in to a single flag. Both need to be disabled + // to prevent AIA fetches. + if (PlatformDetection.IsOSX) + { + chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; + } + chain.ChainPolicy.DisableCertificateDownloads = true; chain.ChainPolicy.CustomTrustStore.Add(rootCert); chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust; @@ -102,12 +109,6 @@ public static void DisableAiaOptionWorks() Assert.Contains(X509ChainStatusFlags.PartialChain, chain.ChainStatus.Select(s => s.Status)); holder.DisposeChainElements(); - // macOS doesn't like our revocation responder, so disable revocation checks there. - if (PlatformDetection.IsOSX) - { - chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; - } - chain.ChainPolicy.ExtraStore.Add(intermediateCert); Assert.True(chain.Build(endEntity), "Chain build with intermediate, AIA disabled"); Assert.Equal(3, chain.ChainElements.Count);