In file ../../src/Pegasus/Common/SSLContext.h:

class PEGASUS_COMMON_LINKAGE SSLContext

This class provides the interface that a client uses to create SSL context.

Documentation

This class provides the interface that a client uses to create SSL context.

For the OSs that don't have /dev/random device file, must enable PEGASUS_SSL_RANDOMFILE flag and pass random file name to constructor.


Inheritance:


Public Methods

[more] SSLContext ( const String& trustStore, SSLCertificateVerifyFunction* verifyCert, const String& randomFile = String::EMPTY)
Constructor for a SSLContext object.
[more]String getTrustStore () const
Gets the truststore path of the SSLContext object.
[more]String getCertPath () const
Gets the x509 certificate path of the SSLContext object.
[more]String getKeyPath () const
Gets the private key path of the SSLContext object.
[more]String getCRLPath () const
Gets the certificate revocation list path of the SSLContext object.
[more]X509_STORE* getCRLStore () const
Gets the certificate revocation store of the SSLContext object.
[more]Boolean isPeerVerificationEnabled () const
Returns whether peer verification is ON of OFF Corresponds to what the SSL_CTX_set_verify is set to
[more]String getTrustStoreUserName () const
In OpenPegasus 24 this method returned the username associated with the truststore, if applicable.
[more]SSLCertificateVerifyFunction* getSSLCertificateVerifyFunction () const
Returns the verification callback associated with this context.
[more] SSLContext ( const String& trustStore, const String& certPath, const String& keyPath, SSLCertificateVerifyFunction* verifyCert, const String& randomFile)
Constructor for a SSLContext object.
[more] SSLContext ( const String& trustStore, const String& certPath, const String& keyPath, const String& crlPath, SSLCertificateVerifyFunction* verifyCert, const String& randomFile)
Constructor for a SSLContext object.
[more] SSLContext ( const String& trustStore, const String& certPath, const String& keyPath, SSLCertificateVerifyFunction* verifyCert, String trustStoreUserName, const String& randomFile)
Constructor for a SSLContextRep object.

o SSLContext( const String& trustStore, SSLCertificateVerifyFunction* verifyCert, const String& randomFile = String::EMPTY)
Constructor for a SSLContext object.
Throws:
SSLException indicates failure to create an SSL context.
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 is used as a seed for random number generation by OpenSSL.

oString 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.

oString getCertPath() const
Gets the x509 certificate path of the SSLContext object.
Returns:
a string containing the certificate path.

oString getKeyPath() const
Gets the private key path of the SSLContext object.
Returns:
a string containing the key path

oString getCRLPath() const
Gets the certificate revocation list path of the SSLContext object.
Returns:
a string containing the crl path

oX509_STORE* getCRLStore() const
Gets the certificate revocation store of the SSLContext object.
Returns:
a string containing the crl store

oBoolean 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

oString getTrustStoreUserName() const
In OpenPegasus 24 this method returned the username associated with the truststore, if applicable. This method is currently deprecated beginning in OpenPegasus 2.5, and will always return String::EMPTY.
Returns:
String::EMPTY

oSSLCertificateVerifyFunction* getSSLCertificateVerifyFunction() const
Returns the verification callback associated with this context. This may be NULL.
Returns:
the verification callback function

o SSLContext( const String& trustStore, const String& certPath, const String& keyPath, SSLCertificateVerifyFunction* verifyCert, const String& randomFile)
Constructor for a SSLContext object. This constructor is intended to be used by the CIMServer or CIMClient.
Throws:
SSLException indicates failure to create an SSL context.
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 is used as a seed for random number generation by OpenSSL.

o SSLContext( const String& trustStore, const String& certPath, const String& keyPath, const String& crlPath, SSLCertificateVerifyFunction* verifyCert, const String& randomFile)
Constructor for a SSLContext object. This constructor is intended to be used by the CIMServer or CIMClient.
Throws:
SSLException indicates failure to create an SSL context.
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 is used as a seed for random number generation by OpenSSL.

o SSLContext( const String& trustStore, const String& certPath, const String& keyPath, SSLCertificateVerifyFunction* verifyCert, String trustStoreUserName, const String& randomFile)
Constructor for a SSLContextRep object.
Throws:
SSLException exception indicating failure to create a context.
Parameters:
trustStore - trust store file path
certPath - server certificate file path
keyPath - server key file path
verifyCert - function pointer to a certificate verification call back function.
trustStoreUserName - In OpenPegasus 2.5 this parameter specified the user to associate the truststore with; this was basically a workaround to providers that required a username. With the support provided in PEP 187, this parameter is ignored beginning in release 2.5.
randomFile - file path of a random file that is used as a seed for random number generation by OpenSSL.


This class has no child classes.
Friends:
class SSLSocket
class CIMServer
class CIMxmlIndicationHandler
class SSLContextManager

Alphabetic index HTML hierarchy of classes or Java