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 VERIFY_CERTIFICATE verifyCert = NULL,
65 const String& randomFile = String::EMPTY,
|
66 kumpf 1.5 Boolean isCIMClient = false);
|
67 kumpf 1.1
68 ~SSLContextRep();
69
70 SSL_CTX * getContext() const;
71
72 private:
73
74 SSL_CTX * _SSLContext;
75
76 char * _certPath;
77 };
78
79 PEGASUS_NAMESPACE_END
80
81 #endif /* Pegasus_SSLContextRep_h */
82
|