Package org.mozilla.jss.tests
Class JSS_FileUploadClient
- java.lang.Object
-
- org.mozilla.jss.tests.JSS_FileUploadClient
-
public class JSS_FileUploadClient extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classJSS_FileUploadClient.HandshakeListenerSSL Handshake Listener implementation.
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description JSS_FileUploadClient()Default Constructor, do not use.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearHandshakeCompleted()Clear handshakeCompleted flag to indicate that the system is now ready for another socket connection.voiddoIt()Initialize and create a socket connection to SSLServer using the set parameters.booleangetSuccess()Set status return value to success.booleanisHandshakeCompleted()Return true if handshake is completed else return false;static voidmain(java.lang.String[] args)Main method.voidsetCertDbPath(java.lang.String aCertDbPath)Initialize the cert db path namevoidsetCipher(int aCipher)Initialize the desired cipher to be set on the socket.voidsetClientCertNick(java.lang.String aClientCertNick)Set client certificatevoidsetEOF(java.lang.String fEof)Set EOF for closing server socketvoidsetFailure()Set status return value to false.voidsetHandshakeCompleted()Set handshakeCompleted flag to indicate that the socket handshake is coplete.voidsetHostName(java.lang.String aHostName)Initialize the hostname to run the servervoidsetPasswordFile(java.lang.String aPasswordFile)Initialize the passwords file namevoidsetPort(int aPort)Initialize the port to run the servervoidsetTestCertCallback(boolean aTestCertCallback)Enable/disable Test Cert Callback.voidsetUploadFile(java.lang.String aUploadFile)Initialize the name of the file to be used for testing along with full path.
-
-
-
Method Detail
-
setCipher
public void setCipher(int aCipher)
Initialize the desired cipher to be set on the socket.- Parameters:
aCipher-
-
setHostName
public void setHostName(java.lang.String aHostName)
Initialize the hostname to run the server- Parameters:
aHostName-
-
setPort
public void setPort(int aPort)
Initialize the port to run the server- Parameters:
aPort-
-
setPasswordFile
public void setPasswordFile(java.lang.String aPasswordFile)
Initialize the passwords file name- Parameters:
aPasswordFile-
-
setCertDbPath
public void setCertDbPath(java.lang.String aCertDbPath)
Initialize the cert db path name- Parameters:
aCertDbPath-
-
setUploadFile
public void setUploadFile(java.lang.String aUploadFile)
Initialize the name of the file to be used for testing along with full path.- Parameters:
aUploadFile-
-
setTestCertCallback
public void setTestCertCallback(boolean aTestCertCallback)
Enable/disable Test Cert Callback.- Parameters:
aTestCertCallback-
-
setClientCertNick
public void setClientCertNick(java.lang.String aClientCertNick)
Set client certificate- Parameters:
aClientCertNick- 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.
-
setEOF
public void setEOF(java.lang.String fEof)
Set EOF for closing server socket- Parameters:
fEof- null for closing server socket
-
doIt
public void doIt() throws java.lang.ExceptionInitialize and create a socket connection to SSLServer using the set parameters.- 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.
-
-