com.kodemuse.security.ssl
Class SSLSocket

java.lang.Object
  |
  +--java.net.Socket
        |
        +--com.kodemuse.net.SocketWrapper
              |
              +--com.kodemuse.security.ssl.SSLSocket

public abstract class SSLSocket
extends SocketWrapper

SSL Socket for SSLv3 Protocol. Handshake is attempted when streams are resolved not when the object is created.

Author:
Harmeet Bedi

Field Summary
protected  boolean done
           
protected  java.security.cert.X509Certificate[] peerCertificates
           
protected  boolean sessionResumed
           
protected  SSLInputStream sslinp
           
protected  SSLOutputStream sslout
           
 
Fields inherited from class com.kodemuse.net.SocketWrapper
inner
 
Fields inherited from class java.net.Socket
impl
 
Constructor Summary
protected SSLSocket(java.net.Socket inner)
           
 
Method Summary
 void close()
           
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
 java.security.cert.X509Certificate[] getPeerCertificates()
           
protected abstract  void initiateHandshake()
           
 boolean isSessionResumed()
           
 
Methods inherited from class com.kodemuse.net.SocketWrapper
getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getPort, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, log, setKeepAlive, setReceiveBufferSize, setSendBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay, shutdownInput, shutdownOutput, toString
 
Methods inherited from class java.net.Socket
setSocketImplFactory
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

done

protected boolean done

sslinp

protected SSLInputStream sslinp

sslout

protected SSLOutputStream sslout

sessionResumed

protected boolean sessionResumed

peerCertificates

protected java.security.cert.X509Certificate[] peerCertificates
Constructor Detail

SSLSocket

protected SSLSocket(java.net.Socket inner)
             throws java.io.IOException
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class SocketWrapper

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Overrides:
getOutputStream in class SocketWrapper

initiateHandshake

protected abstract void initiateHandshake()
                                   throws java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class SocketWrapper

getPeerCertificates

public java.security.cert.X509Certificate[] getPeerCertificates()
                                                         throws java.io.IOException

isSessionResumed

public boolean isSessionResumed()
                         throws java.io.IOException