File: windows_sign_dlls.ps1

package info (click to toggle)
meshlab 2022.02%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 47,348 kB
  • sloc: cpp: 536,635; ansic: 27,783; sh: 539; makefile: 36
file content (12 lines) | stat: -rw-r--r-- 409 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
param($pssw, $path, $cert_path="")

if ([string]::IsNullOrEmpty($cert_path)) {
    $cert_path = Join-Path $PSScriptRoot ..\..\..\certificate\certificate.pfx
}

$files = Get-ChildItem $path -include ('*.exe', '*.dll') -Recurse

for ($i=0; $i -lt $files.Count; $i++) {
    $file = $files[$i].FullName
    signtool.exe sign /fd SHA256 /f $cert_path /p $pssw /t http://timestamp.comodoca.com/authenticode $file
}