question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using SHA256 with Authenticode

See original GitHub issue

I can get jsign and signtool to work for SHA-1 signing as follows:

signtool.exe sign /f codesigning.pfx /p %CODESIGN_PASS%  /t http://timestamp.comodoca.com/authenticode tosign.exe`
PESignerCLI --keystore codesigning.pfx --storepass %CODESIGN_PASS% --alg SHA-1 --tsmode Authenticode tosign.exe

But for SHA-256, signtool works but JSign fails.

signtool.exe sign /f codesigning.pfx /p %CODESIGN_PASS% /fd sha256 /tr http://timestamp.comodoca.com/rfc3161 /td sha256 tosign.exe
PESignerCLI --keystore codesigning.pfx --storepass %CODESIGN_PASS% --alg SHA-256 --tsmode RFC3161 tosign.exe

In the case of SHA-256, JSign completes without error, and the executable gets a little bigger, but Windows 10 fails to recognize the cert. It does recognize the cert when signed by signtool.

I’m using the latest code from master, which seems to include SHA-256 and RFC3161. I get the same behavior if I update to BouncyCastle 1.53. Is this related to Issue #7? Any tips?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fishermanscommented, Feb 16, 2016

To complete my concerns:

Here is how to get the alias name from the pfx file: keytool -v -list -storetype pkcs12 -keystore “your pfx.pfx” > keyfile.txt

keytool is shipped with java

0reactions
ebourgcommented, Mar 14, 2016

I confirm that a SHA256 signature with a SHA1 authenticode timestamp works. So this issue is actually a duplicate of the issue #7, jsign doesn’t support RFC3161 timestamps yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SHA256 and Authenticode REDUX^2 - text/plain
I called out the fact that while SHA1 certificates were verboten, “SHA1 file digests are still allowed (heck, MD5 digests are still allowed!)”....
Read more >
Authenticode And Timestamping And sha256 - Didier Stevens
FYI: in my case, I use option /a because I have more than one code signing certificate and I let signtool decide which...
Read more >
The truth about SHA1, SHA-256, dual-signing and Code ...
Any new signatures created or timestamped after Jan 1, 2016 must be SHA-256 based signatures or they will cause a "digital signature is...
Read more >
Code Signing SHA 256 Support | DigiCert
Code Signing SHA 256 Support. DigiCert uses the strongest possible SSL Certificate encryption to protect small, medium, and enterprise businesses.
Read more >
Dual Sign a File with SHA-256 & SHA1 Code Signing ...
Sometimes a situation occurs where you must sign an application using two different signatures (hashing algorithms.) For example, if you build an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found