Created
April 13, 2015 06:08
-
-
Save trollixx/6abc5c3769c621ecc485 to your computer and use it in GitHub Desktop.
Signing Windows executables on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on http://development.adaptris.net/users/lchan/blog/2013/06/07/signing-windows-installers-on-linux/ | |
openssl pkcs12 -in $1 -nocerts -nodes -out .key.pem | |
openssl pkcs12 -in $1 -nokeys -nodes -out .cert.pem | |
openssl rsa -in .key.pem -outform DER -out .authenticode.key | |
openssl crl2pkcs7 -nocrl -certfile .cert.pem -outform DER -out .authenticode.spc | |
osslsigncode -spc .authenticode.spc -key .authenticode.key -t http://timestamp.verisign.com/scripts/timstamp.dll -in $2 -out $3 | |
rm .key.pem .cert.pem .authenticode.key .authenticode.spc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment