1.1 --- a/epoc32/include/http/framework/csecuritypolicy.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,173 +0,0 @@
1.4 -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -
1.20 -
1.21 -/**
1.22 - @file csecuritypolicy.h
1.23 - @warning : This file may contain Rose Model ID comments - please do not delete
1.24 -*/
1.25 -
1.26 -#ifndef __CSECURITYPOLICY_H__
1.27 -#define __CSECURITYPOLICY_H__
1.28 -
1.29 -// System includes
1.30 -#include <e32base.h>
1.31 -#include <ecom/ecom.h>
1.32 -#include <stringpool.h>
1.33 -#include <ssl.h>
1.34 -#include <wsp/wsptypes.h>
1.35 -
1.36 -
1.37 -//##ModelId=3C4C37E401CE
1.38 -class MSecurityPolicy
1.39 -/**
1.40 -The Security Policy Interface. This interface class must be the base
1.41 -class of a security policy plug-in.
1.42 -@publishedAll
1.43 -@released
1.44 -*/
1.45 - {
1.46 -public:
1.47 -
1.48 -/** Intended Usage: Ask the client to accept or reject a certificate. Not
1.49 - applicable to TLS, as the SSL layer does this itself.
1.50 - The call is asynchronous, returning the result via the TRequestStatus.
1.51 - @param aServerCert (in) A structure containing the certificate details.
1.52 - @param aStatus (out) A status flag used to indicate errors. A value of 0 is used to indicate
1.53 - that the cert is untrusted and 1 that it is trusted
1.54 -*/
1.55 - //##ModelId=3C4C37E4020B
1.56 - virtual void ValidateUntrustedServerCert(TCertInfo& aServerCert, TRequestStatus& aStatus) const = 0;
1.57 -
1.58 -/** Intended Usage: Cancel a previous request to ask the client to accept or reject
1.59 - an untrusted WTLS server certificate.
1.60 -*/
1.61 - //##ModelId=3C4C37E4020A
1.62 - virtual void CancelValidateUntrustedServerCert() = 0;
1.63 -
1.64 -
1.65 -/** Intended Usage: Obtain an array of WTLS cipher suites. Not applicable to TLS clients.
1.66 - @return An array of cipher suites, consisting of paired bulk encryption
1.67 - algorithms and MAC algorithms. The array must be ordered with
1.68 - strongest cipher suites at the start.
1.69 -*/
1.70 - //##ModelId=3C4C37E40201
1.71 - virtual const RArray<TWtlsCipherSuite>& GetWtlsCipherSuites() =0;
1.72 -
1.73 -/** Intended Usage: Obtain a list of TLS cipher suites. Not applicable to WTLS
1.74 - clients.
1.75 - @return An descriptor containing a list of the TLS cipher suites. Each cipher suite is a 2 byte pair
1.76 -*/
1.77 - //##ModelId=3C4C37E40200
1.78 - virtual const TDesC8& GetTlsCipherSuites() = 0;
1.79 -
1.80 -/** Intended Usage: Obtain the WTLS key exchange suites. Not applicable
1.81 - to TLS clients.
1.82 - @return An array of the WTLS key exchange suites. The array must be ordered
1.83 - with authenticating key exchange suites at the start followed by
1.84 - anonymous key exchange suites if desired. Within each group of keys
1.85 - longer keys should precede shorter ones.
1.86 -*/
1.87 - //##ModelId=3C4C37E401FA
1.88 - virtual const RArray<TWtlsKeyExchangeSuite>& GetWtlsKeyExchangeSuites() = 0;
1.89 -
1.90 -/** Intended Usage: Obtain arbitrary, named security policy properties, in a generic
1.91 - 'stringified' form.
1.92 - @param aPropertyName (in) The policy property name.
1.93 - @param aPropertyValue (out) The property value. Parsing of the value is
1.94 - left to the caller. The caller must close the
1.95 - RString.
1.96 - @return An error code: KErrNone if the property exists or KErrNotFound if
1.97 - it doesn't.
1.98 -*/
1.99 - //##ModelId=3C4C37E401F7
1.100 - virtual TInt GetNamedPolicyProperty(RStringF aPropertyName, RString& aPropertyValue) = 0;
1.101 -
1.102 -protected:
1.103 -/** Intended Usage: Reserve a slot in the v-table to preserve future BC
1.104 - */
1.105 - //##ModelId=3C4C37E401F6
1.106 - virtual void Reserved1() =0;
1.107 -
1.108 -/** Intended Usage: Reserve a slot in the v-table to preserve future BC
1.109 - */
1.110 - //##ModelId=3C4C37E401EC
1.111 - virtual void Reserved2() =0;
1.112 - };
1.113 -
1.114 -//##ModelId=3C4C37C50300
1.115 -class CSecurityPolicy : public CBase, public MSecurityPolicy
1.116 -/**
1.117 -The Security Policy Plug-in API. This ECOM interface class must be implemented
1.118 -by each instance of a security policy plug-in.
1.119 -@publishedAll
1.120 -@released
1.121 -*/
1.122 - {
1.123 -public: // methods
1.124 -
1.125 -/** Intended Usage: Factory construction - instantiates the plug-in.
1.126 - @param aStringPool (in) An open string pool reference that can be used by the plugin.
1.127 - @return The constructed plug-in.
1.128 -*/
1.129 - //##ModelId=3C4C37C503C8
1.130 - inline static CSecurityPolicy* NewL(RStringPool aStringPool);
1.131 -
1.132 -/** Intended Usage: Class destructor.
1.133 -*/
1.134 - //##ModelId=3C4C37C503BE
1.135 - inline virtual ~CSecurityPolicy();
1.136 -
1.137 -
1.138 -protected: // methods
1.139 -
1.140 -/** Intended Usage: Normal constructor. Creates an instance of the plug-in base.
1.141 - @param aStrPool (in) An open string pool reference that can be used by the plugin.
1.142 - @return The constructed plug-in base.
1.143 -*/
1.144 - //##ModelId=3C4C37C503B5
1.145 - inline CSecurityPolicy(RStringPool aStrPool);
1.146 -
1.147 -
1.148 -/** Intended Usage: Reserve a slot in the v-table to preserve future BC
1.149 - */
1.150 - //##ModelId=3C4C37C503B4
1.151 - inline virtual void Reserved1();
1.152 -
1.153 -/** Intended Usage: Reserve a slot in the v-table to preserve future BC
1.154 - */
1.155 - //##ModelId=3C4C37C503AD
1.156 - inline virtual void Reserved2();
1.157 -
1.158 -protected: // attributes
1.159 -
1.160 - /** The stringpool reference
1.161 - */
1.162 - //##ModelId=3C4C37C503AA
1.163 - RStringPool iStrPool;
1.164 -
1.165 -private: // attributes
1.166 -
1.167 - /** D'tor Key identification required for ECOM
1.168 - @internalAll
1.169 - */
1.170 - //##ModelId=3C4C37C50396
1.171 - TUid iDtor_ID_Key;
1.172 - };
1.173 -
1.174 -#include <http/framework/csecuritypolicy.inl>
1.175 -
1.176 -#endif // __CSECURITYPOLICY_H__