Skip to content
Merged
Changes from 1 commit
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 @@ -1177,14 +1177,19 @@ public static void BuildChainForCertificateSignedWithDisallowedKey()
chain.ChainPolicy.ExtraStore.Add(intermediateCert);
Assert.False(chain.Build(cert));

if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater || PlatformDetection.IsLinux)
if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater)
{
// Android always validates trust as part of building a path,
// so violations comes back as PartialChain with no elements
// Apple 26 no longer block these SKIs since the roots are no longer trusted at all and are expired.
// Linux has no concept of a blocked key list, they just remove certificates from a trust store.
Assert.Equal(X509ChainStatusFlags.PartialChain, chain.AllStatusFlags());
}
else if (PlatformDetection.IsLinux)
{
// Linux has no concept of a blocked key list, they just remove certificates from a trust store.
X509ChainStatusFlags actualFlags = chain.AllStatusFlags();
AssertExtensions.TrueExpression(actualFlags.HasFlag(X509ChainStatusFlags.PartialChain));
}
else
{
X509ChainElement certElement = chain.ChainElements
Expand Down
Loading