anon.crypto.tinytls
Class TinyTLSServer

java.lang.Object
  extended by java.net.ServerSocket
      extended by anon.crypto.tinytls.TinyTLSServer

public class TinyTLSServer
extends java.net.ServerSocket

Author:
stefan

Field Summary
private  JAPCertificate m_Certificate
           
private  JAPCertificate m_DSSCertificate
           
private  MyDSAPrivateKey m_DSSKey
           
private  IMyPrivateKey m_PrivateKey
           
private  JAPCertificate m_RSACertificate
           
private  MyRSAPrivateKey m_RSAKey
           
private  TinyTLSServerSocket tls
           
 
Constructor Summary
TinyTLSServer(int port)
          Constructor
TinyTLSServer(int port, int backlog, java.net.InetAddress bindAddress)
          Constructor
 
Method Summary
 java.net.Socket accept()
           
 java.net.Socket accept(long a_forceCloseAfterMS)
           
 void setDSSParameters(JAPCertificate cert, MyDSAPrivateKey key)
          sets DSS parameters
 void setRSAParameters(JAPCertificate cert, MyRSAPrivateKey key)
          sets RSA parameters
 
Methods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Certificate

private JAPCertificate m_Certificate

m_PrivateKey

private IMyPrivateKey m_PrivateKey

m_DSSKey

private MyDSAPrivateKey m_DSSKey

m_RSAKey

private MyRSAPrivateKey m_RSAKey

m_DSSCertificate

private JAPCertificate m_DSSCertificate

m_RSACertificate

private JAPCertificate m_RSACertificate

tls

private TinyTLSServerSocket tls
Constructor Detail

TinyTLSServer

public TinyTLSServer(int port)
              throws java.io.IOException
Constructor

Parameters:
port - port of the TLS Server
Throws:
java.io.IOException

TinyTLSServer

public TinyTLSServer(int port,
                     int backlog,
                     java.net.InetAddress bindAddress)
              throws java.io.IOException
Constructor

Parameters:
port - port of the TLS Server
backlog - the listen backlog
bindAddress - the local InetAddress the server will bind to
Throws:
java.io.IOException
Method Detail

setDSSParameters

public void setDSSParameters(JAPCertificate cert,
                             MyDSAPrivateKey key)
sets DSS parameters

Parameters:
cert - certificate
key - private key

setRSAParameters

public void setRSAParameters(JAPCertificate cert,
                             MyRSAPrivateKey key)
sets RSA parameters

Parameters:
cert - certificate
key - private key

accept

public java.net.Socket accept()
                       throws java.io.IOException
Overrides:
accept in class java.net.ServerSocket
Throws:
java.io.IOException

accept

public java.net.Socket accept(long a_forceCloseAfterMS)
                       throws java.io.IOException
Throws:
java.io.IOException