mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 06:56:17 -05:00
ci(windows): sign releases with Azure Artifact Signing and OIDC
This commit is contained in:
7 files changed
+89
-3
No files matched your search
@@ -0,0 +1,14 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string[]]$Files,
|
||||
[Parameter(Mandatory=$true)][string]$Publisher
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
foreach ($file in $Files) {
|
||||
$signature = Get-AuthenticodeSignature -LiteralPath $file
|
||||
if ($signature.Status -ne 'Valid') { throw "Invalid Authenticode signature: $file ($($signature.Status))" }
|
||||
$name = $signature.SignerCertificate.GetNameInfo([Security.Cryptography.X509Certificates.X509NameType]::SimpleName, $false)
|
||||
if ($name -ne $Publisher) { throw "Unexpected signing publisher for ${file}: $name" }
|
||||
if (!$signature.TimeStamperCertificate) { throw "Missing signature timestamp: $file" }
|
||||
Write-Host "Verified $file (publisher: $name; timestamped)"
|
||||
}
|
||||
Reference in new issue
Block a user