- Getting an exception:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
- Self-signed SSL certificate is used on remote server.
Possible solution
- Open remote page with Firefox. You should see something like a warning page.
- Click on "I Understand the Risks". You should really understand them.
- Click "Add Exception".
- Click "View" to view certificate.
- Go to "Details" tab and click "Export".
- Save certificate as X.509 Certificate (PEM) somewhere to your file system
- Don't forget to click "Confirm Security Exception" in Firefox.
- Execute command:
keytool -keystore $JAVA_HOME/jre/lib/security/cacerts -import -file /path/to/cert.cer
- When you are prompted for a password and you haven't changed it, use the default:
changeit
No comments:
Post a Comment