version 1.6, 2002/05/14 17:10:33
|
version 1.7, 2002/05/17 17:50:55
|
|
|
// Author: Markus Mueller (sedgewick_de@yahoo.de) | // Author: Markus Mueller (sedgewick_de@yahoo.de) |
// | // |
// Modified By: | // Modified By: |
|
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <openssl/rand.h> | #include <openssl/rand.h> |
#else | #else |
#define SSL_CTX void | #define SSL_CTX void |
#endif |
#endif // end of PEGASUS_HAS_SSL |
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Exception.h> | #include <Pegasus/Common/Exception.h> |
#include <Pegasus/Common/CertificateInfo.h> |
#include <Pegasus/Common/SSLContext.h> |
| |
// REVIEW: Figure out how this works (note to myself)? | // REVIEW: Figure out how this works (note to myself)? |
| |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
typedef Boolean (*VERIFY_CERTIFICATE) (CertificateInfo &certInfo); |
|
|
|
class PEGASUS_EXPORT SSLContext |
|
{ |
|
public: |
|
|
|
SSLContext(const String& certPath, |
|
VERIFY_CERTIFICATE verifyCert = NULL, |
|
const String& randomFile = String::EMPTY, |
|
Boolean isCIMClient = false) |
|
throw(SSL_Exception); |
|
|
|
~SSLContext(); |
|
|
|
SSL_CTX * getContext(); |
|
|
|
private: |
|
|
|
SSL_CTX * _SSLContext; |
|
|
|
char * _certPath; |
|
}; |
|
| |
#ifdef PEGASUS_HAS_SSL | #ifdef PEGASUS_HAS_SSL |
class PEGASUS_EXPORT SSLSocket | class PEGASUS_EXPORT SSLSocket |
|
|
| |
// offer a non ssl dummy class for use in MP_Socket | // offer a non ssl dummy class for use in MP_Socket |
| |
typedef PEGASUS_EXPORT void * SSLSocket; |
class PEGASUS_EXPORT SSLSocket {}; |
| |
#endif |
#endif // end of PEGASUS_HAS_SSL |
| |
// | // |
// MP_Socket (Multi-purpose Socket class | // MP_Socket (Multi-purpose Socket class |