feat(client): 锁定终局结果并接入 Windows 签名构建
- fix(match): 首次归零结束对局并撤销双方扣血许可,裁判结果同步后不再改判 - fix(hud): 蓝方低血量始终保留队伍颜色 - build(windows): 校验代码签名身份和时间戳,明确标注未签名测试包 - docs(version): 说明发布标签基线与语义版本迭代
This commit is contained in:
26 files changed
+823
-229
No files matched your search
@@ -0,0 +1,23 @@
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
$build = Join-Path $PSScriptRoot 'build-windows-release.ps1'
|
||||
function Must-Reject([scriptblock]$Action, [string]$Expected) {
|
||||
$rejected = $false
|
||||
try { & $Action } catch {
|
||||
if ($_.Exception.Message -notmatch $Expected) { throw }
|
||||
$rejected = $true
|
||||
}
|
||||
if (-not $rejected) { throw 'Signing preflight accepted an invalid configuration.' }
|
||||
}
|
||||
Must-Reject { & $build -CertificateThumbprint '' -PreflightOnly } 'certificate is required'
|
||||
Must-Reject { & $build -CertificateThumbprint 'not-a-certificate' -AllowUnsigned -PreflightOnly } 'Invalid.*thumbprint'
|
||||
Must-Reject { & $build -CertificateThumbprint ('0' * 40) -AllowUnsigned -PreflightOnly } 'not found'
|
||||
Must-Reject { & $build -CertificateThumbprint '' -AllowUnsigned -TimestampUrl 'file:///tmp/timestamp' -PreflightOnly } 'Timestamp URL'
|
||||
Must-Reject { & $build -CertificateThumbprint '' -AllowUnsigned -TimestampUrl 'https://user:secret@example.invalid' -PreflightOnly } 'Timestamp URL'
|
||||
$result = & $build -CertificateThumbprint '' -AllowUnsigned -PreflightOnly
|
||||
if ($result.signing -or -not $result.unsignedExplicitlyAllowed -or $result.digestAlgorithm -ne 'sha256' -or -not $result.tsp) {
|
||||
throw 'Explicit unsigned preflight returned inconsistent signing metadata.'
|
||||
}
|
||||
Write-Host 'Windows signing preflight: 6 checks passed; no certificates or system settings were changed.'
|
||||
Reference in new issue
Block a user