From aa0376933b61f004583b6ffe0eae225339eacc76 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Mon, 4 Aug 2025 11:52:02 -0700 Subject: [PATCH] Always tamper the signature in the data area --- .../Cryptography/X509Certificates/CertificateAuthority.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs index 00198a9ac853e3..360c4e36c41190 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs @@ -488,7 +488,7 @@ private byte[] BuildCrlManually( if (CorruptRevocationSignature) { - signature[5] ^= 0xFF; + signature[^2] ^= 0xFF; } // CertificateList @@ -643,7 +643,7 @@ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } if (CorruptRevocationSignature) { - signature[5] ^= 0xFF; + signature[^2] ^= 0xFF; } writer.WriteBitString(signature);