Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

signtool with certificate stored in local computer

I cant get signtool to find my certificate. The pfx file works for signing, i've checked that by specifying the pfx file directly together with the password. But due to other people having access to the code repository i really dont want to store the certificate + password there.

That's why I've installed the pfx (from symantec) on the build server (as local computer, not per user) in "trusted root certification authorities". This is because Jenkins is started with the local system account.

This is what i'm trying at the moment:

signtool sign /v /sm /s Root /n <thename> /t http://timestamp.digicert.com <thefile>

/sm / s Root - this should tell signtool to switch to the "local machine" store, right? and Root should specify "trusted root certification authorities"?

/n - here i'm using the "Issued to" value from the certificate, which is the company name.

I'm met by the following error:

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

I have plowed through so many links today, trying to find out what i'm doing wrong. i've I've checked with mmc with a snap-in for certificates on the local computer and the certificate is resiging in "trusted root certification authorities".

like image 406
sundown Avatar asked Nov 18 '14 15:11

sundown


People also ask

Where is Signtool installed?

The tool is installed in the \Bin folder of the Microsoft Windows Software Development Kit (SDK) installation path (Example: C:\Program Files (x86)\Windows Kits\10\bin\10.0. 19041.0\x64\signtool.exe).

How do I sign a document with a certificate?

To sign a document with a certificate-based signature, you must obtain a digital ID or create a self-signed digital ID in Acrobat or Adobe Reader. The digital ID contains a private key and a certificate with a public key and more. The private key is used to create the certificate-based signature.

How do I sign a DLL certificate?

To sign your add-in with your own certificate, you first need to purchase a digital signature from a digital certificate vendor. Once you obtain a certificate (cer) or Personal Information Exchange (pfx) file, you can sign your DLL(s) using signtool.


1 Answers

Try this command:

signtool sign /v /sm /s My /n <thename> /t http://timestamp.digicert.com <thefile>

You did well to use /sm option but when you added /s Root you said that signtool should look in Computer store but in Root authorities. You could also skip /s parameter because /s My is the default.

For more information see documentation of signtool.

like image 75
pepo Avatar answered Sep 17 '22 16:09

pepo