hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Self-signed SSL certificates
Date Mon, 11 Nov 2013 20:29:09 GMT
On Mon, 2013-11-11 at 18:51 +0100, Sebastiano Vigna wrote:
> Question: what is the suggested way to accept self-signed SSL certificates with the present
version of the client? There used to be some examples floating around but maybe something
has changed in the mean time...
> 

---
SSLContext sslcontext = SSLContexts.custom()
        .loadTrustMaterial(null, new TrustSelfSignedStrategy()).build();
CloseableHttpClient client = HttpClients.custom()
        .setSslcontext(sslcontext)
        .build();
---

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message