public interface SslDomain
Modifier and Type | Interface and Description |
---|---|
static class |
SslDomain.Factory |
static class |
SslDomain.Mode
Determines whether the endpoint acts as a client or server.
|
static class |
SslDomain.VerifyMode
Determines the level of peer validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowUnsecuredClient() |
void |
allowUnsecuredClient(boolean allowUnsecured)
Permit a server to accept connection requests from non-SSL clients.
|
String |
getCertificateFile() |
SslDomain.Mode |
getMode() |
SslDomain.VerifyMode |
getPeerAuthentication() |
String |
getPrivateKeyFile() |
String |
getPrivateKeyPassword() |
String |
getTrustedCaDb() |
void |
init(SslDomain.Mode mode)
Initialize the ssl domain object.
|
void |
setCredentials(String certificateFile,
String privateKeyFile,
String password)
Set the certificate that identifies the local node to the remote.
|
void |
setPeerAuthentication(SslDomain.VerifyMode mode)
Configure the level of verification used on the peer certificate.
|
void |
setTrustedCaDb(String certificateDb)
Configure the set of trusted CA certificates used by this node to verify peers.
|
void init(SslDomain.Mode mode)
SslDomain.Mode getMode()
void setCredentials(String certificateFile, String privateKeyFile, String password)
certificateFile
- path to file/database containing the identifying
certificate.privateKeyFile
- path to file/database containing the private key used to
sign the certificatepassword
- the password used to sign the key, else null if key is not
protected.String getPrivateKeyFile()
String getPrivateKeyPassword()
String getCertificateFile()
void setTrustedCaDb(String certificateDb)
certificateDb
- database of trusted CAs, used to authenticate the peer.String getTrustedCaDb()
void setPeerAuthentication(SslDomain.VerifyMode mode)
SslDomain.VerifyMode.ANONYMOUS_PEER
).
Once certificates and trusted CAs are configured, peer verification can be enabled.
In order to verify a peer, a trusted CA must be configured. See
setTrustedCaDb(String)
.
NOTE: Servers must provide their own certificate when verifying a peer. See
setCredentials(String, String, String)
).mode
- the level of validation to apply to the peerSslDomain.VerifyMode getPeerAuthentication()
void allowUnsecuredClient(boolean allowUnsecured)
boolean allowUnsecuredClient()
Copyright © 2016 The Apache Software Foundation. All rights reserved.