ssl - Cassandra C# TLS 版本选择?

标签 ssl cassandra driver datastax

如何选择不同版本的 TLS 以实现与 Apache Cassandra 集群的安全客户端连接。集群运行 Cassandra 4.0 版。客户端应用程序使用 C# 的 Datastax 驱动程序。我的集群构建器代码与此类似(我已经清理了真实用户、密码、IP 等):

Cluster.Builder().WithCredentials("keyspaceUser", "keyspacePassword")
                             .AddContactPoints("127.0.0.1, 128.0.0.1, 129.0.0.1")
                             .WithSSL(new SSLOptions()
                             .SetCertificateCollection(new X509Certificate2Collection
                                    {
                                        new X509Certificate2(certPath, "certificatePassword")
                                    }
                                )
                                .SetRemoteCertValidationCallback(
                                    (sender, certificate, chain, errors) => { return true; }
                                )
                             )
                             .WithLoadBalancingPolicy(new RoundRobinPolicy())
                             .Build();
我在 Cassandra 的 system.log 中看到的问题是:
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL
经过进一步分析,我发现客户端正在尝试使用已过时的 TLSv1,在 Java 1.8 中默认禁用。
所以我的问题是如何在构建器中设置使用不同的 TLS 版本?
谢谢

最佳答案

SSLOptions type 有一个构造函数,允许您指定要使用的 ssl 协议(protocol)。

关于ssl - Cassandra C# TLS 版本选择?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67690633/

相关文章:

eclipse - "SSL host could not be verified"错误

Cassandra - Cqlengine - TTL 支持

c - 打开文件指针以在头文件中记录宏

driver - 逆向工程 Amiga 监控文件

ruby-on-rails - 反向代理 SSL 将端口 9000 重定向到 Rails 应用程序和 Portainer 上的 https 协议(protocol)

ssl - 如何在 Heroku 上配置基于主机名的 ssl 证书?

java - 设置 Cassandra 代码格式化程序,options/code.style.schemes.xml 的用途是什么?

Cassandra 与批量更新不一致

linux - 摄像头驱动程序安装问题 - linux

java - 在独立 JRE 与 Tomcat 中设置 axis.SecureSocketFactory