Code example for SSLSocket

Methods: setEnabledProtocols

0
   * Attempt a secure connection with basic functionality to maximize 
   * compatibility. Currently this uses SSL 3.0. 
   */ 
  public void supportTlsIntolerantServer(SSLSocket socket) {
    socket.setEnabledProtocols(new String[] {"SSLv3"});
  } 
 
  /** Returns the negotiated protocol, or null if no protocol was negotiated. */ 
  public byte[] getNpnSelectedProtocol(SSLSocket socket) {
    return null; 
  } 
 
  /** 
   * Sets client-supported protocols on a socket to send to a server. The 
   * protocols are only sent if the socket implementation supports NPN. 
   */ 
  public void setNpnProtocols(SSLSocket socket, byte[] npnProtocols) {
  } 
 
  public void connectSocket(Socket socket, InetSocketAddress address,
      int connectTimeout) throws IOException {