Skip to content

Instantly share code, notes, and snippets.

@saii9
Last active May 3, 2018 15:38
Show Gist options
  • Save saii9/2394d37222e013b6196ead50c9f0fdb9 to your computer and use it in GitHub Desktop.
Save saii9/2394d37222e013b6196ead50c9f0fdb9 to your computer and use it in GitHub Desktop.
to find the root cert of the server
$] openssl s_client -showcerts -connect www.domain.com:443
downoad crt from http://cacerts.digicert.com/DigiCertGlobalCAG2.crt
convert to pem in home folder
$] openssl x509 -inform der -in DigiCertGlobalCAG2.crt -out DigiCertGlobalCAG2.pem
convert to crt
$] openssl x509 -outform der -in podcert.pem -out podcert.crt
copy the pem to server and under the jre home
$] bin/keytool -import -trustcacerts -keystore lib/security/cacerts \
-alias digicertglobalcag2 -storepass changeit -file ~/DigiCertGlobalCAG2.pem
to get the server cert from openssl
$] echo -n | openssl s_client -connect ecs.dev.fcawitech.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment