public class ProgrammaticSslEngineFactory extends Object implements SslEngineFactory
SSLContext
.
Unlike the configuration-based approach, this class does not allow you to customize cipher
suites, or turn on host name validation. Also, note that it will create SSL engines with advisory
peer information (SSLContext.createSSLEngine(String, int)
) whenever possible.
If those defaults do not work for you, it should be pretty straightforward to write your own implementation by extending or duplicating this class.
Modifier and Type | Field and Description |
---|---|
protected SSLContext |
sslContext |
Constructor and Description |
---|
ProgrammaticSslEngineFactory(SSLContext sslContext) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
SSLEngine |
newSslEngine(EndPoint remoteEndpoint)
Creates a new SSL engine each time a connection is established.
|
protected final SSLContext sslContext
public ProgrammaticSslEngineFactory(SSLContext sslContext)
@NonNull public SSLEngine newSslEngine(@NonNull EndPoint remoteEndpoint)
SslEngineFactory
newSslEngine
in interface SslEngineFactory
remoteEndpoint
- the remote endpoint we are connecting to (the address of the Cassandra
node).public void close()
close
in interface AutoCloseable
Copyright © 2017–2019. All rights reserved.