I want to use the Java REST API (RestHighLevelClient) to communicate with an Elasticsearch 5.6 server over HTTPS. However, the certificate for the server is self signed and when I try to connect it throws a SSLHandshakeException.
Is there a way of configuring the REST client to accept self signed certificates?
I got this working using a custom Java Key Store. Here's my code:
To create the keystore, I downloaded the cert for the domain through Firefox, and used: