Use the preceeding script when you get
SSLHandshakeException javax.net.ssl.SSLHandshakeException: General SSLEngine problem
You generally need to add the certificate for the website you want to add.
add-java-cert.sh my.website.org
#!/usr/bin/env zsh | |
url=$1 | |
port=443 | |
tmpfile=/tmp/certfile.$$.txt | |
openssl s_client -connect $url:$port 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > $tmpfile | |
JAVA_HOME=$(/usr/libexec/java_home) | |
print -P -- "%BDEFAULT PASSWORD IS: 'changeit'%b" | |
sudo $JAVA_HOME/bin/keytool -import -alias "$url" -file $tmpfile -keystore $JAVA_HOME/lib/security/cacerts |