Interface ConnectionSettings.TlsSettings<T>
- Type Parameters:
T-
- Enclosing interface:
ConnectionSettings<T>
public static interface ConnectionSettings.TlsSettings<T>
TLS settings.
-
Method Summary
Modifier and TypeMethodDescriptionThe connection builder.Activate hostname verification.hostnameVerification(boolean hostnameVerification) Whether to activate hostname verification or not.sslContext(SSLContext sslContext) SSLContextto use.Convenience method to set aSSLContextthat trusts all servers.
-
Method Details
-
hostnameVerification
ConnectionSettings.TlsSettings<T> hostnameVerification()Activate hostname verification.Activated by default.
- Returns:
- TLS settings
-
hostnameVerification
Whether to activate hostname verification or not.Activated by default.
- Parameters:
hostnameVerification- activation flag- Returns:
- TLS settings
-
sslContext
SSLContextto use.- Parameters:
sslContext- the SSL context to use- Returns:
- TLS settings
-
trustEverything
ConnectionSettings.TlsSettings<T> trustEverything()Convenience method to set aSSLContextthat trusts all servers.When this feature is enabled, no peer verification is performed, which provides no protection against Man-in-the-Middle (MITM) attacks.
Use this only in development and QA environments.
- Returns:
- TLS settings
-
connection
-