import kong.unirest.Unirest;
import nl.altindag.ssl.SSLFactory;
public class App {
public static void main(String[] args) throws Exception {
SSLFactory sslFactory = SSLFactory.builder()
.withIdentityMaterial("identity.jks", "password".toCharArray())
.withTrustMaterial("truststore.jks", "password".toCharArray())
.build();
Unirest.primaryInstance()
.config()
.sslContext(sslFactory.getSslContext())
.protocols(sslFactory.getSslParameters().getProtocols())
.ciphers(sslFactory.getSslParameters().getCipherSuites())
.hostnameVerifier(sslFactory.getHostnameVerifier());
}
}