jjzjj

Java 7 和 TLSv1.2 套接字

我正在尝试连接到加密的Web服务器。Web服务器仅允许使用协议(protocol)TLSv1.2的连接。我修改了来自officialdoc的这个片段importjava.net.*;importjava.io.*;importjavax.net.ssl.*;/**ThisexampledemostrateshowtouseaSSLSocketasclientto*sendaHTTPrequestandgetresponsefromanHTTPSserver.*Itassumesthattheclientisnotbehindafirewall*/publicclassSSLSocket