Factory
instead.@Deprecated public class GridSslBasicContextFactory extends Object implements GridSslContextFactory
In some cases it is useful to disable certificate validation of client side (e.g. when connecting
to a server with self-signed certificate). This can be achieved by setting a disabled trust manager
to this factory, which can be obtained by getDisabledTrustManager()
method:
GridSslBasicContextFactory factory = new GridSslBasicContextFactory(); factory.setTrustManagers(GridSslBasicContextFactory.getDisabledTrustManager()); // Rest of initialization.
Modifier and Type | Field and Description |
---|---|
static String |
DFLT_KEY_ALGORITHM
Deprecated.
Default key manager algorithm.
|
static String |
DFLT_SSL_PROTOCOL
Deprecated.
Default SSL protocol.
|
static String |
DFLT_STORE_TYPE
Deprecated.
Default key store type.
|
Constructor and Description |
---|
GridSslBasicContextFactory()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
SSLContext |
createSslContext()
Deprecated.
Creates SSL context based on factory settings.
|
static TrustManager |
getDisabledTrustManager()
Deprecated.
Returns an instance of trust manager that will always succeed regardless of certificate provided.
|
String |
getKeyAlgorithm()
Deprecated.
Gets algorithm that will be used to create a key manager.
|
String |
getKeyStoreFilePath()
Deprecated.
Gets path to the key store file.
|
char[] |
getKeyStorePassword()
Deprecated.
Gets key store password.
|
String |
getKeyStoreType()
Deprecated.
Gets key store type used for context creation.
|
String |
getProtocol()
Deprecated.
Gets protocol for secure transport.
|
TrustManager[] |
getTrustManagers()
Deprecated.
Gets pre-configured trust managers.
|
String |
getTrustStoreFilePath()
Deprecated.
Gets path to the trust store file.
|
char[] |
getTrustStorePassword()
Deprecated.
Gets trust store password.
|
String |
getTrustStoreType()
Deprecated.
Gets trust store type used for context creation.
|
protected InputStream |
openFileInputStream(String filePath)
Deprecated.
By default, this method simply opens a raw file input stream.
|
void |
setKeyAlgorithm(String keyAlgorithm)
Deprecated.
Sets key manager algorithm that will be used to create a key manager.
|
void |
setKeyStoreFilePath(String keyStoreFilePath)
Deprecated.
Sets path to the key store file.
|
void |
setKeyStorePassword(char[] keyStorePwd)
Deprecated.
Sets key store password.
|
void |
setKeyStoreType(String keyStoreType)
Deprecated.
Sets key store type used in context initialization.
|
void |
setProtocol(String proto)
Deprecated.
Sets protocol for secure transport.
|
void |
setTrustManagers(TrustManager... trustMgrs)
Deprecated.
Sets pre-configured trust managers.
|
void |
setTrustStoreFilePath(String trustStoreFilePath)
Deprecated.
Sets path to the trust store file.
|
void |
setTrustStorePassword(char[] trustStorePwd)
Deprecated.
Sets trust store password.
|
void |
setTrustStoreType(String trustStoreType)
Deprecated.
Sets trust store type used in context initialization.
|
String |
toString()
Deprecated.
|
public static final String DFLT_STORE_TYPE
public static final String DFLT_SSL_PROTOCOL
public static final String DFLT_KEY_ALGORITHM
public String getKeyStoreType()
public void setKeyStoreType(String keyStoreType)
DFLT_STORE_TYPE
will
be used.keyStoreType
- Key store type.public String getTrustStoreType()
public void setTrustStoreType(String trustStoreType)
DFLT_STORE_TYPE
will
be used.trustStoreType
- Trust store type.public String getProtocol()
public void setProtocol(String proto)
DFLT_SSL_PROTOCOL
will be used.proto
- SSL protocol name.public String getKeyAlgorithm()
DFLT_KEY_ALGORITHM
will be used.public void setKeyAlgorithm(String keyAlgorithm)
keyAlgorithm
- Key algorithm name.public String getKeyStoreFilePath()
public void setKeyStoreFilePath(String keyStoreFilePath)
keyStoreFilePath
- Path to key store file.public char[] getKeyStorePassword()
public void setKeyStorePassword(char[] keyStorePwd)
keyStorePwd
- Key store password.public String getTrustStoreFilePath()
public void setTrustStoreFilePath(String trustStoreFilePath)
setTrustStoreFilePath(String)
, setTrustManagers(TrustManager[])
properties must be set.trustStoreFilePath
- Path to the trust store file.public char[] getTrustStorePassword()
public void setTrustStorePassword(char[] trustStorePwd)
trustStorePwd
- Trust store password.public TrustManager[] getTrustManagers()
public void setTrustManagers(TrustManager... trustMgrs)
setTrustStoreFilePath(String)
, #setTrustManagers(TrustManager[])
trustMgrs
- Pre-configured trust managers.public static TrustManager getDisabledTrustManager()
public SSLContext createSslContext() throws SSLException
createSslContext
in interface GridSslContextFactory
SSLException
- If SSL context could not be created.protected InputStream openFileInputStream(String filePath) throws IOException
filePath
- Path to the file.IOException
- If stream could not be opened.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017