org.mozilla.jss.tests

Class JSS_SelfServClient

Implemented Interfaces:
Constants, org.mozilla.jss.tests.ConstantsBase

public class JSS_SelfServClient
extends java.lang.Object
implements org.mozilla.jss.tests.ConstantsBase, Constants

Nested Class Summary

class
JSS_SelfServClient.HandshakeListener
SSL Handshake Listeren implementation.

Fields inherited from interface org.mozilla.jss.tests.Constants

debug_level, jssCipherSuites, sslciphersarray_jdk142, sslciphersarray_jdk150

Fields inherited from interface org.mozilla.jss.tests.ConstantsBase

TEST_CIPHERS

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(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(String[] args)
Main method.
void
outputCipherResults()
void
sendServerShutdownMsg()
sendServerShutdownMsg
void
setBypassPKCS11(boolean f)
void
setCertDbPath(String aCertDbPath)
Initialize the cert db path name
void
setCipher(int aCipher)
Initialize the desired ciphersuite to be set on the socket.
void
setClientCertNick(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(String aHostName)
Initialize the hostname to run the server
void
setPasswordFile(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.

Constructor Details

JSS_SelfServClient

public JSS_SelfServClient()
Default Constructor.

Method Details

clearHandshakeCompleted

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

closeAllSockets

public void closeAllSockets()
closes the SSLSocket

configureCipherSuites

public void configureCipherSuites(String server)

configureDefaultSSLOptions

public void configureDefaultSSLOptions()

createSSLConnections

public void createSSLConnections(int numToCreate)
            throws 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.

getBypassPKCS11

public boolean getBypassPKCS11()

getSockTotal

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

getSuccess

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

getTestCiphers

public boolean getTestCiphers()

isHandshakeCompleted

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

isServerAlive

public boolean isServerAlive()

main

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

outputCipherResults

public void outputCipherResults()

sendServerShutdownMsg

public void sendServerShutdownMsg()
sendServerShutdownMsg

setBypassPKCS11

public void setBypassPKCS11(boolean f)

setCertDbPath

public void setCertDbPath(String aCertDbPath)
Initialize the cert db path name
Parameters:

setCipher

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

setClientCertNick

public void setClientCertNick(String aClientCertNick)
Set client certificate
Parameters:

setFailure

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

setHandshakeCompleted

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

setHostName

public void setHostName(String aHostName)
Initialize the hostname to run the server
Parameters:

setPasswordFile

public void setPasswordFile(String aPasswordFile)
Initialize the passwords file name
Parameters:

setPort

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

setTestCertCallback

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

setTestCiphers

public void setTestCiphers(boolean t)

setVerbose

public void setVerbose(boolean v)

testCiphersuites

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

testJSSCiphersMatchNSS

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