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

 1 kumpf 1.1 //%/////////////////////////////////////////////////////////////////////////////
 2           //
 3 kumpf 1.2 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
 4 kumpf 1.1 // The Open Group, Tivoli Systems
 5           //
 6           // Permission is hereby granted, free of charge, to any person obtaining a copy
 7 kumpf 1.2 // 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 kumpf 1.1 // 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 kumpf 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 kumpf 1.1 // 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 kumpf 1.2 // 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 kumpf 1.1 // 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           //==============================================================================
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 kumpf 1.3 #include <Pegasus/Common/Linkage.h>
39 kumpf 1.1 
40           #ifndef Pegasus_SSLContextRep_h
41           #define Pegasus_SSLContextRep_h
42           
43           
44           PEGASUS_NAMESPACE_BEGIN
45           
46           
47 kumpf 1.3 class PEGASUS_COMMON_LINKAGE SSLContextRep
48 kumpf 1.1 {
49           public:
50           
51               /** Constructor for a SSLContextRep object.
52               @param certPath  certificate file path
53               @param verifyCert  function pointer to a certificate verification
54               call back function.
55               @param randomFile  file path of a random file that is used as a seed
56               for random number generation by OpenSSL.
57               @param isCIMClient  flag indicating that the context is created by
58               the client.
59           
60 kumpf 1.4     @exception SSLException  exception indicating failure to create a context.
61 kumpf 1.1     */
62               SSLContextRep(
63                   const String& certPath,
64 kumpf 1.7         SSLCertificateVerifyFunction* verifyCert = NULL,
65 kumpf 1.1         const String& randomFile = String::EMPTY,
66 kumpf 1.5         Boolean isCIMClient = false);
67 kumpf 1.1 
68 kumpf 1.7     SSLContextRep(const SSLContextRep& sslContextRep);
69           
70 kumpf 1.1     ~SSLContextRep();
71           
72               SSL_CTX * getContext() const;
73           
74           private:
75           
76 kumpf 1.7     SSL_CTX * _makeSSLContext();
77 kumpf 1.1 
78 kumpf 1.6     CString _certPath;
79 kumpf 1.7     String _randomFile;
80               Boolean _isCIMClient;
81               SSL_CTX * _sslContext;
82 kumpf 1.1 };
83           
84           PEGASUS_NAMESPACE_END
85           
86           #endif /* Pegasus_SSLContextRep_h */
87           

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2