Skip to content

SignTool not working with New-SelfSignedCertificate #1169

@AliveDevil

Description

@AliveDevil

SignTool will always get stuck on "After Private Key filter, 0 certs were left..

Output is

After EKU filter, 1 certs were left.
After expiry filter, 1 certs were left.
After Subject Name filter, 1 certs were left.
After Private Key filter, 0 certs were left.

Following certificate is not working with SignTool:

New-SelfSignedCertificate -Type CodeSigningCert -CertStoreLocation cert:\LocalMachine\My -Subject "CN=Company Name" -HashAlgorithm SHA256

Following certificate works with SignTool:

MakeCert /a SHA256 /n "CN=Company Name" /r /h 0 /eku "1.3.6.1.5.5.7.3.3" /e 07/09/2020 /ss my -sr localmachine -sky exchange Key.cer

This way SignTool is invoked:

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\signtool.exe" sign /debug /d "Product Name" /fd sha256 /tr http://timestamp.globalsign.com/scripts/timestamp.dll /td sha256 /a /sm /n "Company Name" "A:\bsolute\Path\To\Some\File.ext"

Please clarify CodeSign-usage of New-SelfSignedCertificate with SignTool.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions