接入自签名代码签名:主 exe、watchdog、安装包与卸载器统一签名
mygo.json 增加 windows.signCommand -> scripts/codesign/sign-file.ps1(PowerShell Set-AuthenticodeSignature,不依赖 Windows SDK)。新增 new-cert.ps1 生成 10 年期自签名证书、trust.ps1 导入当前用户 Root + TrustedPublisher(certutil 静默导入)。公钥 certs/ZeroOrigin-CodeSign.cer 进仓库,*.pfx 进 .gitignore。AGENTS.md / 架构文档 / README 同步签名流程与三条坑。
This commit is contained in:
1 parent
2886a61d10
commit
37827eb8c7
9 files changed
+237
-10
No files matched your search
@@ -20,7 +20,8 @@ Windows 轻量自动化工具箱:**单个 mygo 进程**(托盘常驻 + 原
|
||||
|
||||
1. 改 `mygo.json` 的 `version`;
|
||||
2. 在 `CHANGELOG.md` 里加 `## <版本号>` 段(mygo 用它做更新窗口的发布说明);
|
||||
3. `build.bat quick`(需要 `%APPDATA%\mygo\update-keys\mygo-update.key` 才会签名并产出更新包);
|
||||
3. `build.bat`(完整构建才产出安装版;`quick` 会跳过 setup。需要
|
||||
`%APPDATA%\mygo\update-keys\mygo-update.key` 才会签名并产出更新包);
|
||||
4. 发布:
|
||||
|
||||
```powershell
|
||||
@@ -29,3 +30,20 @@ Windows 轻量自动化工具箱:**单个 mygo 进程**(托盘常驻 + 原
|
||||
```
|
||||
|
||||
脚本会先传归档与 delta,最后传 manifest,并先删除同名的旧 manifest 附件。
|
||||
|
||||
## 代码签名(自签名)
|
||||
|
||||
构建产物(`ZerOriginTool.exe`、`watchdog.exe`、安装包与卸载器)都带 Authenticode 签名,
|
||||
用于消除本机的「发布商:未知发布者」提示:
|
||||
|
||||
- 公钥证书:[`certs/ZeroOrigin-CodeSign.cer`](certs/ZeroOrigin-CodeSign.cer);
|
||||
- 新机器先导入信任(当前用户,无需管理员):
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\codesign\trust.ps1
|
||||
```
|
||||
|
||||
- 私钥备份在 `%APPDATA%\ZerOriginTool\codesign\`(**不进仓库**,换机/重装前请备份)。
|
||||
|
||||
自签名只对**导入过这张根证书的机器**有效;对外分发仍会提示未知发布者,要彻底解决需要
|
||||
CA 签发的代码签名证书。
|
||||
Reference in new issue
Block a user