Skip to content

Instantly share code, notes, and snippets.

@kwonghung-YIP
Created January 7, 2021 03:45
Show Gist options
  • Save kwonghung-YIP/bbb1c485a0ab421cb822796b0b1cb9b5 to your computer and use it in GitHub Desktop.
Save kwonghung-YIP/bbb1c485a0ab421cb822796b0b1cb9b5 to your computer and use it in GitHub Desktop.
Extract CA cert from domain and save into Java keystore
# Inspect the Root CA Cert of your domain, and it as ca.crt
openssl s_client -connect <host>:<port> -showcerts
# Verify the cert contexnt
openssl x509 -in ca.crt -text
# Create the Java Keystore file (JKS) and import the ca.crt into it
jdk/bin/keytool -import -file ca.crt -keystore trust.jks -storepass password
# Verify the JKS file
jdk/bin/keytool -list -keystore trust.jks -storepass password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment