org.apache.anteater.util
Class SSLUtils

java.lang.Object
  |
  +--org.apache.anteater.util.SSLUtils

public class SSLUtils
extends Object

SSL utility methods. Primarily for creating SSL sockets via JSSE factories. Implements HTTP-over-SSL tunnelling (proxy support)

Since:
October 25, 2002
Version:
$Revision: 1.2 $ $Date: 2002/10/30 14:36:14 $
Author:
Jeff Turner

Method Summary
static Socket createProxySocket(String host, int port, String proxyHost, int proxyPort)
          Create a SSL socket tunnelled through another.
static Socket createSocket(String host, int port)
          Create a normal SSL socket.
static javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
          Initializes an SSLSocketFactory which ignores most Certificate validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSocket

public static Socket createSocket(String host,
                                  int port)
                           throws IOException
Create a normal SSL socket.

IOException

createProxySocket

public static Socket createProxySocket(String host,
                                       int port,
                                       String proxyHost,
                                       int proxyPort)
                                throws IOException
Create a SSL socket tunnelled through another.

IOException

getSSLSocketFactory

public static javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
                                                          throws IOException
Initializes an SSLSocketFactory which ignores most Certificate validation. Very useful for development environment, where people don't purchase certificates, but instead use self-signed ones.

IOException


Ant Functional Tester -- see Project home page for details