org.mozilla.jss.tests
Class JSS_SelfServClient

java.lang.Object
  extended by org.mozilla.jss.tests.JSS_SelfServClient
All Implemented Interfaces:
Constants

public class JSS_SelfServClient
extends java.lang.Object
implements Constants


Nested Class Summary
 class JSS_SelfServClient.HandshakeListener
          SSL Handshake Listener implementation.
 
Nested classes/interfaces inherited from interface org.mozilla.jss.tests.Constants
Constants.cipher
 
Field Summary
static int TEST_CIPHERS
           
 
Fields inherited from interface org.mozilla.jss.tests.Constants
debug_level, jssCipherSuites, sslciphersarray_jdk142, sslciphersarray_jdk150
 
Constructor Summary
JSS_SelfServClient()
          Default Constructor.
 
Method Summary
 void clearHandshakeCompleted()
          Clear handshakeCompleted flag to indicate that the system is now ready for another socket connection.
 void closeAllSockets()
          closes the SSLSocket
 void configureCipherSuites(java.lang.String server)
           
 void configureDefaultSSLOptions()
           
 void createSSLConnections(int numToCreate)
          Initialize given number of SSLSocket client connection to the SSLServer using the set parameters.
 boolean getBypassPKCS11()
           
 int getSockTotal()
          returns the total number SSLSockets created.
 boolean getSuccess()
          Set status return value to success.
 boolean getTestCiphers()
           
 boolean isHandshakeCompleted()
          Return true if handshake is completed else return false;
 boolean isServerAlive()
           
static void main(java.lang.String[] args)
          Main method.
 void outputCipherResults()
           
 void sendServerShutdownMsg()
          sendServerShutdownMsg
 void setBypassPKCS11(boolean f)
           
 void setCertDbPath(java.lang.String aCertDbPath)
          Initialize the cert db path name
 void setCipher(int aCipher)
          Initialize the desired ciphersuite to be set on the socket.
 void setClientCertNick(java.lang.String aClientCertNick)
          Set client certificate
 void setFailure()
          Set status return value to false.
 void setHandshakeCompleted()
          Set handshakeCompleted flag to indicate that the socket handshake is coplete.
 void setHostName(java.lang.String aHostName)
          Initialize the hostname to run the server
 void setPasswordFile(java.lang.String aPasswordFile)
          Initialize the passwords file name
 void setPort(int aPort)
          Initialize the port to run the server
 void setTestCertCallback(boolean aTestCertCallback)
          Enable/disable Test Cert Callback.
 void setTestCiphers(boolean t)
           
 void setVerbose(boolean v)
           
 void testCiphersuites(int numOfThreads)
          For every enabled ciphersuite created numOfThreads connections.
 boolean testJSSCiphersMatchNSS()
          returns true if JSS is sync with NSS ciphersuites.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_CIPHERS

public static final int TEST_CIPHERS
See Also:
Constant Field Values
Constructor Detail

JSS_SelfServClient

public JSS_SelfServClient()
Default Constructor.

Method Detail

setTestCiphers

public void setTestCiphers(boolean t)

getTestCiphers

public boolean getTestCiphers()

setVerbose

public void setVerbose(boolean v)

setBypassPKCS11

public void setBypassPKCS11(boolean f)

getBypassPKCS11

public boolean getBypassPKCS11()

testJSSCiphersMatchNSS

public boolean testJSSCiphersMatchNSS()
returns true if JSS is sync with NSS ciphersuites.


configureDefaultSSLOptions

public void configureDefaultSSLOptions()

configureCipherSuites

public void configureCipherSuites(java.lang.String server)

testCiphersuites

public void testCiphersuites(int numOfThreads)
For every enabled ciphersuite created numOfThreads connections.


setCipher

public void setCipher(int aCipher)
Initialize the desired ciphersuite to be set on the socket.

Parameters:
int - Cipher

setHostName

public void setHostName(java.lang.String aHostName)
Initialize the hostname to run the server

Parameters:
String - ServerName

setPort

public void setPort(int aPort)
Initialize the port to run the server

Parameters:
int - port

setPasswordFile

public void setPasswordFile(java.lang.String aPasswordFile)
Initialize the passwords file name

Parameters:
String - passwords

setCertDbPath

public void setCertDbPath(java.lang.String aCertDbPath)
Initialize the cert db path name

Parameters:
String - CertDbPath

setTestCertCallback

public void setTestCertCallback(boolean aTestCertCallback)
Enable/disable Test Cert Callback.

Parameters:
boolean -

setClientCertNick

public void setClientCertNick(java.lang.String aClientCertNick)
Set client certificate

Parameters:
String - Certificate Nick Name

isHandshakeCompleted

public boolean isHandshakeCompleted()
Return true if handshake is completed else return false;

Returns:
boolean handshake status

setHandshakeCompleted

public void setHandshakeCompleted()
Set handshakeCompleted flag to indicate that the socket handshake is coplete.


clearHandshakeCompleted

public void clearHandshakeCompleted()
Clear handshakeCompleted flag to indicate that the system is now ready for another socket connection.


getSockTotal

public int getSockTotal()
returns the total number SSLSockets created.


isServerAlive

public boolean isServerAlive()

sendServerShutdownMsg

public void sendServerShutdownMsg()
sendServerShutdownMsg


closeAllSockets

public void closeAllSockets()
closes the SSLSocket


outputCipherResults

public void outputCipherResults()

createSSLConnections

public void createSSLConnections(int numToCreate)
                          throws java.lang.Exception
Initialize given number of SSLSocket client connection to the SSLServer using the set parameters. Each Connection will have a separate thread performing I/O to the Server.

Throws:
java.lang.Exception

setFailure

public void setFailure()
Set status return value to false.


getSuccess

public boolean getSuccess()
Set status return value to success.


main

public static void main(java.lang.String[] args)
Main method. Used for unit testing.