public final class KeyStores extends Object
Modifier and Type | Method and Description |
---|---|
static SSLContext |
getSslContext(KeyStore keyStore,
char[] keyStorePassword,
String serverAlias)
Creates and returns an
SSLContext from the keyStore and the serverAlias. |
static KeyStore |
loadKeyStore(File keyStoreFile,
char[] keyStorePassword)
Loads and returns the given keyStoreFile (or the JVM's default keystore file).
|
public static KeyStore loadKeyStore(@Nullable File keyStoreFile, @Nullable char[] keyStorePassword) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException
public static SSLContext getSslContext(KeyStore keyStore, char[] keyStorePassword, @Nullable String serverAlias) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, KeyManagementException
SSLContext
from the keyStore and the serverAlias.Copyright © 2018 Arno Unkrig. All rights reserved.