Created
September 15, 2015 16:20
-
-
Save ThatJoeMoore/5143b5456833c2a39ed1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSLContext sslContext = SSLContexts.custom() | |
.useProtocol("TLS") | |
.loadTrustMaterial(new File("/etc/something"), "password".toCharArray()) | |
.build(); | |
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext); | |
HttpClient client = HttpClientBuilder.create() | |
.setSSLSocketFactory(sslsf) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment