Created
August 15, 2018 10:22
-
-
Save ansulev/a4f2e4d23071a938122dbf21dcec8b9e to your computer and use it in GitHub Desktop.
Convert .CRT y .KEY Certificates to JKS Keystore
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
# Convert it into pkcs12 format | |
openssl pkcs12 -export -out jenkins.p12 -inkey certificate.key -in certificate.crt -name "jenkins-cert" | |
# Create keystore if not exist | |
https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html | |
# Import | |
keytool -importkeystore -srckeystore jenkins.p12 -srcstoretype pkcs12 -destkeystore keystore.jks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perfect that the script I was looking for. Just for my Jenkins. Thanks in advanced