LetsEncrypt

How to make Apache HttpClient trust Let's Encrypt Certificate Authority

<build> <resources> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> </resource> </resources> </build> import javax.net.ssl.X509TrustManager; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; public class TrustManagerDelegate implements X509TrustManager { private final X509TrustManager mainTrustManager; private final X509TrustManager fallbackTrustManager; public TrustManagerDelegate(X509TrustManager mainTrustManager, X509TrustManager fallbackTrustManager) { this.mainTrustManager = mainTrustManager; this.fallbackTrustManager = fallbackTrustManager; } @Override public void checkClientTrusted(final X509Certificate[] x509Certificates, final String authType) throws CertificateException { try { mainTrustManager.checkClientTrusted(x509Certificates, authType); } catch(CertificateException ignored) { this.fallbackTrustManager.checkClientTrusted(x509Certificates, authType); } } @Override public void checkServerTrusted(final X509Certificate[] x509Certificates, final String authType) throws CertificateException { try { mainTrustManager.