如何查找 Java 中使用的 SSL/TLS 版本 [英] How to find what SSL/TLS version is used in Java

查看:125
本文介绍了如何查找 Java 中使用的 SSL/TLS 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于 java 的客户端(使用 java 1.6.30),它打开到我部署在 Tomcat 7.0.26 上的服务器的 SSL 连接.Tomcat 使用 Java 6,在 server.xml 中我将连接器配置为使用 sslProtocol="TLS".

我想知道使用的 SSL 版本是什么?是TLS1.0吗?TLS1.1?还有什么?

解决方案

获取 SSLSession 从您客户端上的 SSLSocket 并使用其 getProtocol() 方法.

Oracle JRE/OpenJDK 6 支持 SSLv3 和TLS 1.0.您至少需要 IBM JRE 6/7Oracle JRE/OpenJDK 7 以获得对 TLS 1.1 和 TLS 1.2 的支持.(这也与可用的密码套件有关,如这个问题中所述.)

I have a java based client (using java 1.6.30) that opens an SSL connection to my server deployed on Tomcat 7.0.26. Tomcat is using Java 6 and in the server.xml I configured the connector to use sslProtocol="TLS".

I wonder what is the SSL version being used? Is it TLS1.0? TLS1.1? Something else?

解决方案

Get the SSLSession from your SSLSocket on your client and use its getProtocol() method.

Oracle JRE/OpenJDK 6 supports SSLv3 and TLS 1.0. You would need at least the IBM JRE 6/7 or Oracle JRE/OpenJDK 7 to get support for TLS 1.1 and TLS 1.2. (This is also related to the available cipher suites, as mentioned in this question.)

这篇关于如何查找 Java 中使用的 SSL/TLS 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆