public final class CxfClientSecurityContext extends Object
AbstractCxfRestClient to control select SSL connection and https verification parameters
An object of this class can be created using one of the public factory methods:
getCxfClientSecurityContext(KeyStore, char[], KeyStore, Collection, boolean)getDefaultCxfClientSecurityContext()AbstractCxfRestClient uses an object of this class to determine:
KeyManagers, if anyTrustManagers, if anyCollection of Protocols, if anyCollection of Ciphers, if anyHostnameVerifier| Modifier and Type | Field and Description |
|---|---|
static Collection<String> |
DEFAULT_CIPHER_LIST |
static Collection<String> |
DEFAULT_PROTOCOL_LIST |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static CxfClientSecurityContext |
getCxfClientSecurityContext(KeyStore keystore,
char[] keyPassword,
KeyStore truststore,
Collection<String> ciphers,
boolean enableHostnameVerification)
Factory method to get a context that will configure
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input provided |
static CxfClientSecurityContext |
getCxfClientSecurityContext(KeyStore keystore,
char[] keyPassword,
KeyStore truststore,
Collection<String> protocols,
Collection<String> ciphers,
boolean enableHostnameVerification)
Factory method to get a context that will configure
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input provided |
static CxfClientSecurityContext |
getCxfClientSecurityContext(SSLSocketFactory sslSocketFactory,
boolean enableHostnameVerification)
Factory method to get a context that will configure
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input provided |
static CxfClientSecurityContext |
getDefaultCxfClientSecurityContext()
Factory method to get a context that will configure
AbstractCxfRestClient to use
system default key managers, trust managers and cipher suites for SSL Handshake and system
default hostname verifier for https |
SSLSocketFactory |
getSSLSocketFactory() |
int |
hashCode() |
String |
toString() |
public static final Collection<String> DEFAULT_PROTOCOL_LIST
public static final Collection<String> DEFAULT_CIPHER_LIST
public static CxfClientSecurityContext getDefaultCxfClientSecurityContext()
AbstractCxfRestClient to use
system default key managers, trust managers and cipher suites for SSL Handshake and system
default hostname verifier for httpspublic static CxfClientSecurityContext getCxfClientSecurityContext(KeyStore keystore, char[] keyPassword, KeyStore truststore, Collection<String> ciphers, boolean enableHostnameVerification) throws GeneralSecurityException
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input providedkeystore - KeyStore that contains key material to configure client's
KeyManager. null input means use system default key managerkeyPassword - Password to decrypt information in provided keystore. Ignored if no
keystore providedtruststore - KeyStore that contains trust material to configure client's
TrustManager. null means use system default trust managerciphers - List of ciphers that are permitted for use by the client during SSL Handshake.
DEFAULT_CIPHER_LIST means use system default cipher suiteenableHostnameVerification - true would indicate using system default hostname verifier for https.
false indicates do not use an all-permitting hostname verifierCxfClientSecurityContext that will help AbstractCxfRestClient to pick
up configuration as described.GeneralSecurityException - if either the keystore or the truststore could not be used to set up necessary
managerspublic static CxfClientSecurityContext getCxfClientSecurityContext(KeyStore keystore, char[] keyPassword, KeyStore truststore, Collection<String> protocols, Collection<String> ciphers, boolean enableHostnameVerification) throws GeneralSecurityException
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input providedkeystore - KeyStore that contains key material to configure client's
KeyManager. null input means use system default key managerkeyPassword - Password to decrypt information in provided keystore. Ignored if no
keystore providedtruststore - KeyStore that contains trust material to configure client's
TrustManager. null means use system default trust managerprotocols - List of protocols that are permitted for use by the client during SSL Handshake.
DEFAULT_PROTOCOL_LIST means use system default cipher suiteciphers - List of ciphers that are permitted for use by the client during SSL Handshake.
DEFAULT_CIPHER_LIST means use system default cipher suiteenableHostnameVerification - true would indicate using system default hostname verifier for https.
false indicates do not use an all-permitting hostname verifierCxfClientSecurityContext that will help AbstractCxfRestClient to pick
up configuration as described.GeneralSecurityException - if either the keystore or the truststore could not be used to set up necessary
managerspublic static CxfClientSecurityContext getCxfClientSecurityContext(SSLSocketFactory sslSocketFactory, boolean enableHostnameVerification)
AbstractCxfRestClient's SSL
Handshake context and hostname verifier as specified by the input providedsslSocketFactory - SSLSocketFactory to use when connecting to vCD/vCTAenableHostnameVerification - whether hostname verification should be enabled or disabledCxfClientSecurityContext that will help AbstractCxfRestClient to pick
up the SSLSocketFactory provided and configure hostname verification as
specified.public final SSLSocketFactory getSSLSocketFactory()
Copyright © 2019 VMware. All rights reserved.