From 81d3148c7cd588c84a9e6cadbd7e04189127d4c9 Mon Sep 17 00:00:00 2001 From: Medeni Baykal <433724+Haplois@users.noreply.github.com> Date: Wed, 21 Oct 2020 19:13:02 +0200 Subject: [PATCH] Signing instructions for Newtonsoft.Json.dll added (#2601) * Signing instructions for Newtonsoft.Json.dll added * Added 3rdParty signature thumbprint to the accept list. --- scripts/verify-sign.ps1 | 12 ++++++++---- src/package/sign/sign.proj | 28 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/scripts/verify-sign.ps1 b/scripts/verify-sign.ps1 index a2368926d2..f3c36833ef 100644 --- a/scripts/verify-sign.ps1 +++ b/scripts/verify-sign.ps1 @@ -30,7 +30,7 @@ $env:TP_TOOLS_DIR = Join-Path $env:TP_ROOT_DIR "tools" Write-Verbose "Setup build configuration." $TPB_SignCertificate = $Certificate $TPB_Configuration = $Configuration -$TPB_AssembliesPattern = @("*test*.dll", "*qualitytools*.dll", "*test*.exe", "*datacollector*.dll", "*datacollector*.exe", "QTAgent*.exe", "VsWebSite.Interop.dll", "Microsoft.VisualStudio*.dll", "Microsoft.TestPlatform.Build.dll", "Microsoft.DiaSymReader.dll", "Microsoft.IntelliTrace*.dll", "concrt140.dll", "msvcp140.dll", "vccorlib140.dll", "vcruntime140.dll", "codecoveragemessages.dll", "covrun32.dll", "msdia140.dll", "covrun64.dll", "IntelliTrace.exe", "ProcessSnapshotCleanup.exe", "TDEnvCleanup.exe", "CodeCoverage.exe", "Microsoft.ShDocVw.dll", "UIAComwrapper.dll", "Interop.UIAutomationClient.dll", "SettingsMigrator.exe") +$TPB_AssembliesPattern = @("*test*.dll", "*qualitytools*.dll", "*test*.exe", "*datacollector*.dll", "*datacollector*.exe", "QTAgent*.exe", "VsWebSite.Interop.dll", "Microsoft.VisualStudio*.dll", "Microsoft.TestPlatform.Build.dll", "Microsoft.DiaSymReader.dll", "Microsoft.IntelliTrace*.dll", "concrt140.dll", "msvcp140.dll", "vccorlib140.dll", "vcruntime140.dll", "codecoveragemessages.dll", "covrun32.dll", "msdia140.dll", "covrun64.dll", "IntelliTrace.exe", "ProcessSnapshotCleanup.exe", "TDEnvCleanup.exe", "CodeCoverage.exe", "Microsoft.ShDocVw.dll", "UIAComwrapper.dll", "Interop.UIAutomationClient.dll", "SettingsMigrator.exe", "Newtonsoft.Json.dll") function Verify-Assemblies { @@ -54,18 +54,22 @@ function Verify-Assemblies elseif ($signature.SignerCertificate.Thumbprint -eq "5EAD300DC7E4D637948ECB0ED829A072BD152E17") { Write-Log "Valid (Prod Signed): $($_.FullName)." } - # For some dlls e.g. "Interop.UIAutomationClient.dll", sign certificate is different signature. Skip such binaries. + # For some dlls e.g. "Interop.UIAutomationClient.dll", sign certificate is different signature. Skip such binaries. elseif ($signature.SignerCertificate.Thumbprint -eq "67B1757863E3EFF760EA9EBB02849AF07D3A8080") { Write-Log "Valid (Prod Signed): $($_.FullName)." } - # For some dlls e.g. "Microsoft.VisualStudio.ArchitectureTools.PEReader.dll", sign certificate is different signature. Skip such binaries. + # For some dlls e.g. "Microsoft.VisualStudio.ArchitectureTools.PEReader.dll", sign certificate is different signature. Skip such binaries. elseif ($signature.SignerCertificate.Thumbprint -eq "9DC17888B5CFAD98B3CB35C1994E96227F061675") { Write-Log "Valid (Prod Signed): $($_.FullName)." } - # For some dlls sign certificate is different signature. Skip such binaries. + # For some dlls sign certificate is different signature. Skip such binaries. elseif ($signature.SignerCertificate.Thumbprint -eq "62009AAABDAE749FD47D19150958329BF6FF4B34") { Write-Log "Valid (Prod Signed): $($_.FullName)." } + # Microsoft 3rd Party Authenticode Signature + elseif ($signature.SignerCertificate.Thumbprint -eq "899FA016DEE8E665FF2A315A1151C43FB96C430B") { + Write-Log "Valid (Prod Signed): $($_.FullName)." + } else { Write-FailLog "Incorrect certificate. File: $($_.FullName). Certificate: $($signature.SignerCertificate.Thumbprint)." } diff --git a/src/package/sign/sign.proj b/src/package/sign/sign.proj index dad338e4cb..852bacb8ff 100644 --- a/src/package/sign/sign.proj +++ b/src/package/sign/sign.proj @@ -164,6 +164,9 @@ + + + @@ -197,7 +200,7 @@ - + @@ -209,6 +212,9 @@ + + + @@ -329,6 +335,10 @@ + + + + @@ -419,6 +429,12 @@ + + + + + + @@ -466,8 +482,18 @@ Microsoft402400 StrongName + + + 3PartySHA2 + + + +