我已经构建了一个 Windows 10 UWP cordova 应用程序,现在正尝试对其进行签名。我已经有一个在别处使用的证书(用于签署 .net 程序集),所以我想我会使用同一个证书来签署这个应用程序。
当我使用 signtool.exe 时,出现以下错误。
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)
按照建议查看事件日志here ,我没有看到任何错误,只有 2 条信息消息
无需 list 验证即可成功创建阅读器。
我已确保 AppxManifest.xml 文件中的 Publisher
字段与证书中的主题匹配。
寻找 here ,我将其描述为
0x80080209-APPX_E_INVALID_SIP_CLIENT_DATA
Description : The SIP_SUBJECTINFOstructure used to sign the package didn’t
contain the required data
有人知道这是什么意思吗?
[更新1]
在上述失败后,我尝试创建一个新证书,如here所述.
我使用了以下内容。
# create
New-SelfSignedCertificate -Type Custom -Subject "CN=My Company Pty Ltd, O=My Company Pty Ltd, C=AU" -KeyUsage DigitalSignature -FriendlyName mycert_uwp -CertStoreLocation "Cert:\LocalMachine\My"
# get info
Set-Location Cert:\LocalMachine\My
Get-ChildItem | Format-Table Subject, FriendlyName, Thumbprint
# export
$pwd = ConvertTo-SecureString -String password123 -Force -AsPlainText
Export-PfxCertificate -cert "Cert:\LocalMachine\My\17BBBBBB2DC49F550671AF3E72120C88E2333333" -FilePath h:\0\mycert_uwp.pfx -Password $pwd
一切似乎都工作正常。
在我的 AppxManifest.xml 中我有...
<Identity Name="com.mycompany.myapp" Publisher="CN=My Company Pty Ltd, O=MyCompany Pty Ltd, C=AU" Version="1.0.1.1" ProcessorArchitecture="x86" />
使用上述方法时,我仍然遇到同样的错误。
[更新 2]
我使用的signtool命令是
signtool sign /fd SHA256 /a /f myapp_uwp.pfx /p may password c:\dev\myapp\platforms\windows\build\windows\release\x86\win10\Upload\CordovaApp.Windows10_1.0.1.1_x86\CordovaApp.Windows10_1.0.1.1_x86.appx
概述here .
我也尝试过使用 SHA384
和 SHA512
。还有尝试使用 /debug
的建议,但我收到一条错误消息,提示 /debug
是无效选项。
[更新3] 好像是证书我尝试通过 Visual Studio 使用(打包,选择证书),但出现以下错误(输入密码后)
.. 然而我已经按照说明操作了 here (并进行三重检查)。
这些指令错了吗??
最佳答案
以防其他人遇到类似问题(签名时出现 0x80080209 错误),较新版本的签名工具(来自 Windows 10 SDK 的那个)对我有用
关于uwp - 为 Windows UWP 签名 appx 文件时出现错误 0x80080209,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45292356/