From 0a73ca0a46f32aa0ac19edf243bfde1be7fd0e15 Mon Sep 17 00:00:00 2001 From: James Ruskin Date: Tue, 21 May 2024 09:09:50 +0100 Subject: [PATCH] (maint) Updates Install Signing Script The Chocolatey code signing script was recently changed for Reasons, and during the process our expected subject changed slightly. --- OfflineInstallPreparation.ps1 | 2 +- Start-C4bNexusSetup.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OfflineInstallPreparation.ps1 b/OfflineInstallPreparation.ps1 index b474bc3..83cca2c 100644 --- a/OfflineInstallPreparation.ps1 +++ b/OfflineInstallPreparation.ps1 @@ -50,7 +50,7 @@ if (-not (Test-Path $ChocoInstallScript)) { $Signature = Get-AuthenticodeSignature -FilePath $ChocoInstallScript -if ($Signature.Status -eq 'Valid' -and $Signature.SignerCertificate.Subject -eq 'CN="Chocolatey Software, Inc.", O="Chocolatey Software, Inc.", L=Topeka, S=Kansas, C=US') { +if ($Signature.Status -eq 'Valid' -and $Signature.SignerCertificate.Subject -eq 'CN="Chocolatey Software, Inc", O="Chocolatey Software, Inc", L=Topeka, S=Kansas, C=US') { if (-not (Get-Command choco.exe -ErrorAction SilentlyContinue)) { if (Test-Path $PSScriptRoot\files\chocolatey.*.nupkg) { $env:ChocolateyDownloadUrl = (Convert-Path $PSScriptRoot\files\chocolatey.*.nupkg)[0] diff --git a/Start-C4bNexusSetup.ps1 b/Start-C4bNexusSetup.ps1 index f25b531..2db20c8 100644 --- a/Start-C4bNexusSetup.ps1 +++ b/Start-C4bNexusSetup.ps1 @@ -82,7 +82,7 @@ process { $Signature = Get-AuthenticodeSignature -FilePath $ChocoInstallScript - if ($Signature.Status -eq 'Valid' -and $Signature.SignerCertificate.Subject -eq 'CN="Chocolatey Software, Inc.", O="Chocolatey Software, Inc.", L=Topeka, S=Kansas, C=US') { + if ($Signature.Status -eq 'Valid' -and $Signature.SignerCertificate.Subject -eq 'CN="Chocolatey Software, Inc", O="Chocolatey Software, Inc", L=Topeka, S=Kansas, C=US') { New-NexusRawComponent -RepositoryName 'choco-install' -File $ChocoInstallScript } else { Write-Error "ChocolateyInstall.ps1 script signature is not valid. Please investigate."