public class TLSContext extends Object
| Modifier and Type | Method and Description |
|---|---|
static TLSContext |
createDefault()
Static factory method, to create a fresh instance of this class with default values.
|
TLSProtocol |
getProtocol()
Returns the TLS version, that shall be used.
|
SSLContext |
getSslContext()
Returns the resulting SSL context.
|
File |
getTrustStore()
Returns the trust store file.
|
String |
getTrustStorePassword()
Returns the password for the trust store.
|
boolean |
isAllowSelfSigned()
Shall valid self signed certificates accepted?
|
TLSContext |
setAllowSelfSigned(boolean allowSelfSigned)
When set to true self signed certificates will be accepted.
|
TLSContext |
setProtocol(TLSProtocol protocol)
Sets the TLS version, that shall be used.
|
TLSContext |
setTrustStore(File trustStore)
Sets the trust store file.
|
TLSContext |
setTrustStore(File trustStore,
String trustStorePassword)
Sets the trust store file and the trust store password.
|
public static TLSContext createDefault()
public TLSContext setAllowSelfSigned(boolean allowSelfSigned)
allowSelfSigned - Self signed certificates will be accepted, when set to true.public boolean isAllowSelfSigned()
public TLSContext setTrustStore(File trustStore, String trustStorePassword)
trustStore - The trust store file.trustStorePassword - The trust store password.public TLSContext setTrustStore(File trustStore)
trustStore - The trust store file.public File getTrustStore()
public String getTrustStorePassword()
public TLSContext setProtocol(TLSProtocol protocol)
protocol - The TLS version, that shall be used.public TLSProtocol getProtocol()
public SSLContext getSslContext() throws ResultException
ResultExceptionCopyright © 2017–2019 SoftVision Development GmbH, Fulda, Germany. All rights reserved.