public class TLSContext extends Object
| Modifier and Type | Method and Description |
|---|---|
static @NotNull TLSContext |
createDefault()
Static factory method, to create a fresh instance of this class with default values.
|
@NotNull SSLContext |
getSslContext()
Returns the resulting SSL context.
|
void |
setAllowSelfSigned(boolean allowSelfSigned)
When set to true self signed certificates will be accepted.
|
void |
setTLSProtocol(@NotNull TLSProtocol tlsProtocol)
Set the TLS protocol, that shall be used.
|
void |
setTrustStore(@Nullable File trustStore,
@Nullable String trustStorePassword)
Sets the trust store file and the trust store password.
|
@NotNull public static @NotNull TLSContext createDefault()
public void setAllowSelfSigned(boolean allowSelfSigned)
allowSelfSigned - Self signed certificates will be accepted, when set to true.public void setTrustStore(@Nullable
@Nullable File trustStore,
@Nullable
@Nullable String trustStorePassword)
trustStore - The trust store file.trustStorePassword - The trust store password.@NotNull public @NotNull SSLContext getSslContext() throws ResultException
ResultExceptionpublic void setTLSProtocol(@NotNull
@NotNull TLSProtocol tlsProtocol)
tlsProtocol - The TLS protocol version, that shall be used.Copyright © 2017–2022 SoftVision Development GmbH, Fulda, Germany. All rights reserved.