import javax.net.ssl.*; static KeyManager keyManagerFromKeyStore(File keystoreFile, char[] passphrase) ctex { KeyStore keystore = keyStoreFromFile(keystoreFile, passphrase); KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); keyManagerFactory.init(keystore, passphrase); ret getSingleton(keyManagerFactory.getKeyManagers()); }