UWP APPX包签名工具错误:签名()失败。(-2147024885/0x8007000b) [英] UWP appx package Signtool "Error: SignerSign() failed." (-2147024885/0x8007000b)
本文介绍了UWP APPX包签名工具错误:签名()失败。(-2147024885/0x8007000b)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编辑
事件日志错误如下:
error 0x8007000B: The app manifest publisher name (CN=...)
must match the subject name of the signing certificate
(CN={19BE29DF-4812-4F2E-8FC1-A138B146946A}).
下面的命令现在似乎起作用了。因此,要么是我无法识别的用户错误,要么是我看到这个时机器的状态有问题。事件日志消息中与签名证书关联的GUID与证书在证书管理器管理单元中显示的内容不同,这很奇怪。
原始问题
我正在尝试对使用MakeAppx.exe
生成的UWP APPX包进行签名。PFX是使用https://msdn.microsoft.com/windows/uwp/porting/desktop-to-uwp-manual-conversion中的这些命令生成的开发人员代码签名证书。
C:> MakeCert.exe -r -h 0 -n "CN=<publisher_name>" -eku 1.3.6.1.5.5.7.3.3 -pe -sv <my.pvk> <my.cer>
C:> pvk2pfx.exe -pvk <my.pvk> -spc <my.cer> -pfx <my.pfx>
私钥位于我受信任的根证书存储中,在我使用Desktop App Converter从安装程序生成Appx时有效。
我使用的命令行是:
signtool.exe sign -f <path to my pfx file> -fd SHA256 -v .FishTank.appx
但是SignTool
出错:
The following certificate was selected:
Issued to: ...
Issued by: ...
Expires: Sat Dec 31 18:59:59 2039
SHA1 hash: ...
Done Adding Additional Store
Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b)
证书发布者与appnat.xml中的内容匹配
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
<Identity Name="..."
ProcessorArchitecture="x64"
Publisher="CN=..."
Version="1.1.0.0" />
<Properties>
<DisplayName>Fish Tank</DisplayName>
<PublisherDisplayName>Reserved</PublisherDisplayName>
<Description>Some fish. Swimming around on your screen.</Description>
<Logo>StoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14316.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust"/>
</Capabilities>
<Applications>
<Application Id="FishTank" Executable="FishTank.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
BackgroundColor="#464646"
DisplayName="Fish Tank"
Square150x150Logo="Square150x150Logo.png"
Square44x44Logo="Square44x44Logo.png"
Description="Some fish. Swimming around on your screen." />
</Application>
</Applications>
</Package>
推荐答案
就像回答的here一样(不过错误代码不同)-您必须确保发布者名称(在AppxManifest.xml文件中)与证书的发布者相同。
有关详细信息,请参阅here(位于底部"备注"部分)。
这篇关于UWP APPX包签名工具错误:签名()失败。(-2147024885/0x8007000b)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文