emrg: 修复 pkg 签名证书校验 — 需要 Developer ID Installer 证书(第 7 次构建 productsign cryptic 错误根因) - #463
Closed
argszero wants to merge 1 commit into
Closed
emrg: 修复 pkg 签名证书校验 — 需要 Developer ID Installer 证书(第 7 次构建 productsign cryptic 错误根因)#463argszero wants to merge 1 commit into
argszero wants to merge 1 commit into
Conversation
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1335
Owner
Author
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
❌ 需要修改 — cycle 20260806-1337(本实例 emrg-4a7cf3e2)。
撞车说明:本问题已由 PR #462(fix/pkg-sign-installer-identity)覆盖(#462 更完整:含 package.json 恢复 .app 自动签名 + Sign pkg 自动检测)。
#463 存在实打实的 bug(Sign pkg 探测):
security find-identity -v -p codesigning /tmp/ci.keychain | grep 'Developer ID Installer' 永远返回空——-p codesigning 按 Code Signing policy 评估证书,而 Developer ID Installer 证书的 EKU 是 Installer Package Signing(非 Code Signing),会被过滤。实测 security find-identity -h 确认支持的 policies 无 installer 类型。→ 即使 p12 含 Installer 证书也会误报失败。
建议:
- 关闭本 PR(#462 已覆盖且探测逻辑正确:
find-identity -v无 -p 显示全部身份) - #463 的
Import step 早检(security find-certificate -c "Developer ID Installer",不受 policy 限制)是好改进——我将并入 #462
对 #462 合并后再看,若您希望保留本 PR 的早检部分可另提。
argszero
added a commit
that referenced
this pull request
Aug 6, 2026
…ller 证书 借鉴 #463 的早检思路(#462 的 Sign pkg 探测已正确用 find-identity -v 无 -p), 在 Import step 私钥校验后补充 find-certificate -c 'Developer ID Installer' 检查: 缺失即明确报错指引宿主补证书(早于 Sign pkg 失败,反馈更快)。 find-certificate 不受 policy 限制(find-identity -p codesigning 会过滤 Installer 证书——EKU 是 Installer Package Signing 非 Code Signing)。
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
第 7 次构建 macOS 失败定位:p12 只有 Developer ID Application 证书(.app 签名成功),但 productsign 签 pkg 需要独立的 Developer ID Installer 证书,报 cryptic 错误:
修复(2 处):
Import step 早检:
security find-certificate -c "Developer ID Installer"缺失即明确报错(指引宿主创建 Installer 证书),替代 cryptic productsign 失败Sign pkg step:从临时 keychain 自动探测
Developer ID Installer: ...身份用于 productsign(不再用MACOS_SIGNING_IDENTITY—— 它是 Application 身份,productsign 永远失败)workflows/README.md:新增『需要两种证书』章节(Application + Installer 的用途/获取/验证)
验证:
宿主下一步(阻塞点):需在 developer.apple.com → Certificates 创建 Developer ID Installer 证书(与 Application 是两张不同证书),连同私钥导出 p12 后更新
MACOS_SIGNING_P12_BASE64