Prepare the Java KeyStore
Import the client key and certificate into a Java KeyStore
openssl pkcs12 -export -in COMPANY_NAME_UAT.pem -inkey COMPANY_NAME_UAT.key -out certificate.p12 -name "certificate"keytool -importkeystore -srckeystore certificate.p12 -srcstoretype pkcs12 -destkeystore certs.jksImporting keystore certificate.p12 to certs.jks...
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias certificate successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelledAdd the server root CA certificate to the Java KeyStore
wget -O lets-encrypt-r12.pem https://letsencrypt.org/certs/2024/r12.pem
wget -O lets-encrypt-r13.pem https://letsencrypt.org/certs/2024/r13.pem
wget -O lets-encrypt-e7.pem https://letsencrypt.org/certs/2024/e7.pem
wget -O lets-encrypt-e8.pem https://letsencrypt.org/certs/2024/e8.pem
wget -O lets-encrypt-e7-cross.pem https://letsencrypt.org/certs/2024/e7-cross.pem
wget -O lets-encrypt-e8-cross.pem https://letsencrypt.org/certs/2024/e8-cross.pem
keytool -import -trustcacerts -file "lets-encrypt-r12.pem" -alias lets-encrypt-r12 -keystore certs.jks
keytool -import -trustcacerts -file "lets-encrypt-r13.pem" -alias lets-encrypt-r13 -keystore certs.jks
keytool -import -trustcacerts -file "lets-encrypt-e7.pem" -alias lets-encrypt-e7 -keystore certs.jks
keytool -import -trustcacerts -file "lets-encrypt-e8.pem" -alias lets-encrypt-e8 -keystore certs.jks
keytool -import -trustcacerts -file "lets-encrypt-e7-cross.pem" -alias lets-encrypt-e7-cross -keystore certs.jks
keytool -import -trustcacerts -file "lets-encrypt-e8-cross.pem" -alias lets-encrypt-e8-cross -keystore certs.jks
Enter keystore password:
Certificate was added to keystoreQuick reference
Last updated