public class MutualSSLClient extends Object
| Constructor and Description |
|---|
MutualSSLClient() |
| Modifier and Type | Method and Description |
|---|---|
static HttpsURLConnection |
getHttpsURLConnection() |
static String |
getKeyManagerType() |
static String |
getKeyStoreType() |
static String |
getTrustManagerType() |
static void |
getTrustManagerType(String TRUST_MANAGER_TYPE) |
static String |
getTrustStoreType() |
static void |
initMutualSSLConnection()
create basic SSL connection factory
|
static void |
loadKeyStore(String keyStorePath,
String keyStorePassoword)
load key store with given keystore.jks
|
static void |
loadTrustStore(String trustStorePath,
String trustStorePassoword)
load trust store with given .jks file
|
static String |
sendPostRequest(String backendURL,
String message,
Map<String,String> requestProps)
send mutual ssl https post request and return data
|
static void |
setKeyStoreType(String KEY_STORE_TYPE) |
static void |
setProtocol(String PROTOCOL) |
static void |
settKeyManagerType(String KEY_MANAGER_TYPE) |
static void |
setTrustStoreType(String TRUST_STORE_TYPE) |
public static void loadKeyStore(String keyStorePath, String keyStorePassoword) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException
keyStorePath - keyStorePassoword - KeyStoreExceptionIOExceptionCertificateExceptionNoSuchAlgorithmExceptionpublic static void loadTrustStore(String trustStorePath, String trustStorePassoword) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException
trustStorePath - trustStorePassoword - KeyStoreExceptionIOExceptionCertificateExceptionNoSuchAlgorithmExceptionpublic static void initMutualSSLConnection()
throws NoSuchAlgorithmException,
KeyStoreException,
KeyManagementException,
IOException,
UnrecoverableKeyException
public static String sendPostRequest(String backendURL, String message, Map<String,String> requestProps) throws IOException
backendURL - message - requestProps - IOExceptionpublic static String getKeyStoreType()
public static void setKeyStoreType(String KEY_STORE_TYPE)
public static String getTrustStoreType()
public static void setTrustStoreType(String TRUST_STORE_TYPE)
public static String getKeyManagerType()
public static void settKeyManagerType(String KEY_MANAGER_TYPE)
public static String getTrustManagerType()
public static void getTrustManagerType(String TRUST_MANAGER_TYPE)
public static HttpsURLConnection getHttpsURLConnection()
public static void setProtocol(String PROTOCOL)
Copyright © 2014. All rights reserved.