我们正在使用Redisson客户端(redisson-3.11.4)来连接Redis服务器。在netty 4.1.42.Final的情况下,一切正常。但是升级到netty 4.1.48.Final后,发送TLSv1 ClientHello,因此无法连接到服务器。尝试通过设置jdk.tls.client.protocols系统属性来指定TLSv1.2,但netty似乎并不尊重它。
有没有办法在Redisson客户端中指定TLS版本?我们目前是这样创建客户端的。
Config config = new Config();
config.useSingleServer()
.setPassword(password)
.setSslTruststore(trustStoreFile.toUri().toURL())
.setSslTruststorePassword(truststorePassword)
.setAddress(endpoint);
RedissonClient client = Redisson.create(config);
谢谢!
原来是IBM JSSE2 Provider出现了这种情况。默认情况下,TLSv1是启用的。要启用TLS V1.0、V1.1和V1.2,需要将com.ibm.jsse2.overrideDefaultTLS系统属性设置为true。