SSLContext Class Reference

#include <SSLContext.h>

List of all members.

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.

Parameters:
trustStorefile path of the trust store
verifyCertfunction pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification.
randomFilefile path of a random file that may be used as a seed for random number generation by OpenSSL.

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.

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:
SSLExceptionindicates failure to create an SSL context.
SSLContext::SSLContext ( const SSLContext sslContext)

Constructs an SSLContext by copying another SSLContext object.

Parameters:
sslContextThe SSLContext object to copy

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.

Parameters:
trustStorefile path of the trust store.
certPathfile path of the server certificate.
keyPathfile path of the private key.
verifyCertfunction pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification.
randomFilefile path of a random file that may be used as a seed for random number generation by OpenSSL.

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.

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:
SSLExceptionindicates 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.

Parameters:
trustStorefile path of the trust store.
certPathfile path of the server certificate.
keyPathfile path of the private key.
crlPathfile path of the certificate revocation list.
verifyCertfunction pointer to a certificate verification call back function. A null pointer indicates that no callback is requested for certificate verification.
randomFilefile path of a random file that may be used as a seed for random number generation by OpenSSL.

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.

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:
SSLExceptionindicates failure to create an SSL context.

Member Function Documentation

Gets the x509 certificate path of the SSLContext object.

Returns:
a string containing the certificate path.

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

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

Gets the truststore path of the SSLContext object. This may be a CA file or a directory.

Returns:
a string containing the truststore path.

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:
  • /var/tmp/tog-pegasus-2.9.0-8m.mo8/pegasus/src/Pegasus/Common/SSLContext.h