简体   繁体   中英

SSL/TLS version compatibility?

I have a client running on java 1.6 communication with a server running on java 1.8 via web services.

1) I would like to know if my client can support any SSL/TLS version?

2) How to find out my client is running on what SSL/TLS version supposed that I do not have access to the distant server?

3) Can I force the TLS/SSL version from a java client application?

Any help would be be great! Thank you!

SSLSocket provides a method getSupportedProtocols() :

SSLSocketFactory sf = new SSLSocketFactoryImpl();
SSLSocket s = (SSLSocket) sf.createSocket();
System.out.println( Arrays.toString( s.getSupportedProtocols() )) ;

Output: [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]

http://download.java.net/jdk7/archive/b123/docs/api/javax/net/ssl/SSLSocket.html#getSupportedProtocols%28%29

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM