Package com.couchbase.client.core.env
Interface SecureEnvironment
-
- All Known Subinterfaces:
CoreEnvironment
- All Known Implementing Classes:
DefaultCoreEnvironment
public interface SecureEnvironment
ASecureEnvironment
interface defines all methods which environment implementation should have to be accepted bySSLEngineFactory
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
sslEnabled()
Identifies if SSL should be enabled.boolean
sslHostnameVerificationEnabled()
If set to true, hostname verification is enabled.KeyStore
sslKeystore()
Allows to directly configure aKeyStore
.String
sslKeystoreFile()
Identifies the filepath to the ssl keystore.String
sslKeystorePassword()
The password which is used to protect the keystore.KeyStore
sslTruststore()
Allows to directly configure aKeyStore
.String
sslTruststoreFile()
Identifies the filepath to the ssl TrustManager keystore.String
sslTruststorePassword()
The password which is used to protect the TrustManager keystore.
-
-
-
Method Detail
-
sslEnabled
boolean sslEnabled()
Identifies if SSL should be enabled.- Returns:
- true if SSL is enabled, false otherwise.
-
sslKeystoreFile
String sslKeystoreFile()
Identifies the filepath to the ssl keystore. If this method is used without also specifyingsslTruststoreFile()
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. This needs to be the case for backwards compatibility, but if you do not need X.509 client cert authentication you might as well just usesslTruststoreFile()
alone.- Returns:
- the path to the keystore file.
-
sslKeystorePassword
String sslKeystorePassword()
The password which is used to protect the keystore. Only needed ifsslKeystoreFile()
is used.- Returns:
- the keystore password.
-
sslKeystore
KeyStore sslKeystore()
Allows to directly configure aKeyStore
. If this method is used without also specifyingsslTruststore()
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. This needs to be the case for backwards compatibility, but if you do not need X.509 client cert authentication you might as well just usesslTruststore()
alone.- Returns:
- the keystore to use.
-
sslTruststoreFile
String sslTruststoreFile()
Identifies the filepath to the ssl TrustManager keystore. If this method is used without also specifyingsslKeystoreFile()
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. Prefer this method over thesslKeystoreFile()
if you do not need X.509 client auth and just need server side certificate checking.- Returns:
- the path to the truststore file.
-
sslTruststorePassword
String sslTruststorePassword()
The password which is used to protect the TrustManager keystore. Only needed ifsslTruststoreFile()
is used.- Returns:
- the keystore password.
-
sslTruststore
KeyStore sslTruststore()
Allows to directly configure aKeyStore
. If this method is used without also specifyingsslKeystore()
this keystore will be used to initialize both the key factory as well as the trust factory with java SSL. Prefer this method over thesslKeystore()
if you do not need X.509 client auth and just need server side certificate checking.- Returns:
- the keystore to use when initializing the factory/factories.
-
sslHostnameVerificationEnabled
boolean sslHostnameVerificationEnabled()
If set to true, hostname verification is enabled.- Returns:
- true if enabled.
-
-