From: Jeremy Barton Date: Wed, 5 Jun 2019 14:48:22 +0000 (-0700) Subject: Reenable BuildInvalidSignatureTwice with better diagnostics X-Git-Tag: submit/tizen/20210909.063632~11031^2~1389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=498985b6dc1b1f6348d5584b8fa9737dd36e9d18;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Reenable BuildInvalidSignatureTwice with better diagnostics Commit migrated from https://github.com/dotnet/corefx/commit/09c3160b52e1e47b3a92c837337672d1b426e170 --- diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs index 3b61c25..983958a 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs +++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs @@ -856,7 +856,6 @@ tHP28fj0LUop/QFojSZPsaPAW6JvoQ0t4hd6WoyX6z7FsA== } } - [ActiveIssue(36124, TestPlatforms.Windows)] [Fact] public static void BuildInvalidSignatureTwice() { @@ -896,9 +895,9 @@ tHP28fj0LUop/QFojSZPsaPAW6JvoQ0t4hd6WoyX6z7FsA== } else { - Assert.False(valid, $"Chain is valid on execution {iter}"); - - Assert.Equal(3, chain.ChainElements.Count); + // These asserts are "most informative first". + // (There was an interval where valid was reporting as true in CI, but + // that is the least informative failure) // Clear UntrustedRoot, if it happened. allFlags &= ~X509ChainStatusFlags.UntrustedRoot; @@ -906,6 +905,10 @@ tHP28fj0LUop/QFojSZPsaPAW6JvoQ0t4hd6WoyX6z7FsA== Assert.Equal( X509ChainStatusFlags.NotSignatureValid, allFlags); + + Assert.Equal(3, chain.ChainElements.Count); + + Assert.False(valid, $"Chain is valid on execution {iter}"); } chainHolder.DisposeChainElements();