(file) Return to SSLContextRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

 1 kumpf 1.1 //%/////////////////////////////////////////////////////////////////////////////
 2           //
 3           // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, 
 4           // The Open Group, Tivoli Systems
 5           //
 6           // Permission is hereby granted, free of charge, to any person obtaining a copy
 7           // of this software and associated documentation files (the "Software"), to 
 8           // deal in the Software without restriction, including without limitation the 
 9           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
10           // sell copies of the Software, and to permit persons to whom the Software is
11           // furnished to do so, subject to the following conditions:
12           // 
13           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
14           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
17           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
18           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
19           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21           //
22 kumpf 1.1 //==============================================================================
23           //
24           // Author: Nag Boranna, Hewlett-Packard Company ( nagaraja_boranna@hp.com )
25           //
26           // Modified By:
27           //
28           //%/////////////////////////////////////////////////////////////////////////////
29           
30           #ifdef PEGASUS_HAS_SSL
31           #include <openssl/err.h>
32           #include <openssl/ssl.h>
33           #include <openssl/rand.h>
34           #else
35           #define SSL_CTX void
36           #endif
37           #include <Pegasus/Common/SSLContext.h>
38           
39           #ifndef Pegasus_SSLContextRep_h
40           #define Pegasus_SSLContextRep_h
41           
42           
43 kumpf 1.1 PEGASUS_NAMESPACE_BEGIN
44           
45           
46           class PEGASUS_EXPORT SSLContextRep
47           {
48           public:
49           
50               /** Constructor for a SSLContextRep object.
51               @param certPath  certificate file path
52               @param verifyCert  function pointer to a certificate verification
53               call back function.
54               @param randomFile  file path of a random file that is used as a seed
55               for random number generation by OpenSSL.
56               @param isCIMClient  flag indicating that the context is created by
57               the client.
58           
59               @exception SSL_Exception  exception indicating failure to create a context.
60               */
61               SSLContextRep(
62                   const String& certPath,
63                   VERIFY_CERTIFICATE verifyCert = NULL,
64 kumpf 1.1         const String& randomFile = String::EMPTY,
65                   Boolean isCIMClient = false) throw(SSL_Exception);
66           
67               ~SSLContextRep();
68           
69               SSL_CTX * getContext() const;
70           
71           private:
72           
73               SSL_CTX * _SSLContext;
74           
75               char * _certPath;
76           };
77           
78           PEGASUS_NAMESPACE_END
79           
80           #endif /* Pegasus_SSLContextRep_h */
81           

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2