Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @file csecuritypolicy.h
20 @warning : This file may contain Rose Model ID comments - please do not delete
23 #ifndef __CSECURITYPOLICY_H__
24 #define __CSECURITYPOLICY_H__
28 #include <ecom/ecom.h>
29 #include <stringpool.h>
31 #include <wsp/wsptypes.h>
34 //##ModelId=3C4C37E401CE
37 The Security Policy Interface. This interface class must be the base
38 class of a security policy plug-in.
45 /** Intended Usage: Ask the client to accept or reject a certificate. Not
46 applicable to TLS, as the SSL layer does this itself.
47 The call is asynchronous, returning the result via the TRequestStatus.
48 @param aServerCert (in) A structure containing the certificate details.
49 @param aStatus (out) A status flag used to indicate errors. A value of 0 is used to indicate
50 that the cert is untrusted and 1 that it is trusted
52 //##ModelId=3C4C37E4020B
53 virtual void ValidateUntrustedServerCert(TCertInfo& aServerCert, TRequestStatus& aStatus) const = 0;
55 /** Intended Usage: Cancel a previous request to ask the client to accept or reject
56 an untrusted WTLS server certificate.
58 //##ModelId=3C4C37E4020A
59 virtual void CancelValidateUntrustedServerCert() = 0;
62 /** Intended Usage: Obtain an array of WTLS cipher suites. Not applicable to TLS clients.
63 @return An array of cipher suites, consisting of paired bulk encryption
64 algorithms and MAC algorithms. The array must be ordered with
65 strongest cipher suites at the start.
67 //##ModelId=3C4C37E40201
68 virtual const RArray<TWtlsCipherSuite>& GetWtlsCipherSuites() =0;
70 /** Intended Usage: Obtain a list of TLS cipher suites. Not applicable to WTLS
72 @return An descriptor containing a list of the TLS cipher suites. Each cipher suite is a 2 byte pair
74 //##ModelId=3C4C37E40200
75 virtual const TDesC8& GetTlsCipherSuites() = 0;
77 /** Intended Usage: Obtain the WTLS key exchange suites. Not applicable
79 @return An array of the WTLS key exchange suites. The array must be ordered
80 with authenticating key exchange suites at the start followed by
81 anonymous key exchange suites if desired. Within each group of keys
82 longer keys should precede shorter ones.
84 //##ModelId=3C4C37E401FA
85 virtual const RArray<TWtlsKeyExchangeSuite>& GetWtlsKeyExchangeSuites() = 0;
87 /** Intended Usage: Obtain arbitrary, named security policy properties, in a generic
89 @param aPropertyName (in) The policy property name.
90 @param aPropertyValue (out) The property value. Parsing of the value is
91 left to the caller. The caller must close the
93 @return An error code: KErrNone if the property exists or KErrNotFound if
96 //##ModelId=3C4C37E401F7
97 virtual TInt GetNamedPolicyProperty(RStringF aPropertyName, RString& aPropertyValue) = 0;
100 /** Intended Usage: Reserve a slot in the v-table to preserve future BC
102 //##ModelId=3C4C37E401F6
103 virtual void Reserved1() =0;
105 /** Intended Usage: Reserve a slot in the v-table to preserve future BC
107 //##ModelId=3C4C37E401EC
108 virtual void Reserved2() =0;
111 //##ModelId=3C4C37C50300
112 class CSecurityPolicy : public CBase, public MSecurityPolicy
114 The Security Policy Plug-in API. This ECOM interface class must be implemented
115 by each instance of a security policy plug-in.
122 /** Intended Usage: Factory construction - instantiates the plug-in.
123 @param aStringPool (in) An open string pool reference that can be used by the plugin.
124 @return The constructed plug-in.
126 //##ModelId=3C4C37C503C8
127 inline static CSecurityPolicy* NewL(RStringPool aStringPool);
129 /** Intended Usage: Class destructor.
131 //##ModelId=3C4C37C503BE
132 inline virtual ~CSecurityPolicy();
135 protected: // methods
137 /** Intended Usage: Normal constructor. Creates an instance of the plug-in base.
138 @param aStrPool (in) An open string pool reference that can be used by the plugin.
139 @return The constructed plug-in base.
141 //##ModelId=3C4C37C503B5
142 inline CSecurityPolicy(RStringPool aStrPool);
145 /** Intended Usage: Reserve a slot in the v-table to preserve future BC
147 //##ModelId=3C4C37C503B4
148 inline virtual void Reserved1();
150 /** Intended Usage: Reserve a slot in the v-table to preserve future BC
152 //##ModelId=3C4C37C503AD
153 inline virtual void Reserved2();
155 protected: // attributes
157 /** The stringpool reference
159 //##ModelId=3C4C37C503AA
160 RStringPool iStrPool;
162 private: // attributes
164 /** D'tor Key identification required for ECOM
167 //##ModelId=3C4C37C50396
171 #include <http/framework/csecuritypolicy.inl>
173 #endif // __CSECURITYPOLICY_H__