SSLContext Class Reference
#include <SSLContext.h>
Public Member Functions
SSLContext (const String &trustStore, SSLCertificateVerifyFunction *verifyCert, const String &randomFile=String::EMPTY) SSLContext (const SSLContext &sslContext) ~SSLContext () String getTrustStore () const String getCertPath () const String getKeyPath () const String getCRLPath () const X509_STORE * getCRLStore () const Boolean isPeerVerificationEnabled () const SSLCertificateVerifyFunction * getSSLCertificateVerifyFunction () const SSLContext (const String &trustStore, const String &certPath, const String &keyPath, SSLCertificateVerifyFunction *verifyCert, const String &randomFile) SSLContext (const String &trustStore, const String &certPath, const String &keyPath, const String &crlPath, SSLCertificateVerifyFunction *verifyCert, const String &randomFile) Detailed Description
This class provides the interface that a client uses to create SSL context.
Constructor & Destructor Documentation
SSLContext::SSLContext ( const String & trustStore, SSLCertificateVerifyFunction * verifyCert, const String & randomFile = String::EMPTY
) Constructor for an SSLContext object.
NOTE: For platforms that support /dev/random(urandom), the /dev/random files will be used to seed OpenSSL. The specified random file may be used as a fallback when /dev/random(urandom) is unavailable or fails. Using /dev/random to seed OpenSSL is more secure than using a random file.
- Parameters:
trustStore file path of the trust store verifyCert function pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification. randomFile file path of a random file that may be used as a seed for random number generation by OpenSSL. An empty random file string indicates that a random file should not be used. If sufficient randomness is not achieved using /dev/random and/or a random file, an SSLException is thrown.
- Exceptions:
SSLException indicates failure to create an SSL context.
SSLContext::SSLContext ( const SSLContext & sslContext ) Constructs an SSLContext by copying another SSLContext object.
- Parameters:
sslContext The SSLContext object to copy
SSLContext::~SSLContext ( ) Destructs an SSLContext object.
SSLContext::SSLContext ( const String & trustStore, const String & certPath, const String & keyPath, SSLCertificateVerifyFunction * verifyCert, const String & randomFile ) Constructor for an SSLContext object. This constructor is intended to be used by the CIMServer or CIMClient.
NOTE: For platforms that support /dev/random(urandom), the /dev/random files will be used to seed OpenSSL. The specified random file may be used as a fallback when /dev/random(urandom) is unavailable or fails. Using /dev/random to seed OpenSSL is more secure than using a random file.
- Parameters:
trustStore file path of the trust store. certPath file path of the server certificate. keyPath file path of the private key. verifyCert function pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification. randomFile file path of a random file that may be used as a seed for random number generation by OpenSSL. An empty random file string indicates that a random file should not be used. If sufficient randomness is not achieved using /dev/random and/or a random file, an SSLException is thrown.
- Exceptions:
SSLException indicates failure to create an SSL context.
SSLContext::SSLContext ( const String & trustStore, const String & certPath, const String & keyPath, const String & crlPath, SSLCertificateVerifyFunction * verifyCert, const String & randomFile ) Constructor for an SSLContext object. This constructor is intended to be used by the CIMServer or CIMClient.
NOTE: For platforms that support /dev/random(urandom), the /dev/random files will be used to seed OpenSSL. The specified random file may be used as a fallback when /dev/random(urandom) is unavailable or fails. Using /dev/random to seed OpenSSL is more secure than using a random file.
- Parameters:
trustStore file path of the trust store. certPath file path of the server certificate. keyPath file path of the private key. crlPath file path of the certificate revocation list. verifyCert function pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification. randomFile file path of a random file that may be used as a seed for random number generation by OpenSSL. An empty random file string indicates that a random file should not be used. If sufficient randomness is not achieved using /dev/random and/or a random file, an SSLException is thrown.
- Exceptions:
SSLException indicates failure to create an SSL context.
Member Function Documentation
String SSLContext::getCertPath ( ) const Gets the x509 certificate path of the SSLContext object.
- Returns:
- a string containing the certificate path.
String SSLContext::getCRLPath ( ) const Gets the certificate revocation list path of the SSLContext object.
- Returns:
- a string containing the crl path
X509_STORE* SSLContext::getCRLStore ( ) const Gets the certificate revocation store of the SSLContext object.
- Returns:
- a string containing the crl store
String SSLContext::getKeyPath ( ) const Gets the private key path of the SSLContext object.
- Returns:
- a string containing the key path
SSLCertificateVerifyFunction* SSLContext::getSSLCertificateVerifyFunction ( ) const Returns the verification callback associated with this context. This may be NULL.
- Returns:
- the verification callback function
String SSLContext::getTrustStore ( ) const Gets the truststore path of the SSLContext object. This may be a CA file or a directory.
- Returns:
- a string containing the truststore path.
Boolean SSLContext::isPeerVerificationEnabled ( ) const Returns whether peer verification is ON of OFF Corresponds to what the SSL_CTX_set_verify is set to
- Returns:
- true if verification is on; false otherwise
The documentation for this class was generated from the following file:
- /usr/src/startcom/BUILD/pegasus/src/Pegasus/Common/SSLContext.h