public interface SslEngineFactory extends Configurable, Closeable
Modifier and Type | Method and Description |
---|---|
SSLEngine |
createClientSslEngine(String peerHost,
int peerPort,
String endpointIdentification)
Create a new SSLEngine object to be used by the client.
|
SSLEngine |
createServerSslEngine(String peerHost,
int peerPort)
Create a new SSLEngine object to be used by the server.
|
KeyStore |
keystore()
Returns keystore.
|
Set<String> |
reconfigurableConfigs()
Returns the names of configs that may be reconfigured.
|
boolean |
shouldBeRebuilt(Map<String,Object> nextConfigs)
Returns true if SSLEngine needs to be rebuilt.
|
KeyStore |
truststore()
Returns truststore.
|
configure
SSLEngine createClientSslEngine(String peerHost, int peerPort, String endpointIdentification)
peerHost
- The peer host to use. This is used in client mode if endpoint validation is enabled.peerPort
- The peer port to use. This is a hint and not used for validation.endpointIdentification
- Endpoint identification algorithm for client mode.SSLEngine createServerSslEngine(String peerHost, int peerPort)
peerHost
- The peer host to use. This is a hint and not used for validation.peerPort
- The peer port to use. This is a hint and not used for validation.boolean shouldBeRebuilt(Map<String,Object> nextConfigs)
org.apache.kafka.common.security.ssl.SslFactory
. Based on the nextConfigs, this method will
decide whether underlying SSLEngine object needs to be rebuilt. If this method returns true, the
org.apache.kafka.common.security.ssl.SslFactory
will re-create instance of this object and run other
checks before deciding to use the new object for the new incoming connection requests.The existing connections
are not impacted by this and will not see any changes done as part of reconfiguration.
Example: If the implementation depends on the file based key material it can check if the file is updated
compared to the previous/last-loaded timestamp and return true.
nextConfigs
- The configuration we want to use.Set<String> reconfigurableConfigs()
KeyStore keystore()
KeyStore truststore()