If you are using Venafi, after creating the certificate in the UI,
openssl rsa -in privkey.pem -pubout > pubkey.pem
openssl rsa -in privkey.pem -out key.pem
openssl pkcs8 -topk8 -nocrypt -in key.pem -out pkcs8_key.pem
Once the certificate is created, we will need to ensure the following files are together in one directory for the CLI to reference:
file | purpose |
---|---|
pubkey.pem | the public key |
key.pem | the private key |
pkcs8_key.pem | the private key in pkcs8 format |
ca.pem | the certificate authority key |
cert.pem | the cert |
You will most likely need to add your CA to the Java trust store, unless the JVM trusts it already by default, e.g.
keytool -import -keystore PATH_TO_JDK\jre\lib\security\cacerts -storepass changeit -noprompt -trustcacerts -alias [ALAIS] -file PATH_TO_DOWNLOADS\[CA].der
Find the current Java on MacOS with /usr/libexec/java_home
.