Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates

For Jersey Client (or any Java web client for that matter) to connect to a SSL endpoint, the target server certificate must be installed as jssecacerts files into your JRE truststore at $JAVA_HOME\jre\lib\security. This is painful if you don’t have access to infrastructure, or don’t want to patch/update your server/base Docker container everytime your SSL certificate changes. I will show you a more elegant solution for JerseyClient/Dropwizard JerseyClient, where the certificate is loaded from file during runtime and doesn’t need to live in the JRE. »