Signtool error: No certificates were found that me

2019-01-21 03:27发布

So, I'm trying to sign a Windows 8 appx package with a pfx file I have. I'm using a command like so:

signtool.exe sign /fd sha256 /f "key.pfx" "app.appx"

And from this, I get:

SignTool Error: No certificates were found that met all the given criteria.

What "criteria" am I not meeting? This is only for testing so these are self-signed certificates. I've tried importing the key and then signing it, but it always results in the same error. How do I fix this?

17条回答
别忘想泡老子
2楼-- · 2019-01-21 03:57

Go to project properties and uncheck all fields from the Firm before init the compilation

查看更多
Anthone
3楼-- · 2019-01-21 04:03

I had this problem and I'm not entirely sure which step below made it work, but hope this helps somebody else...this is what I did:

  • Install the downloaded certificate (.crt) into certificates (I put it into “personal” store) - right click on .crt file and click Install Certificate.
  • Run certmgr.msc and export the certificate (found in whichever store you used in the 1st step) as a pfx file including private key, and extended properties (probably unnecessary)
  • Use the exported .pfx file when signing your project
  • Example signtool: signtool sign /f "c:\mycert.pfx" /p mypassword /d "description" /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath)
    where the password is the same as provided during Export
查看更多
叛逆
4楼-- · 2019-01-21 04:05

With /debug, when you get this message "After Private Key filter, 0 certs were left.", one reason could be that the pfx file doesn't have the private key. When you export the installed certificate to pfx file ensure to enable the check box to also include the private key.

查看更多
太酷不给撩
5楼-- · 2019-01-21 04:06

just uncheck the 'Sign the click once manifests' from the signing tab in project properties,it will remove the error and you can create a new one as from there.

查看更多
姐就是有狂的资本
6楼-- · 2019-01-21 04:06

I had a similar problem my computer name had change and the certificate had expired. I was able to resolve this issue by creating a new test certificate.

In Visual Studio, right click on project in solution explorer. Select properties. Select Signing in properties window. Click "Create Test Certificate....". Enter password information for test certificate and click ok.

查看更多
Summer. ? 凉城
7楼-- · 2019-01-21 04:07

In my case I have the wrong type of certificate that I am trying to associate.
I had "Server Authentication" rather than "Code signing".
You should be able to see this in Certificate snap in the Intended Purpose section.
After that, it just work fine.

查看更多
登录 后发表回答