connect(java.net.Socket simpleSocket)
Creates a new SSL socket out of an ordinary socket, causing
the SSL handshake to take place, and creating a new, secure connection out
of the old insecure socket.
java.net.Socket
connect(java.lang.String host,
int port)
Initiates a connection to the server residing at the
specified host and port, causing a hello to be sent to the server, and
the SSL handshake process to begin.
disconnect()
Closes the established connection and disconnects from
the server
void
doDelegation(boolean doDel,
boolean doLim)
Called after connecting to a gatekeeper, sends a character
which determines whether delegation is to be performed or not.
public java.net.Socket connect(java.net.Socket simpleSocket)
throws java.io.IOException
Creates a new SSL socket out of an ordinary socket, causing
the SSL handshake to take place, and creating a new, secure connection out
of the old insecure socket.
Parameters:
simpleSocket - the non-SSL socket
connect
public java.net.Socket connect(java.lang.String host,
int port)
throws java.io.IOException
Initiates a connection to the server residing at the
specified host and port, causing a hello to be sent to the server, and
the SSL handshake process to begin.
Parameters:
host - the host where the SSL server to connect to is
port - the port on the specified host where the SSL server is
getCertificate
public java.security.cert.X509Certificate getCertificate()
doDelegation
public void doDelegation(boolean doDel,
boolean doLim)
throws java.io.IOException
Called after connecting to a gatekeeper, sends a character
which determines whether delegation is to be performed or not. If
delegation is to be performed, it then reads in the cert request sent
by the gatekeeper, signs and returns it, and returns true if everything
is successful.
Parameters:
doDel - if true, send a 'D' to activate delegation, otherwise
send 'N'
doLim - if true, perform limited delegation (this param ignored if
do doDel is false
Throws:
IOException - if delegation process failed.
disconnect
public boolean disconnect()
Closes the established connection and disconnects from
the server
Returns:
boolean returns true if connection was closed
successfully, otherwise returns false if an exception was thrown.
getInputStream
public java.io.InputStream getInputStream()
Returns:
InputStream the input stream which can be used
to read from the server the connection is to
getOutputStream
public java.io.OutputStream getOutputStream()
Returns:
OutputStream the output stream which can be used
to write to the server the connection is to
enableDebug
public static void enableDebug(java.net.Socket socket)