From 8751100db83867a79a5595ae188544ab71e30a02 Mon Sep 17 00:00:00 2001 From: Sharla <45182130+sharlaakers@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:01:03 -0700 Subject: [PATCH 1/2] Signed modify package publisher script --- .../modify-package-publisher.ps1 | 413 +++++++++++++++++- 1 file changed, 412 insertions(+), 1 deletion(-) diff --git a/Scripts/ModifyPackagePublisher/modify-package-publisher.ps1 b/Scripts/ModifyPackagePublisher/modify-package-publisher.ps1 index 5d9ea57..612c7f5 100644 --- a/Scripts/ModifyPackagePublisher/modify-package-publisher.ps1 +++ b/Scripts/ModifyPackagePublisher/modify-package-publisher.ps1 @@ -1,219 +1,630 @@ -<# +<# + .SYNOPSIS + This script will update the publisher in the app manifest and resign the package based on a new certificate. The script is currently limited to msix packages only and not msixbundles. + + [NOTE]: The script should be run from within the folder context. All the required dependencies are present within the zip file. You will need to modify the relative paths to + packageeditor and signtool if the script needs to be run from a different context. + + [NOTE]: The script was verified on the Windows 10 1809. + + .DESCRIPTION + modify-package-publisher.ps1 is a PowerShell script. It takes a directory containing MSIX packages along with a cert file as required inputs. The script retrives the publisher info from the cert and modifies the manifest file inside the MSIX package to reflect the publisher retrieved from the cert file. Then, the script repacks the MSIX package with the new manifest. + + .PARAMETER <-directory> + [Required] This parameter takes the directory containing the MSIX packages. + + .PARAMETER <-certPath> + [Required] This parameter takes the path to the cert file that will be used to get the publisher/Subject info. + + .PARAMETER <-redist> + [Required] This parameter takes the directory of the redist for signtool and PackageEditor + + .PARAMETER <-pfxPath> + This parameter takes the path to the pfx file that will be use to sign the MSIX package. This is an optional parameter. + + .PARAMETER <-password> + This parameter is the password to the .pfx file. This is only required if the specified .pfx file is protected via password. + + .PARAMETER <-forceContinue> + This is an optional parameter which default to false. If the parameter is specified, the script will ignore the failed operations and continue with the next msix package if available. + + .EXAMPLE + .\modify-package-publisher.ps1 -directory "C:\MSIX" -redist "C:\MSIX-Toolkit\Redist" -certPath "C:\cert\mycert.cer" + + .EXAMPLE + .\modify-package-publisher.ps1 -directory "C:\MSIX" -redist "C:\MSIX-Toolkit\Redist" -certPath "C:\cert\mycert.cer" -pfxPath "C:\cert\CertKey.pfx" + + .EXAMPLE + .\modify-package-publisher.ps1 -directory "C:\MSIX" -redist "C:\MSIX-Toolkit\Redist" -certPath "C:\cert\mycert.cer" -pfxPath "C:\cert\CertKey.pfx" -password "aaabbbccc" + + .EXAMPLE + .\modify-package-publisher.ps1 -directory "C:\MSIX" -redist "C:\MSIX-Toolkit\Redist" -certPath "C:\cert\mycert.cer" -pfxPath "C:\cert\CertKey.pfx" -forceContinue + #> + + #Input Arguments for the script + param( + [Parameter(Mandatory=$true)][string]$directory, + [Parameter(Mandatory=$true)][string]$certPath, + [Parameter(Mandatory=$true)][string]$redist, + [string]$pfxPath, + [string]$password, + [switch]$forceContinue=$false + ) + + + #relative paths to the tools used to repackage and sign + $packageEditorExe = $redist + "\PackageEditor.exe" + $signToolExe = $redist + "\signtool.exe" + + #retreive publisher info from the .cer file + function GetCertPublisher + { + + $cert = New-Object -TypeName "System.Security.Cryptography.X509Certificates.X509Certificate" + $cert.Import($certPath) + $certPublisher = $cert.Subject + $certPublisher + + } + + #Modify the publisher info in appxmanifest.xml file and repack the msix package + function ModifyPackagePublisher + { + $msixFiles = Get-ChildItem $directory -Recurse -File -Filter *.msix + + foreach ($item in $msixFiles) + { + Add-Type -AssemblyName System.IO.Compression.FileSystem -ErrorAction Stop + $filesToExtract = @("appxmanifest.xml";) + $zipPath = $item.FullName + + try + { + $zip = [System.IO.Compression.ZipFile]::OpenRead($zipPath) + } + catch + { + Write-Host "Failed to open the MSIX package: " $zipPath + if ($forceContinue) + { + Write-Host "Proceeding with next MSIX package if available." + continue + } + else + { + Exit 1 + } + } + + foreach($entry in $zip.Entries){ + if ($filesToExtract -contains $entry.FullName) + { + $dst = [io.path]::combine($env:temp, $entry.FullName) + + if (Test-Path -Path $dst) + { + Remove-Item -Path $dst + } + + Write-Verbose $("Extract ==> {0}" -f @($dst)) + Write-Host "Extracting package manifest" + try + { + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $dst) + } + catch + { + Write-Host "Failed to extract the file to the temp location- source: " $entry " destination: " $dst + if ($forceContinue) + { + Write-Host "Proceeding with next MSIX package if available." + continue + } + else + { + Exit 1 + } + } + } + } + + $zip.Dispose() + + $manifestPath = ([System.IO.Path]::Combine($env:temp, "AppxManifest.xml")) + + if ((Test-Path $manifestPath) -eq $false) + { + Write-Host "Cannot find AppxManifest.xml file. Check if the provided package has a manifest file." + if ($forceContinue) + { + Write-Host "Proceeding with next MSIX package if available." + continue + } + else + { + Exit 1 + } + } + + Write-Host "Modifying Package Publisher in the extracted manifest" + $packagePublisherElement = Select-Xml -path $manifestPath -XPath "//*[local-name()='Identity']/@Publisher" + $packagePublisherElement.Node.Value = GetCertPublisher + Write-Host "New publisher: $($packagePublisherElement.Node.Value)" + $packagePublisherElement.Node.OwnerDocument.Save($manifestPath) + + $packageEditorCmd = ("& `"" + $packageEditorExe + "`" updateManifest -p `"" + $($item.FullName) + "`" -m `"" + $manifestPath + "`" -l") + + Write-Host "Re-package $($item.FullName) with manifest $manifestPath" + Invoke-Expression $packageEditorCmd + + if ($LASTEXITCODE) + { + if (!$forceContinue) + { + Exit 1 + } + + } + Write-Host "Modified MSIX Package: " $item.FullName + + #Cleaning up the remaining temp Manifest file + Remove-Item -Path $manifestPath + + if (![string]::IsNullOrEmpty($pfxPath)) + { + Write-Host "Signing Package" + SignPackage ($($item.FullName)) + } + Write-Host "--------------------------------`n--------------------------------`n--------------------------------" + } + + } + + #Sign the package specified in the path with the provided pfx file + function SignPackage ([string]$path) + { + if ([string]::IsNullOrEmpty($password)) + { + $signToolCmd = ("& `"" + $signToolExe + "`" sign /f `"" + $pfxPath + "`" /fd SHA256 `"" + $path + "`"" ) + # & "SDK_Signing_Tools\signtool.exe" sign /f ".\CertKey.pfx" /fd SHA256 "C:\msix\MyEmployees.msix" + Write-Host $signToolCmd + Invoke-Expression $signToolCmd + if ($LASTEXITCODE) + { + if (!$forceContinue) + { + Exit 1 + } + } + } + else + { + $signToolCmd = ("& `"" + $signToolExe + "`" sign /f `"" + $pfxPath + "`" /p " + $password + " /fd SHA256 `"" + $path + "`"" ) + # & "SDK_Signing_Tools\signtool.exe" sign /f ".\CertKey.pfx" /fd SHA256 "C:\msix\MyEmployees.msix" /p "My!Pa$$word" + + Write-Host $signToolCmd + Invoke-Expression $signToolCmd + if ($LASTEXITCODE) + { + if (!$forceContinue) + { + Exit 1 + } + } + } + + } + + #Main Function + ModifyPackagePublisher +# SIG # Begin signature block +# MIIjogYJKoZIhvcNAQcCoIIjkzCCI48CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCNlMcGBDYD+jnY +# t8l400mAK7FTNLYBgAzxfnT+hfB7rKCCDYEwggX/MIID56ADAgECAhMzAAABUZ6N +# j0Bxow5BAAAAAAFRMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMTkwNTAyMjEzNzQ2WhcNMjAwNTAyMjEzNzQ2WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQCVWsaGaUcdNB7xVcNmdfZ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g82aaml13VQ3jPrIfgpIjS7QLezzlzP7vEhpM4S +# v3lugpv1m/3tWVqL/tjExX9HSllb4/VuD3pkZTlGvWh+I+sgRxL0VYcNgrkuCxY1 +# 8u9/VwfyY1nyv1ZK/bsbHD3akAp0K67ahaPLLso3Q5WRShTPTRo3WGTuoK0kwj9/ +# 0fVwGm5J +# SIG # End signature block From edf2dde071cea9719b31ac2421c4845ed0e1a934 Mon Sep 17 00:00:00 2001 From: Sharla <45182130+sharlaakers@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:07:46 -0700 Subject: [PATCH 2/2] Update readme.md --- Scripts/ModifyPackagePublisher/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/ModifyPackagePublisher/readme.md b/Scripts/ModifyPackagePublisher/readme.md index 03c3e08..1178869 100644 --- a/Scripts/ModifyPackagePublisher/readme.md +++ b/Scripts/ModifyPackagePublisher/readme.md @@ -3,6 +3,8 @@ Use this script to repackage and sign a MSIX package after modifying the publisher info in the manifest to match that of the cert that will be used to sign the package. +This script is signed, but you may need to allow the script to run once or run always, before you can proceed. + **NOTE:** The script should be run from within the folder context. All the required dependencies are present within the zip file redist folder. You will need to modify the relative paths to packageeditor and signtool if the script needs to be run from a different context.