签署我的Mac pkg有效但安装失败了吗?

时间:2012-10-16 15:14:27

标签: macos installer certificate signing

我正在使用此命令行签署我的mac包:

Volumes/Auxiliary\ Tools/PackageMaker.app/Contents/MacOS/PackageMaker \
--sign /Users/company/src/clients/linux-client/mac/company_client_installer.pkg \
--certificate "Developer ID Application: company"

签名有效,但安装失败并出现错误。这是install.log中的相关部分:

Oct 16 16:59:33 mac installd[57355]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=102 "The package “company_client_installer.pkg” is untrusted." UserInfo=0x106a2be30 {NSLocalizedDescription=The package “company_client_installer.pkg” is untrusted., NSURL=file://localhost/Users/company/src/clients/linux-client/mac/company_client_installer.pkg#companyClient.pkg, PKInstallPackageIdentifier=com.company.company_client_installer.pkg, NSUnderlyingError=0x7ffd2a52c900 "The operation couldn’t be completed. CSSMERR_TP_NOT_TRUSTED"} {
1674             NSLocalizedDescription = "The package \U201ccompany_client_installer.pkg\U201d is untrusted.";
1675             NSURL = "file://localhost/Users/company/src/clients/linux-client/mac/company_client_installer.pkg#companyClient.pkg";
1676             NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-2147409622 \"The operation couldn\U2019t be completed. CSSMERR_TP_NOT_TRUSTED\" UserInfo=0x7ff     d2a5573b0 {SecTrustResult=5, PKTrustLevel=PKTrustLevelNotTrusted, NSLocalizedFailureReason=CSSMERR_TP_NOT_TRUSTED}";
1677             PKInstallPackageIdentifier = "com.company.company_client_installer.pkg";

如果我使用pkgutil检查签名,则返回:

pkgutil --check-signature company_client_installer.pkg
Package "company_client_installer.pkg":
  Status: signed by a certificate trusted by Mac OS X
  Certificate Chain:
    1. Developer ID Application: company
    2. Developer ID Certification Authority
    3. Apple Root CA

我尝试在“Keychain Access”中评估我的证书,并报告“找不到根证书”,但是将证书标记为“有效”并带有绿色复选标记

我现在完全糊涂了。我在这里做错了什么?有什么想法吗?

沃尔克

1 个答案:

答案 0 :(得分:0)

我不确定您的错误,但是,我知道您需要使用开发者ID安装程序证书来签署您的包。

这是我使用的命令:

productsign --sign“开发者ID安装程序:ACME,Inc(ABCDEFGHIJK)”source.pkg destination.pkg

您还可以使用以下命令验证您的包:

spctl -a -vvvv --type install MyInstaller.pkg