private SSLContext sslContext;
public SelfSignedSSLProtocolSocketFactory(KeyStore keystore, String keystorePassword, KeyStore truststore) throws NoSuchAlgorithmException, KeyStoreException, ConfigurationException, UnrecoverableKeyException {
KeyManager[] keyManagers = SSLUtil.getKeyManagers(keystore, keystorePassword);
SelfSignedTrustManager trustManager = new SelfSignedTrustManager(truststore);
sslContext = SSLContext.getInstance("SSL");
try {
sslContext.init(keyManagers, new TrustManager[]{trustManager}, null);
} catch (KeyManagementException e) {