diff --git a/test/TestUtilities/Test.Utility/Signing/SignatureTestUtility.cs b/test/TestUtilities/Test.Utility/Signing/SignatureTestUtility.cs index 3778b765889..cd99bdbfe03 100644 --- a/test/TestUtilities/Test.Utility/Signing/SignatureTestUtility.cs +++ b/test/TestUtilities/Test.Utility/Signing/SignatureTestUtility.cs @@ -18,8 +18,7 @@ public static class SignatureTestUtility #if IS_SIGNING_SUPPORTED // Central Directory file header size excluding signature, file name, extra field and file comment private const uint CentralDirectoryFileHeaderSizeWithoutSignature = 46; -#endif -#if IS_SIGNING_SUPPORTED + /// /// Get the certificate fingerprint for a given hash algorithm /// @@ -30,8 +29,7 @@ public static string GetFingerprint(X509Certificate2 cert, HashAlgorithmName has { return CertificateUtility.GetHashString(cert, hashAlgorithm); } -#endif -#if IS_SIGNING_SUPPORTED + public static Task WaitForCertificateExpirationAsync(X509Certificate2 certificate) { DateTimeOffset notAfter = DateTime.SpecifyKind(certificate.NotAfter, DateTimeKind.Local); @@ -57,8 +55,7 @@ public static PrimarySignature GenerateInvalidPrimarySignature(PrimarySignature return PrimarySignature.Load(newBytes); } -#endif -#if IS_SIGNING_SUPPORTED + public static byte[] FindAndReplaceSequence(byte[] bytes, byte[] find, byte[] replace) { var found = false; @@ -93,8 +90,7 @@ public static byte[] FindAndReplaceSequence(byte[] bytes, byte[] find, byte[] re return byteList.ToArray(); } -#endif -#if IS_DESKTOP + /// /// unsigns a package for test purposes. /// This does not timestamp a signature and can be used outside corp network.