mirror of https://github.com/apache/cassandra
Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
This commit is contained in:
parent
31f65c12de
commit
4a2a585ec0
|
|
@ -1,4 +1,5 @@
|
|||
4.0.12
|
||||
* Fix BulkLoader ignoring cipher suites options (CASSANDRA-18582)
|
||||
* Migrate Python optparse to argparse (CASSANDRA-17914)
|
||||
Merged from 3.11:
|
||||
* Moved jflex from runtime to build dependencies (CASSANDRA-18664)
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ public class EncryptionOptions
|
|||
|
||||
public String[] cipherSuitesArray()
|
||||
{
|
||||
return cipher_suites == null ? new String[0] : cipher_suites.toArray(new String[0]);
|
||||
return cipher_suites == null ? null : cipher_suites.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public TlsEncryptionPolicy tlsEncryptionPolicy()
|
||||
|
|
|
|||
|
|
@ -264,8 +264,9 @@ public class BulkLoader
|
|||
|
||||
// Temporarily override newSSLEngine to set accepted protocols until it is added to
|
||||
// RemoteEndpointAwareJdkSSLOptions. See CASSANDRA-13325 and CASSANDRA-16362.
|
||||
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, null)
|
||||
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, clientEncryptionOptions.cipherSuitesArray())
|
||||
{
|
||||
@Override
|
||||
protected SSLEngine newSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)
|
||||
{
|
||||
SSLEngine engine = super.newSSLEngine(channel, remoteEndpoint);
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ public class SSTableLoaderEncryptionOptionsTest extends AbstractEncryptionOption
|
|||
"--truststore", validTrustStorePath,
|
||||
"--truststore-password", validTrustStorePassword,
|
||||
"--conf-path", "test/conf/sstableloader_with_encryption.yaml",
|
||||
"--ssl-ciphers", "TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA",
|
||||
sstables_to_upload.getAbsolutePath());
|
||||
tool.assertOnCleanExit();
|
||||
assertTrue(tool.getStdout().contains("Summary statistics"));
|
||||
|
|
|
|||
|
|
@ -165,8 +165,9 @@ public class JavaDriverClient
|
|||
|
||||
// Temporarily override newSSLEngine to set accepted protocols until it is added to
|
||||
// RemoteEndpointAwareJdkSSLOptions. See CASSANDRA-13325 and CASSANDRA-16362.
|
||||
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, null)
|
||||
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, encryptionOptions.cipherSuitesArray())
|
||||
{
|
||||
@Override
|
||||
protected SSLEngine newSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)
|
||||
{
|
||||
SSLEngine engine = super.newSSLEngine(channel, remoteEndpoint);
|
||||
|
|
|
|||
Loading…
Reference in New Issue