Created
August 22, 2020 06:57
-
-
Save peterhirn/8a97eecce1ce34c816353de0c586f877 to your computer and use it in GitHub Desktop.
Create osslsigncode compatible key/certificate from .pfx
This file contains hidden or 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
openssl pkcs12 -in authenticode.pfx -nocerts -nodes -out key.pem | |
openssl pkcs12 -in authenticode.pfx -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 | |
# Encode to store in CI environment variables | |
base64 authenticode.key > authenticode.key.txt | |
base64 authenticode.spc > authenticode.spc.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment