public final class KeyStores
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javax.net.ssl.SSLContext |
getSslContext(java.security.KeyStore keyStore,
char[] keyStorePassword,
java.lang.String serverAlias)
Creates and returns an
SSLContext from the keyStore and the serverAlias. |
static java.security.KeyStore |
loadKeyStore(java.io.File keyStoreFile,
char[] keyStorePassword)
Loads and returns the given
keyStoreFile (or the JVM's default keystore file). |
public static java.security.KeyStore loadKeyStore(@Nullable java.io.File keyStoreFile, @Nullable char[] keyStorePassword) throws java.security.KeyStoreException, java.io.FileNotFoundException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException
keyStoreFile (or the JVM's default keystore file).java.security.KeyStoreExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateExceptionpublic static javax.net.ssl.SSLContext getSslContext(java.security.KeyStore keyStore,
char[] keyStorePassword,
@Nullable
java.lang.String serverAlias)
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException,
java.security.UnrecoverableKeyException,
java.security.KeyManagementException
SSLContext from the keyStore and the serverAlias.java.security.NoSuchAlgorithmExceptionjava.security.KeyStoreExceptionjava.security.UnrecoverableKeyExceptionjava.security.KeyManagementException