Using SHA256 with Authenticode
See original GitHub issueI 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:
- Created 8 years ago
- Comments:10 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.