trustKeyStore = KeyStore.getInstance(trustKeyStoreInfo.getType()); trustKeyStore.load(new FileInputStream(trustKeyStoreInfo.getKeyStorePath()), trustKeyStoreInfo.getPassword().toCharArray()); trustManagerFactory.init(trustKeyStore); keyStore = KeyStore.getInstance(keyStoreInfo.getType()); keyStore.load(new FileInputStream(keyStoreInfo.getKeyStorePath()), keyStoreInfo .getPassword().toCharArray()); keyManagerFactory.init(keyStore, keyStoreInfo.getPassword().toCharArray());
trustKeyStore = KeyStore.getInstance(trustKeyStoreInfo.getType()); trustKeyStore.load(new FileInputStream(trustKeyStoreInfo.getKeyStorePath()), trustKeyStoreInfo.getPassword().toCharArray()); trustManagerFactory.init(trustKeyStore); keyStore = KeyStore.getInstance(keyStoreInfo.getType()); keyStore.load(new FileInputStream(keyStoreInfo.getKeyStorePath()), keyStoreInfo .getPassword().toCharArray()); keyManagerFactory.init(keyStore, keyStoreInfo.getPassword().toCharArray());
public SSLServerSocketFactory getSSLServerSocketFactory() throws SSLConfigurationException { checkNotNull(keyStoreInfo, "keyStoreInfo may not be null"); String KEY_STORE_PASSWORD = getKeyStoreInfo().getPassword(); String KEY_STORE_PATH = getKeyStoreInfo().getKeyStorePath(); KeyStore keyStore = null; String TRUST_KEY_STORE_PASSWORD = getTrustKeyStoreInfo().getPassword(); TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509"); trustKeyStore = KeyStore.getInstance("JKS");
public SSLServerSocketFactory getSSLServerSocketFactory() throws SSLConfigurationException { checkNotNull(keyStoreInfo, "keyStoreInfo may not be null"); String KEY_STORE_PASSWORD = getKeyStoreInfo().getPassword(); String KEY_STORE_PATH = getKeyStoreInfo().getKeyStorePath(); KeyStore keyStore = null; String TRUST_KEY_STORE_PASSWORD = getTrustKeyStoreInfo().getPassword(); TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509"); trustKeyStore = KeyStore.getInstance("JKS");