Skip to content

Commit 12c5dd7

Browse files
Suppress credscan warnings in X.509 test files (#91080)
Co-authored-by: Levi Broderick <levib@microsoft.com>
1 parent a1b7571 commit 12c5dd7

File tree

1 file changed

+4
-2
lines changed
  • src/libraries/System.Security.Cryptography/tests/X509Certificates

1 file changed

+4
-2
lines changed

src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ internal static class TestData
5151

5252
// This pfx was generated by new X509Certificate(MsCertificate).Export(X509ContentType.Pfx)
5353
// and was choosen when the padding was 01 and caused a false-positive on decryption.
54-
public static byte[] MsCertificateExportedToPfx_NullPassword = Convert.FromBase64String(@"
54+
public static byte[] MsCertificateExportedToPfx_NullPassword = Convert.FromBase64String(
55+
/* [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This PKCS#12 blob only contains public info.")] */ @"
5556
MIIFxAIBAzCCBYoGCSqGSIb3DQEHAaCCBXsEggV3MIIFczCCBW8GCSqGSIb3DQEH
5657
BqCCBWAwggVcAgEAMIIFVQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIKpCU
5758
u5nlxAACAggAgIIFKG/SLlS1TJmxGUiXBPJ1r4yV+JMehwo6RYPMkCSnpKGaiLyA
@@ -3057,7 +3058,8 @@ internal static DSAParameters GetDSA1024Params()
30573058
"4D7314FCB4041469835268466D1390373566F7034C4736346CD17D020207D0").HexToByteArray();
30583059

30593060
internal static readonly byte[] Pkcs12NoPasswordRandomCounts =
3060-
Convert.FromBase64String(@"
3061+
Convert.FromBase64String(
3062+
/* [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Self-signed cert created specifically for inclusion in public-facing unit tests.")] */ @"
30613063
MIIvdAIBAzCCLtQGCSqGSIb3DQEHAaCCLsUEgi7BMIIuvTCCLrkGCSqGSIb3DQEHAaCCLqoEgi6m
30623064
MIIuojCCAvkGCyqGSIb3DQEMCgECoIIC6DCCAuQwXgYJKoZIhvcNAQUNMFEwMAYJKoZIhvcNAQUM
30633065
MCMEELD+7LV5Y9tyUiJnNeZVLwQCASowDAYIKoZIhvcNAgsFADAdBglghkgBZQMEASoEEBzHfelA

0 commit comments

Comments
 (0)