com.kodemuse.security.ssl.tomcat
Class SSLServerSocketFactory

java.lang.Object
  |
  +--com.kodemuse.security.ssl.tomcat.SSLServerSocketFactory
All Implemented Interfaces:
org.apache.catalina.net.ServerSocketFactory

public class SSLServerSocketFactory
extends java.lang.Object
implements org.apache.catalina.net.ServerSocketFactory

SSL Server Socket Factory for Tomcat.

 It can take 4 parameters
 keystoreFile      : PKCS12 file for keystore
 keystorePass      : Password for Key Store PBE
 truststoreFile    : List of trustpoints, if mutualAuth == true
 clientAuth        : Mutual Authentication. Client is authenticated 
                     against truststore
 

Author:
Harmeet Bedi

Constructor Summary
SSLServerSocketFactory()
           
 
Method Summary
 java.net.ServerSocket createSocket(int port)
           
 java.net.ServerSocket createSocket(int port, int backlog)
           
 java.net.ServerSocket createSocket(int port, int backlog, java.net.InetAddress ifAddress)
           
 java.lang.String getKeystoreFile()
          Get the value of keystoreFile.
 java.lang.String getKeystorePass()
          Get the value of keystorePass.
 java.lang.String getLogFile()
          Get the value of truststoreFile.
 java.lang.String getTruststoreFile()
          Get the value of truststoreFile.
 boolean isClientAuth()
          Get the value of clientAuth.
 void setClientAuth(boolean v)
          Set the value of clientAuth.
 void setKeystoreFile(java.lang.String v)
          Set the value of keystoreFile.
 void setKeystorePass(java.lang.String v)
          Set the value of keystorePass.
 void setLogFile(java.lang.String v)
          Set the value of truststoreFile.
 void setTruststoreFile(java.lang.String v)
          Set the value of truststoreFile.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLServerSocketFactory

public SSLServerSocketFactory()
Method Detail

getKeystoreFile

public java.lang.String getKeystoreFile()
Get the value of keystoreFile.
Returns:
value of keystoreFile.

setKeystoreFile

public void setKeystoreFile(java.lang.String v)
Set the value of keystoreFile.
Parameters:
v - Value to assign to keystoreFile.

getTruststoreFile

public java.lang.String getTruststoreFile()
Get the value of truststoreFile.
Returns:
value of truststoreFile.

setTruststoreFile

public void setTruststoreFile(java.lang.String v)
Set the value of truststoreFile.
Parameters:
v - Value to assign to truststoreFile.

getLogFile

public java.lang.String getLogFile()
Get the value of truststoreFile.
Returns:
value of truststoreFile.

setLogFile

public void setLogFile(java.lang.String v)
Set the value of truststoreFile.
Parameters:
v - Value to assign to truststoreFile.

getKeystorePass

public java.lang.String getKeystorePass()
Get the value of keystorePass.
Returns:
value of keystorePass.

setKeystorePass

public void setKeystorePass(java.lang.String v)
Set the value of keystorePass.
Parameters:
v - Value to assign to keystorePass.

isClientAuth

public boolean isClientAuth()
Get the value of clientAuth.
Returns:
value of clientAuth.

setClientAuth

public void setClientAuth(boolean v)
Set the value of clientAuth.
Parameters:
v - Value to assign to clientAuth.

createSocket

public java.net.ServerSocket createSocket(int port)
                                   throws java.io.IOException
Specified by:
createSocket in interface org.apache.catalina.net.ServerSocketFactory

createSocket

public java.net.ServerSocket createSocket(int port,
                                          int backlog)
                                   throws java.io.IOException
Specified by:
createSocket in interface org.apache.catalina.net.ServerSocketFactory

createSocket

public java.net.ServerSocket createSocket(int port,
                                          int backlog,
                                          java.net.InetAddress ifAddress)
                                   throws java.io.IOException
Specified by:
createSocket in interface org.apache.catalina.net.ServerSocketFactory