diff --git a/src/AzureSignTool/Program.cs b/src/AzureSignTool/Program.cs index f1b6879..d492568 100644 --- a/src/AzureSignTool/Program.cs +++ b/src/AzureSignTool/Program.cs @@ -457,9 +457,9 @@ private bool ValidateArguments(CommandRunContext context) valid = false; } - if (AppendSignature && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (AppendSignature && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { - context.Error.WriteLine("'--append-signature' requires Windows 11 or later."); + context.Error.WriteLine("'--append-signature' requires Windows Server 2022, Windows 11 or later."); valid = false; } diff --git a/test/AzureSign.Core.Tests/AuthenticodeKeyVaultSignerTests.cs b/test/AzureSign.Core.Tests/AuthenticodeKeyVaultSignerTests.cs index df5bbb4..b25ae07 100644 --- a/test/AzureSign.Core.Tests/AuthenticodeKeyVaultSignerTests.cs +++ b/test/AzureSign.Core.Tests/AuthenticodeKeyVaultSignerTests.cs @@ -27,7 +27,7 @@ public void ShouldSignExeWithRSASigningCertificates_Sha1FileDigest(string certif var fileToSign = GetFileToSign(); var result = signer.SignFile(fileToSign, null, null, null); Assert.Equal(0, result); - if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { result = signer.SignFile(fileToSign, null, null, null, appendSignature: true); Assert.Equal(0, result); @@ -45,7 +45,7 @@ public void ShouldSignExeWithRSASigningCertificates_Sha256FileDigest(string cert var fileToSign = GetFileToSign(); var result = signer.SignFile(fileToSign, null, null, null); Assert.Equal(0, result); - if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { result = signer.SignFile(fileToSign, null, null, null, appendSignature: true); Assert.Equal(0, result); @@ -64,7 +64,7 @@ public void ShouldSignExeWithECDsaSigningCertificates_Sha256FileDigest(string ce var fileToSign = GetFileToSign(); var result = signer.SignFile(fileToSign, null, null, null); Assert.Equal(0, result); - if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { result = signer.SignFile(fileToSign, null, null, null, appendSignature: true); Assert.Equal(0, result); @@ -83,7 +83,7 @@ public void ShouldSignExeWithECDsaSigningCertificates_Sha256FileDigest_WithTimes var fileToSign = GetFileToSign(); var result = signer.SignFile(fileToSign, null, null, null); Assert.Equal(0, result); - if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { result = signer.SignFile(fileToSign, null, null, null, appendSignature: true); Assert.Equal(0, result); @@ -103,7 +103,7 @@ public void ShouldSignExeWithRSASigningCertificates_Sha256FileDigest_WithTimesta var fileToSign = GetFileToSign(); var result = signer.SignFile(fileToSign, null, null, null); Assert.Equal(0, result); - if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000)) + if (OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348)) { result = signer.SignFile(fileToSign, null, null, null, appendSignature: true); Assert.Equal(0, result);