public class SSLContexts extends Object
SSLContext.| Modifier and Type | Method and Description |
|---|---|
static SSLContext |
sslContext(File keyStoreFile,
String password)
Creates an SSL context using a password-protected keystore file.
|
static SSLContext |
sslContext(InputStream keyStoreStream,
String password)
Creates an SSL context using a password-protected keystore file.
|
static SSLContext |
sslContext(URL keyStoreFile,
String password)
Creates an SSL context using a password-protected keystore file.
|
public static SSLContext sslContext(URL keyStoreFile, String password) throws GeneralSecurityException, IOException
keyStoreFile - a file:// URL referencing a keystore filepassword - the password for the keystore fileGeneralSecurityException - if the keystore is invalid, or the password is incorrectIOException - if the url cannot be readpublic static SSLContext sslContext(File keyStoreFile, String password) throws GeneralSecurityException, IOException
keyStoreFile - a keystore filepassword - the password for the keystore fileGeneralSecurityException - if the keystore is invalid, or the password is incorrectIOException - if the url cannot be readpublic static SSLContext sslContext(InputStream keyStoreStream, String password) throws GeneralSecurityException, IOException
keyStoreStream - an input stream reading a keystore filepassword - the password for the keystore fileGeneralSecurityException - if the keystore is invalid, or the password is incorrectIOException - if the url cannot be read