openssl s_client -connect <server>:<port> -showcerts > myserver_cert
keytool -importcert -trustcacerts -file myserver_cert -alias ca_alias -keystore "<JRE_HOME>\lib\security\cacerts"
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!