com::pcbsys::nirvana::nAdminAPI::nSSLInterface Class Reference

This class contains all the configuration required by the Nirvana Realm server to start and control the SSL interface. More...

#include <nSSLInterface.h>

Inheritance diagram for com::pcbsys::nirvana::nAdminAPI::nSSLInterface:
com::pcbsys::nirvana::nAdminAPI::nSocketInterface com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI com::pcbsys::nirvana::nAdminAPI::nInterface

Public Member Functions

virtual const std::string & getAlias ()
 Returns the certificate name/alias that this interface uses as its primary certificate. More...
 
virtual bool getCertRequired ()
 Returns whether this interface requires SSL client authentication or not. More...
 
virtual const std::string & getCRLFile ()
 Returns the Certificate revocation list that the server uses. More...
 
virtual const std::string & getCRLValidationClassName ()
 Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management. More...
 
virtual std::string * getEnabledCiphers (int &nCipher)
 Returns an array of strings which represent the current Ciphers enabled for use by this interface. More...
 
virtual const std::string & getKeyStore ()
 Returns the name of the keystore file that this interface uses to load the certificate from. More...
 
virtual const std::string & getProvider ()
 Get the name of the JSSE provider used by this SSL interface. More...
 
virtual const std::string & getRandomAlgorithm ()
 Returns the SecureRandom algoritm used for this interface. More...
 
virtual const std::string & getRandomProvider ()
 Returns the SecureRandom provider used by this interface. More...
 
virtual std::string * getSupportedCiphers (int &nCipher)
 Returns an array of ciphers this this interface can be configured for use by this interface. More...
 
virtual const std::string & getTrustStore ()
 Returns the current truststore file that this interface uses to validate the client certificate chain against. More...
 
 nSSLInterface (fSSLConfig *pCfg, nInterfaceManager *pIm)
 Creates a new SSL interface for the suplied SSL config and Interface Manager. More...
 
virtual void setAlias (const std::string &alias)
 Sets the certificate name/alias that this interface will use to select its certificate from a keystore with multpiple entries. More...
 
virtual void setCertRequired (bool required)
 Specifies whether this interface requires SSL client authentication or not. More...
 
virtual void setCRLFile (const std::string &fileName)
 Sets the Certificate revocation list file name that the interface should use to check the incomming ssl connections. More...
 
virtual void setCRLValidationClassName (const std::string &className)
 Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management. More...
 
virtual void setEnabledCiphers (std::string *pCiphers, int nCipher)
 Specifies the names of the ciphers enabled for use by this interface. More...
 
virtual void setKeyStore (const std::string &keyStore)
 Sets the keystore file that this interface uses to load the certificate from. More...
 
virtual void setKeyStorePassword (const std::string &keyStorePassword)
 Sets the keystore password that this interface will use to access the keystore file specified. More...
 
virtual void setPrivateKeyPassword (const std::string &password)
 Sets the private key password so that the key can be loaded from the key store. More...
 
virtual void setProvider (const std::string &providerName)
 Sets the name of the JSSE provider to use for the interface. More...
 
virtual void setRandomAlgorithm (const std::string &alg)
 Sets the SecureRandom algorithm to use for this interface. More...
 
virtual void setRandomProvider (const std::string &prov)
 Sets the SecureRandom provider to use for this interface. More...
 
virtual void setTrustStore (const std::string &trustStore)
 Sets the truststore file that this interface uses to validate the client certificate against. More...
 
virtual void setTrustStorePassword (const std::string &trustStorePassword)
 Changes the truststore's password that the server uses to access the trust store. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nSocketInterface
 nSocketInterface (fSocketConfig *pSock, nInterfaceManager *pIm)
 Creates a new Socket Interface with the supplied values. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nInterface
bool canAdvertise ()
 Will this interface be used by other realms to send client redirects to. More...
 
virtual bool Equals (const std::string &item)
 Compares the name of this interface with the string parameter. More...
 
virtual bool Equals (nInterface *pItem)
 Compares this nInterface object with another object. More...
 
virtual const std::string & getAdapaterAlias ()
 Returns the interfaces known alias's. More...
 
virtual const std::string & getAdapter ()
 Get the adapter that this interface will use. More...
 
virtual int getAuthTimeOut ()
 Returns the number of milliseconds that the remote client has to authenticate with the server before the server closes the communications with the client. More...
 
virtual int getBacklog ()
 The number of socket connect requests that the Operating System will queue before sending a reject to the remote client. More...
 
virtual const std::string & getName ()
 Get the name of this interface. More...
 
virtual int getPort ()
 Get the port that this interface will bind to at startup. More...
 
virtual const std::string & getProtocol ()
 Returns the protocol string used by this interface. More...
 
virtual int getRecvBufferSize ()
 Return the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual int getSelectThreadSize ()
 Returns the number of select threads used by NIO. More...
 
virtual int getSendBufferSize ()
 Return the socket buffer size in bytes used by this interface when sending data. More...
 
virtual int getThreadCount ()
 Returns the current Thread Pool size that handles client socket connections. More...
 
virtual std::string getURL ()
 Get the URL that specifies this interface. More...
 
virtual nACLgetViaList ()
 Retrieves the interfaces Via list. More...
 
virtual bool isAllowNIO ()
 Returns whether NIO is enabled on this interface. More...
 
virtual bool isClientConnectionsAllowed ()
 Returns whether this interface can be used by clients to connect. More...
 
virtual bool isInterRealmAllow ()
 Returns whether this interface is allowed to be used in inter realm / cluster communication. More...
 
 nInterface (fDriverConfig *pCfg, nInterfaceManager *pIm)
 Creates a new nInterface object from the supplied fDriverConfig and nInterfaceManager. More...
 
virtual void setAdapterAlias (const std::string &alias)
 Sets the interfaces alias. More...
 
virtual void setAdvertise (bool flag)
 Change the current advertise status for this interface. More...
 
virtual void setAllowClientConnections (bool clientconnections)
 Sets whether this interface can accept client connections or not. More...
 
virtual void setAllowNIO (bool allowNIO)
 Set whether NIO is enabled on the interface. More...
 
virtual void setAuthTimeOut (int timeout)
 Changes the number of milliseconds that the remote client has to authenticate with the server. More...
 
virtual void setAutostart (bool flag)
 Change the current Autostart status for this interface. More...
 
virtual void setBacklog (int backlog)
 Changes the number of connections to queue before the Operating System will send rejects to the remote client. More...
 
virtual void setInterRealmAllow (bool interealmAllow)
 Sets whether this interface is allowed to be used in inter realm / cluster communication. More...
 
virtual void setManager (nInterfaceManager *pIm)
 Set the Interface Manager. More...
 
virtual void setRecvBufferSize (int recvBufferSize)
 Set the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual void setSelectThreadSize (int selectThreadSize)
 Sets the number of select threads used by NIO. More...
 
virtual void setSendBufferSize (int sendBufferSize)
 Set the socket buffer size in bytes used by this interface when sending data. More...
 
virtual void setThreadCount (int count)
 Changes the thread pool size handling the client connections. More...
 
virtual void setUseForProxyForward (bool useForproxyForward)
 Set if ProxyForwarding is to be used. More...
 
virtual void setViaList (nACL *pAcl)
 Commits the nACL object passed in with the Realm Server. More...
 
virtual std::string toString ()
 Return a string representation of the interface details. More...
 
virtual bool useForProxyForward ()
 Returns true if proxy forwarding is enabled. More...
 
virtual bool willAutostart ()
 Will this interface automatically be started when the Realm Server starts. More...
 

Detailed Description

This class contains all the configuration required by the Nirvana Realm server to start and control the SSL interface.

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nSSLInterface::nSSLInterface ( fSSLConfig *  pCfg,
nInterfaceManager pIm 
)

Creates a new SSL interface for the suplied SSL config and Interface Manager.

Parameters
*pCfgthe fSSLConfig associated with this nSSLInterface
*pImthe nInterfaceManager object associated with this interface
Exceptions
nAdminIllegalArgumentExceptionif the adapter is null or the port is in an invalid range

Member Function Documentation

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getAlias ( )
virtual

Returns the certificate name/alias that this interface uses as its primary certificate.

Returns
the Name/Alias of the certificate as a String
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual bool com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getCertRequired ( )
virtual

Returns whether this interface requires SSL client authentication or not.

If this is set to false then this interface allows anonymous connections using SSL. Otherwise the client must have and present a valid certificate chain during the SSL handshake.

Returns
a bool specifying the SSL client authentication setting
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getCRLFile ( )
virtual

Returns the Certificate revocation list that the server uses.

Returns
the CRL file name that the interface uses

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getCRLValidationClassName ( )
virtual

Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management.

The class name can be supplied per interface and then when a client connects a callout is issued to this class to validate the connection.

Returns
current class name of the CRL validation

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual std::string* com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getEnabledCiphers ( int &  nCipher)
virtual

Returns an array of strings which represent the current Ciphers enabled for use by this interface.

Parameters
nCipherthe number of entries in the array of strings
Returns
an array containing the names of the ciphers enabled for use by this interface
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getKeyStore ( )
virtual

Returns the name of the keystore file that this interface uses to load the certificate from.

Returns
The name of the keystore file to use as a String
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getProvider ( )
virtual

Get the name of the JSSE provider used by this SSL interface.

Returns
The name of the JSSE provider being used for the interface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getRandomAlgorithm ( )
virtual

Returns the SecureRandom algoritm used for this interface.

If it is null it uses the system default algorithm.

Returns
a String specifying the Random Algorithm used by this interface
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getRandomProvider ( )
virtual

Returns the SecureRandom provider used by this interface.

If it is null it uses the system default provider.

Returns
a String specifying the Secure Random provider used by this interface
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual std::string* com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getSupportedCiphers ( int &  nCipher)
virtual

Returns an array of ciphers this this interface can be configured for use by this interface.

If the cipher is not in this list then the interface can not support it.

Parameters
nCipherthe number of entries within the array
Returns
pointer to array of ciphers which can be configured for use by this interface
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nSSLInterface::getTrustStore ( )
virtual

Returns the current truststore file that this interface uses to validate the client certificate chain against.

Returns
the Truststore file name as a String
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setAlias ( const std::string &  alias)
virtual

Sets the certificate name/alias that this interface will use to select its certificate from a keystore with multpiple entries.

Parameters
aliasthe name/alias to use as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setCertRequired ( bool  required)
virtual

Specifies whether this interface requires SSL client authentication or not.

If this is set to false then this interface allows anonymous connections using SSL. Otherwise the client must have and present a valid certificate chain during the SSL handshake.

Parameters
requireda bool specifying if this interface will force client authentication
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setCRLFile ( const std::string &  fileName)
virtual

Sets the Certificate revocation list file name that the interface should use to check the incomming ssl connections.

Is only used when client certificates are required.

The file should be in a standard X.509 Certificate Revocation List (CRL)

Parameters
fileNamethe file name used as the CRL

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setCRLValidationClassName ( const std::string &  className)
virtual

Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management.

The class name can be supplied per interface and then when a client connects a callout is issued to this class to validate the connection.

Parameters
classNamethe classname of the certificate validator to use within this interface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setEnabledCiphers ( std::string *  pCiphers,
int  nCipher 
)
virtual

Specifies the names of the ciphers enabled for use by this interface.

Parameters
ciphersan array of ciphers enabled for use by this interface as strings
nCipherthe number of ciphers
Exceptions
nAdminIllegalArgumentExceptionif an empty or null array is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setKeyStore ( const std::string &  keyStore)
virtual

Sets the keystore file that this interface uses to load the certificate from.

Parameters
keyStorethe new keystore name as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setKeyStorePassword ( const std::string &  keyStorePassword)
virtual

Sets the keystore password that this interface will use to access the keystore file specified.

Parameters
keyStorePasswordthe new password as a string
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setPrivateKeyPassword ( const std::string &  password)
virtual

Sets the private key password so that the key can be loaded from the key store.

Parameters
passwordfor the private key as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setProvider ( const std::string &  providerName)
virtual

Sets the name of the JSSE provider to use for the interface.

Parameters
providerNamethe name of the JSSE provider to use

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setRandomAlgorithm ( const std::string &  alg)
virtual

Sets the SecureRandom algorithm to use for this interface.

Parameters
algthe name of the new SecureRandom algorithm to use
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setRandomProvider ( const std::string &  prov)
virtual

Sets the SecureRandom provider to use for this interface.

Parameters
provthe name of the new SecureRandom provider to use
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setTrustStore ( const std::string &  trustStore)
virtual

Sets the truststore file that this interface uses to validate the client certificate against.

Parameters
trustStorethe new truststore file to use
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nSSLInterface::setTrustStorePassword ( const std::string &  trustStorePassword)
virtual

Changes the truststore's password that the server uses to access the trust store.

Parameters
trustStorePasswordthe new password to use as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.