public class SslUtils extends Object
| Constructor and Description |
|---|
SslUtils() |
| Modifier and Type | Method and Description |
|---|---|
static SSLContext |
createClientSslContext(String trustStoreFilePath,
String trustStorePassword)
Creates an SSLContext based on provided trust store file path and the password.
|
static SSLContext |
getSslContextForCertificateFile(String filePath)
Creates an SSLContext based on provided trust certificate chain file path.
|
public static SSLContext getSslContextForCertificateFile(String filePath) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException
filePath - Path to the certificate file.NoSuchAlgorithmException - When the particular cryptographic algorithm is not available in the environment.KeyStoreException - When an exception occurs during the keystore creation process.KeyManagementException - When an exception occurs dealing with key management.IOException - To signal that an I/O exception of some sort has occurred.CertificateException - To indicate one of a variety of certificate problems.public static SSLContext createClientSslContext(String trustStoreFilePath, String trustStorePassword) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException
trustStoreFilePath - Path to the trust store file.trustStorePassword - Trust store password.NoSuchAlgorithmException - When the particular cryptographic algorithm is not available in the environment.KeyStoreException - When an exception occurs during the keystore creation process.KeyManagementException - When an exception occurs dealing with key management.IOException - To signal that an I/O exception of some sort has occurred.Copyright © 2018 WSO2. All rights reserved.