为Windows UWP签名appx文件时出现错误0x80080209 [英] Error 0x80080209 when signing appx file for Windows UWP
问题描述
我已经构建了Windows 10 UWP cordova应用程序,现在正在尝试对其进行签名.我已经有一个证书可用于其他地方(用于对.net程序集进行签名),因此我认为我将为该应用程序签名使用同一证书.
I have build a Windows 10 UWP cordova application, and are now trying to sign it. I already have a certificate that is used elsewhere (to sign .net assemblies) so I thought I would use the same one for this application signing.
使用signtool.exe时,出现以下错误.
When I use the signtool.exe, I get the following error..
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)
Looking in the event log as suggested here, I see no errors just 2 information messages
阅读器是在没有清单验证的情况下成功创建的.
我确保AppxManifest.xml文件中的Publisher
字段与证书中的主题匹配.
I have made sure the Publisher
fields in the AppxManifest.xml file matches the subject in the certificate.
在此处中,我将其描述为>
Looking here, I see this described as
0x80080209-APPX_E_INVALID_SIP_CLIENT_DATA
Description : The SIP_SUBJECTINFOstructure used to sign the package didn’t
contain the required data
有人知道这意味着什么吗?
Does anyone have any idea what this means?
[UPDATE1]
在上述操作失败后,我尝试按照此处.
After the above failed, I attempted to create a new certificate as outlined 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中,......
In my AppxManifest.xml I have...
<Identity Name="com.mycompany.myapp" Publisher="CN=My Company Pty Ltd, O=MyCompany Pty Ltd, C=AU" Version="1.0.1.1" ProcessorArchitecture="x86" />
使用上述方法时,我仍然会遇到相同的错误.
I still get the same error when using the above.
[UPDATE 2]
我正在使用的signtool命令是
The signtool command I am using is
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
此处.
我也尝试使用SHA384
和SHA512
.还有一些尝试使用/debug
的建议,但我收到一条错误消息,提示/debug
是无效的选项.
I have also tried using SHA384
and SHA512
. There is also the suggestions to try using the /debug
and I get an error suggesting /debug
is an invalid option.
[UPDATE3] 它似乎是证书.我尝试通过Visual Studio使用(打包,选择证书),但在输入密码后出现以下错误
[UPDATE3] It appears to be the certificate. I tried to use via Visual Studio (Packaging, Choose certificate), but get the following error (after entering the password)
.. and yets I have followed the instructions here (and triple checked).
这些说明有误吗?
推荐答案
我遇到了类似的问题:
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)
I had a similar issue:
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)
但是没有日志条目,清单是正确的.
But had no log entries, and the manifest was correct.
我们的解决方法是使用msvc2017而不是msvc2015进行编译.
Our fix was to compile with msvc2017, not msvc2015.
这篇关于为Windows UWP签名appx文件时出现错误0x80080209的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!