public final class HttpClientFactoryClientAuth extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpClientFactoryClientAuth.CustomTrustManager
class CustomTrustManager.
|
| Constructor and Description |
|---|
HttpClientFactoryClientAuth(String privKeyPasshraseFilePath,
String keystoreFilePath,
String algorithm,
boolean verifyServerCert)
Instantiates a new http client factory client auth.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeClients()
Close clients.
|
com.ning.http.client.AsyncHttpClient |
getFastClient()
Gets the fast client.
|
com.ning.http.client.AsyncHttpClient |
getSlowClient()
Gets the slow client.
|
void |
initCertificateVerification(String privKeyFilePath,
String keystoreFilePath,
String algorithm,
boolean verifyServerCert)
http://people.apache.org/~simonetripodi/ahc/ssl.html generate JKS:
http://venkateshragi.blogspot.com/2013/04/two-way-ssl-using-curl.html
openssl pkcs12 -export -out serverkeystore.pkcs12 -in servercert.pem
-inkey serverprivatekey.pem keytool -importkeystore -srckeystore
serverkeystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
-deststoretype JKS
The JKS has the client cert/ client key; and the cert of the server.
|
void |
stop()
Stop.
|
public HttpClientFactoryClientAuth(String privKeyPasshraseFilePath, String keystoreFilePath, String algorithm, boolean verifyServerCert)
privKeyPasshraseFilePath - the priv key passhrase file pathkeystoreFilePath - the keystore file pathalgorithm - the algorithmverifyServerCert - the verify server certpublic void stop()
public void closeClients()
public com.ning.http.client.AsyncHttpClient getFastClient()
public com.ning.http.client.AsyncHttpClient getSlowClient()
public void initCertificateVerification(String privKeyFilePath, String keystoreFilePath, String algorithm, boolean verifyServerCert)
privKeyFilePath - the priv key file pathkeystoreFilePath - the keystore file pathalgorithm - the algorithmverifyServerCert - the verify server certCopyright © 2015 eBay. All rights reserved.