Created
August 1, 2016 09:24
-
-
Save fooling/bb7f78bdf06d0f0ce76f56ae5ca7f1ff to your computer and use it in GitHub Desktop.
Get cert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
获取任意https的证书并加入java keystore | |
openssl s_client -connect 192.168.1.1:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > xxx.cert | |
keytool -import -v -trustcacerts -file /home/xxx/xxx.cert -keystore "$JAVA_HOME/jre/lib/security/cacerts" -keypass "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment