Skip to content

Commit bfb510c

Browse files
committed
Check Cert
1 parent 469ddb5 commit bfb510c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

scripts/build/windows/signtool.ps1

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,26 @@ foreach ($d in $dir) {
3737
}
3838

3939
$leaf = $d.FullName.split("\")[-1]
40-
Write-Host "Leaf: $leaf"
4140

4241
$version = $leaf -replace ".","" -as [int]
4342

4443
if ($version -gt $newest_version) {
45-
$newest_version
46-
$newest_version_path = $d
44+
$newest_version = $version
45+
$newest_version_path = $d.FullName
4746
}
4847
}
4948

5049
$signtool = "$($newest_version_path)\x64\signtool.exe"
5150

5251
Write-Host "Signtool: $($signtool)"
5352

53+
$certificate = '.\certificate.pfx'
54+
55+
# Create Cert
56+
$cert_bytes = [Convert]::FromBase64String($cert_base64)
57+
[IO.File]::WriteAllBytes($certificate, $cert_bytes)
58+
59+
# Import Cert
60+
certutil -f -p $cert_passwd -importpfx $certificate
61+
Set-Location Cert:\CurrentUser\My
62+
Get-ChildItem | Format-Table FriendlyName, Thumbprint, Subject

0 commit comments

Comments
 (0)