public class SslDomainImpl extends java.lang.Object implements SslDomain, ProtonSslEngineProvider, ProtonJSslDomain
SslDomain.Factory, SslDomain.Mode, SslDomain.VerifyMode| Constructor and Description |
|---|
SslDomainImpl()
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use a
EngineFactory instead |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowUnsecuredClient() |
void |
allowUnsecuredClient(boolean allowUnsecured)
Permit a server to accept connection requests from non-SSL clients.
|
ProtonSslEngine |
createSslEngine(SslPeerDetails peerDetails)
Returns an SSL engine.
|
java.lang.String |
getCertificateFile() |
SslDomain.Mode |
getMode() |
SslDomain.VerifyMode |
getPeerAuthentication() |
java.lang.String |
getPrivateKeyFile() |
java.lang.String |
getPrivateKeyPassword() |
java.lang.String |
getTrustedCaDb() |
void |
init(SslDomain.Mode mode)
Initialize the ssl domain object.
|
void |
setCredentials(java.lang.String certificateFile,
java.lang.String privateKeyFile,
java.lang.String privateKeyPassword)
Set the certificate that identifies the local node to the remote.
|
void |
setPeerAuthentication(SslDomain.VerifyMode verifyMode)
Configure the level of verification used on the peer certificate.
|
void |
setTrustedCaDb(java.lang.String certificateDb)
Configure the set of trusted CA certificates used by this node to verify peers.
|
java.lang.String |
toString() |
@Deprecated public SslDomainImpl()
EngineFactory insteadpublic void init(SslDomain.Mode mode)
SslDomainpublic SslDomain.Mode getMode()
public void setCredentials(java.lang.String certificateFile,
java.lang.String privateKeyFile,
java.lang.String privateKeyPassword)
SslDomainsetCredentials in interface SslDomaincertificateFile - path to file/database containing the identifying
certificate.privateKeyFile - path to file/database containing the private key used to
sign the certificateprivateKeyPassword - the password used to sign the key, else null if key is not
protected.public void setTrustedCaDb(java.lang.String certificateDb)
SslDomainsetTrustedCaDb in interface SslDomaincertificateDb - database of trusted CAs, used to authenticate the peer.public java.lang.String getTrustedCaDb()
getTrustedCaDb in interface SslDomainpublic void setPeerAuthentication(SslDomain.VerifyMode verifyMode)
SslDomainSslDomain.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
SslDomain.setTrustedCaDb(String).setPeerAuthentication in interface SslDomainverifyMode - the level of validation to apply to the peerpublic SslDomain.VerifyMode getPeerAuthentication()
getPeerAuthentication in interface SslDomainpublic java.lang.String getPrivateKeyFile()
getPrivateKeyFile in interface SslDomainpublic java.lang.String getPrivateKeyPassword()
getPrivateKeyPassword in interface SslDomainpublic java.lang.String getCertificateFile()
getCertificateFile in interface SslDomainpublic void allowUnsecuredClient(boolean allowUnsecured)
SslDomainallowUnsecuredClient in interface SslDomainpublic boolean allowUnsecuredClient()
allowUnsecuredClient in interface SslDomainpublic ProtonSslEngine createSslEngine(SslPeerDetails peerDetails)
ProtonSslEngineProvidercreateSslEngine in interface ProtonSslEngineProviderpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014 FuseSource, Corp.. All Rights Reserved.