1.1 --- a/epoc32/include/unifiedcertstore.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/unifiedcertstore.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,610 @@
1.4 -unifiedcertstore.h
1.5 +/*
1.6 +* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Eclipse Public License v1.0"
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* UNIFIEDCERTSTORE.H
1.20 +* The unified certificate store implementation
1.21 +*
1.22 +*/
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +/**
1.28 + @file
1.29 + @internalTechnology
1.30 + @released
1.31 +*/
1.32 +
1.33 +#ifndef __UNIFIEDCERTSTORE_H__
1.34 +#define __UNIFIEDCERTSTORE_H__
1.35 +
1.36 +class CCertificate;
1.37 +
1.38 +#include <signed.h>
1.39 +#include <e32std.h>
1.40 +#include <f32file.h>
1.41 +#include <e32property.h>
1.42 +#include <sacls.h>
1.43 +#include <mcertstore.h>
1.44 +#include <ct/rmpointerarray.h>
1.45 +#include <ct/rcpointerarray.h>
1.46 +
1.47 +
1.48 +
1.49 +
1.50 +/**
1.51 + *
1.52 + * Publish and Subscribe - UnifiedCertSTore Category
1.53 + * Aliased here to System Category to prevent SC break.
1.54 + *
1.55 + */
1.56 +const TUid KUnifiedCertStorePropertyCat = {KUidSystemCategoryValue};
1.57 +
1.58 +/**
1.59 + *
1.60 + * Publish and subscribe key for UnifiedCertSTore.
1.61 + */
1.62 +enum TUnifiedCertStoreKey
1.63 + {
1.64 + /**
1.65 + *
1.66 + * The Publish and subscribe key for the certstore changes.
1.67 + * If the client of the UnifiedCertstore needs to be notified when
1.68 + * certificate addition, removal and trust&application setting occurs,
1.69 + * the client needs to subscribe to KUnifiedCertStorePropertyCat and
1.70 + * EUnifiedCertStoreFlag.
1.71 + *
1.72 + * Aliased here to KUidUnifiedCertstore flag to avoid SC break.
1.73 + */
1.74 + EUnifiedCertStoreFlag = KUidUnifiedCertstoreFlag
1.75 + };
1.76 +
1.77 +/**
1.78 + *
1.79 + * The Unique ID for unknown hardware certstore, used as the input parameter when it is to be filtered.
1.80 + * @deprecated. Used only for Data compatibility.
1.81 + */
1.82 +
1.83 +const TInt KUnknownHardwareCertStore = 0;
1.84 +
1.85 +
1.86 +/**
1.87 + *
1.88 + * The Unique ID for mutable software certstore, used as the input parameter when it is to be filtered.
1.89 + *
1.90 + */
1.91 +
1.92 +const TInt KThirdPartyCertStore = 1;
1.93 +
1.94 +
1.95 +/**
1.96 + *
1.97 + * The Unique ID for SIM certstore, used as the input parameter when it is to be filtered.
1.98 + *
1.99 + */
1.100 +
1.101 +const TInt KSIMCertStore = 2;
1.102 +
1.103 +/**
1.104 + *
1.105 + * The Unique ID for WIM certstore, used as the input parameter when it is to be filtered.
1.106 + *
1.107 + */
1.108 +
1.109 +const TInt KWIMCertStore = 3;
1.110 +
1.111 +/**
1.112 + *
1.113 + * The Unique ID for UICC certstore, used as the input parameter when it is to be filtered.
1.114 + *
1.115 + */
1.116 +const TInt KUICCCertStore = 4;
1.117 +
1.118 +/**
1.119 + *
1.120 + * The Unique ID for immutable software certstore, used as the input parameter when it is to be filtered.
1.121 + *
1.122 + */
1.123 +
1.124 +const TInt KManufactureCertStore = 5;
1.125 +
1.126 +// Forward declarations
1.127 +class MCTCertStore;
1.128 +class MCTWritableCertStore;
1.129 +class MCTTokenInterface;
1.130 +class MCTToken;
1.131 +class MCTTokenType;
1.132 +class CCTCertInfo;
1.133 +class CCertAttributeFilter;
1.134 +class CCTTokenTypeInfo;
1.135 +class TCTTokenObjectHandle;
1.136 +class CCheckedCertStore;
1.137 +
1.138 +// This class is forward declared to avoid including its definition in this
1.139 +// exported header file because it must only be used internally.
1.140 +class CUnifiedCertStoreWorkingVars;
1.141 +class CX500DistinguishedName;
1.142 +
1.143 +/**
1.144 + * The unified certificate store.
1.145 + *
1.146 + * This class provides a certificate store whose contents are the sum of the
1.147 + * contents of all certificate store implementations on the device. It is
1.148 + * intended as the single point of access for clients wishing to use certificate
1.149 + * stores.
1.150 + *
1.151 + * Since this class is intended for widespread use, capability checks relating
1.152 + * to certificate access are documented here even though the checks are actually
1.153 + * made in the individual cert store implementations.
1.154 + *
1.155 + * @publishedAll
1.156 + * @released
1.157 + */
1.158 +NONSHARABLE_CLASS(CUnifiedCertStore) : public CActive, public MCertStore
1.159 + {
1.160 +public:
1.161 + /**
1.162 + * Creates a new CUnifiedCertStore
1.163 + *
1.164 + * @param aFs A file server session. It must already be open.
1.165 + * @param aOpenForWrite ETrue if the stores must be opened with write access
1.166 + * (e.g. for adding certificates) and EFalse if the user
1.167 + * only needs read-only access.
1.168 + * @return A pointer to an instance of the CUnifiedCertStore class.
1.169 + */
1.170 + IMPORT_C static CUnifiedCertStore* NewL(RFs& aFs, TBool aOpenForWrite);
1.171 +
1.172 + /**
1.173 + * Creates a new CUnifiedCertStore and pushes it on the cleanup stack.
1.174 + *
1.175 + * @param aFs A file server session. It must already be open.
1.176 + * @param aOpenForWrite ETrue if the stores must be opened with write access
1.177 + * (e.g. for adding certificates) and EFalse if the user
1.178 + * only needs read-only access.
1.179 + * @return A pointer to an instance of the CUnifiedCertStore class.
1.180 + */
1.181 + IMPORT_C static CUnifiedCertStore* NewLC(RFs& aFs, TBool aOpenForWrite);
1.182 + /**
1.183 + * Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed
1.184 + * by it will be filtered and ordered.
1.185 + *
1.186 + * @param aFs A file server session. It must already be open.
1.187 + * @param aOpenForWrite ETrue if the stores must be opened with write access
1.188 + * (e.g. for adding certificates) and EFalse if the user
1.189 + * only needs read-only access. Ownership is taken.
1.190 + * @param aOrderFilter An array of the unique sequence IDs specifying CertStore ordering.
1.191 + * @return A pointer to an instance of the CUnifiedCertStore class.
1.192 + */
1.193 + IMPORT_C static CUnifiedCertStore* NewL(RFs& aFs,
1.194 + TBool aOpenForWrite,
1.195 + RArray<TInt>& aOrderFilter);
1.196 + /**
1.197 + * Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed
1.198 + * by it will be filtered and ordered, and it is pushed on the cleanup stack.
1.199 + *
1.200 + * @param aFs A file server session. It must already be open.
1.201 + * @param aOpenForWrite ETrue if the stores must be opened with write access
1.202 + * (e.g. for adding certificates) and EFalse if the user
1.203 + * only needs read-only access. Ownership is taken.
1.204 + * @param aOrderFilter An array of the unique sequence IDs specifying CertStore ordering.
1.205 + * @return A pointer to an instance of the CUnifiedCertStore class.
1.206 + */
1.207 + IMPORT_C static CUnifiedCertStore* NewLC(RFs& aFs,
1.208 + TBool aOpenForWrite,
1.209 + RArray<TInt>& aOrderFilter);
1.210 +
1.211 + /**
1.212 + * The destructor destroys all the resources owned by this object.
1.213 + */
1.214 + IMPORT_C ~CUnifiedCertStore();
1.215 +
1.216 + /**
1.217 + * Initializes the manager.
1.218 + *
1.219 + * It must be called after the manager has been constructed
1.220 + * and before any call to the manager functions.
1.221 + *
1.222 + * This is an asynchronous request.
1.223 + *
1.224 + * @param aStatus The request status object; contains the result of the Initialize()
1.225 + * request when complete. Set to KErrCancel if any outstanding request is cancelled.
1.226 + */
1.227 + IMPORT_C void Initialize(TRequestStatus& aStatus);
1.228 +
1.229 + /**
1.230 + * Cancels an ongoing Initialize() operation.
1.231 + *
1.232 + * The operation completes with KErrCancel.
1.233 + */
1.234 + IMPORT_C void CancelInitialize();
1.235 +
1.236 +public: // Implementation of MCertStore interface
1.237 +
1.238 + /** Lists all certificates that satisfy the supplied filter.
1.239 + *
1.240 + * @param aCertInfos An array that the returned certificates are added to .
1.241 + * @param aFilter A filter to restrict which certificates are returned.
1.242 + * @param aStatus The request status object.
1.243 + *
1.244 + */
1.245 + virtual void List(RMPointerArray<CCTCertInfo>& aCertInfos,
1.246 + const CCertAttributeFilter& aFilter, TRequestStatus& aStatus);
1.247 + virtual void CancelList();
1.248 + virtual void GetCert(CCTCertInfo*& aCertInfo, const TCTTokenObjectHandle& aHandle,
1.249 + TRequestStatus& aStatus);
1.250 + virtual void CancelGetCert();
1.251 +
1.252 + /** Gets the list of applications . Applications are represented by UIDs .
1.253 + *
1.254 + * @param aCertInfos An array of certificates .
1.255 + * @param aApplications An array that the returned application UIDs are added to.
1.256 + * @param aStatus The request status object.
1.257 + *
1.258 + */
1.259 + virtual void Applications(const CCTCertInfo& aCertInfo,
1.260 + RArray<TUid>& aApplications, TRequestStatus &aStatus);
1.261 + virtual void CancelApplications();
1.262 + virtual void IsApplicable(const CCTCertInfo& aCertInfo, TUid aApplication,
1.263 + TBool& aIsApplicable, TRequestStatus& aStatus);
1.264 + virtual void CancelIsApplicable();
1.265 + virtual void Trusted(const CCTCertInfo& aCertInfo, TBool& aTrusted,
1.266 + TRequestStatus& aStatus);
1.267 + virtual void CancelTrusted();
1.268 + virtual void Retrieve(const CCTCertInfo& aCertInfo, TDes8& aEncodedCert,
1.269 + TRequestStatus& aStatus);
1.270 + virtual void CancelRetrieve();
1.271 +
1.272 +public: // Functions defined in MCTWritableCertStore except Add functions
1.273 +
1.274 + /**
1.275 + * Removes a certificate.
1.276 + *
1.277 + * @param aCertInfo The certificate to be removed.
1.278 + * @param aStatus The request status object; contains the result of the Remove()
1.279 + * request when complete. Set to KErrCancel if an outstanding request is cancelled.
1.280 + *
1.281 + * @capability WriteUserData This requires the WriteUserData capability when
1.282 + * applied to user certificates.
1.283 + * @capability WriteDeviceData This requires the WriteDeviceData capability
1.284 + * when applied to CA certificates.
1.285 + * @leave KErrPermissionDenied If the caller doesn't have the required
1.286 + * capabilities.
1.287 + */
1.288 + IMPORT_C void Remove(const CCTCertInfo& aCertInfo, TRequestStatus& aStatus);
1.289 +
1.290 + /**
1.291 + * Cancels an ongoing Remove() operation.
1.292 + *
1.293 + * The operation completes with KErrCancel.
1.294 + */
1.295 + IMPORT_C void CancelRemove();
1.296 +
1.297 + /**
1.298 + * Replaces the current applicability settings with the settings in the
1.299 + * supplied array.
1.300 + *
1.301 + * This should only be called for CA certificates - it has no meaning for
1.302 + * user certificates.
1.303 + *
1.304 + * @param aCertInfo The certificate whose applicability should be updated.
1.305 + * @param aApplications The new applicability settings. Ownership of this
1.306 + * remains with the caller, and it must remain valid for the
1.307 + * lifetime of the call.
1.308 + * @param aStatus The request status object; contains the result of the SetApplicability()
1.309 + * request when complete. Set to KErrCancel, if an outstanding request is cancelled.
1.310 + *
1.311 + * @capability WriteDeviceData This requires the WriteDeviceData capability.
1.312 + * @leave KErrPermissionDenied If the caller doesn't have the required capabilities.
1.313 + */
1.314 + IMPORT_C void SetApplicability(const CCTCertInfo& aCertInfo,
1.315 + const RArray<TUid>& aApplications, TRequestStatus &aStatus);
1.316 +
1.317 + /**
1.318 + * Cancels an ongoing SetApplicability() operation.
1.319 + *
1.320 + * The operation completes with KErrCancel.
1.321 + */
1.322 + IMPORT_C void CancelSetApplicability();
1.323 +
1.324 + /**
1.325 + * Changes the trust settings.
1.326 + *
1.327 + * A CA certificate is trusted if the user is willing to use it for authenticating
1.328 + * servers. It has no meaning with other types of certificates.
1.329 + *
1.330 + * @param aCertInfo The certificate to be updated.
1.331 + * @param aTrusted ETrue, if trusted; EFalse, otherwise.
1.332 + * @param aStatus The request status object; contains the result of the SetTrust()
1.333 + * request when complete. Set to KErrCancel, if an outstanding request is cancelled.
1.334 + *
1.335 + * @capability WriteDeviceData This requires the WriteDeviceData capability.
1.336 + * @leave KErrPermissionDenied If the caller doesn't have the required capabilities.
1.337 + */
1.338 + IMPORT_C void SetTrust(const CCTCertInfo& aCertInfo, TBool aTrusted,
1.339 + TRequestStatus& aStatus);
1.340 +
1.341 + /**
1.342 + * Cancels an ongoing SetTrust() operation.
1.343 + *
1.344 + * The operation completes with KErrCancel.
1.345 + */
1.346 + IMPORT_C void CancelSetTrust();
1.347 +
1.348 +public:
1.349 + /**
1.350 + * Lists all certificates that have a particular subject DN.
1.351 + *
1.352 + * @param aCertInfos An array that the returned certificates are added to
1.353 + * @param aFilter A filter to restrict which certificates are returned.
1.354 + * @param aIssuer Only certificates with this issuer DN will be returned
1.355 + * @param aStatus Asynchronous request status.
1.356 + */
1.357 + IMPORT_C void List(RMPointerArray<CCTCertInfo>& aCertInfos,
1.358 + const CCertAttributeFilter& aFilter,
1.359 + const TDesC8& aIssuer,
1.360 + TRequestStatus& aStatus);
1.361 +
1.362 + /**
1.363 + * Lists all certificates that have a particular issuer.
1.364 + *
1.365 + * @param aCertInfos An array that the returned certificates are added to
1.366 + * @param aFilter A filter to restrict which certificates are returned.
1.367 + * @param aIssuers Only certificates with this issuer will be returned
1.368 + * @param aStatus Asynchronous request status.
1.369 + */
1.370 + IMPORT_C void List(RMPointerArray<CCTCertInfo>& aCertInfos,
1.371 + const CCertAttributeFilter& aFilter,
1.372 + RPointerArray<const TDesC8> aIssuers,
1.373 + TRequestStatus& aStatus);
1.374 +
1.375 + /**
1.376 + * Retrieves a certificate as a parsed object.
1.377 + *
1.378 + * This will only work for certificates that have a CCertificate-derived
1.379 + * representation, in other words X509 and WTLS certificates. If called for
1.380 + * a URL certificate, KErrNotSupported is returned.
1.381 + *
1.382 + * @param aCertInfo The certificate to retrieve
1.383 + * @param aCert The returned certificate. This object can safely be up-cast
1.384 + * to a CX509Certificate or CWTLSCertificate if it's known that
1.385 + * that is the certificate format.
1.386 + * @param aStatus Asynchronous request status.
1.387 + *
1.388 + * @capability ReadUserData This requires the ReadUserData capability when
1.389 + * applied to user certificates, as these may contain
1.390 + * sensitive user data.
1.391 + * @leave KErrPermissionDenied If called for a user certificate when the
1.392 + * caller doesn't have the ReadUserData capability.
1.393 + */
1.394 + IMPORT_C void Retrieve(const CCTCertInfo& aCertInfo, CCertificate*& aCert,
1.395 + TRequestStatus& aStatus);
1.396 +
1.397 + /**
1.398 + * Gets the number of certificate stores.
1.399 + *
1.400 + * @return The total number of certificate stores.
1.401 + */
1.402 + IMPORT_C TInt CertStoreCount() const;
1.403 +
1.404 + /**
1.405 + * Gets a particular certificate store.
1.406 + *
1.407 + * @param aIndex The index of the required certificate store.
1.408 + * A number between 0 and CertStoreCount() - 1.
1.409 + * @return The certificate store.
1.410 + */
1.411 + IMPORT_C MCTCertStore& CertStore(TInt aIndex);
1.412 +
1.413 + /**
1.414 + * Gets the number of writeable certificate stores.
1.415 + *
1.416 + * @return The number of writeable certificate stores.
1.417 + */
1.418 + IMPORT_C TInt WritableCertStoreCount() const;
1.419 +
1.420 + /**
1.421 + * Gets a particular writeable certificate store.
1.422 + *
1.423 + * @param aIndex The index of the required certificate store.
1.424 + * A number between 0 and WriteableCertStoreCount() - 1.
1.425 + * @return The writeable certificate store.
1.426 + */
1.427 + IMPORT_C MCTWritableCertStore& WritableCertStore(TInt aIndex);
1.428 +
1.429 + /**
1.430 + * Gets the number of read-only certificate stores.
1.431 + *
1.432 + * @return The number of read-only certificate stores.
1.433 + */
1.434 + IMPORT_C TInt ReadOnlyCertStoreCount() const;
1.435 +
1.436 + /**
1.437 + * Gets a particular read-only certificate store.
1.438 + *
1.439 + * @param aIndex The index of the required certificate store.
1.440 + * A number between 0 and ReadOnlyCertStoreCount() - 1.
1.441 + * @return The read-only certificate store.
1.442 + */
1.443 + IMPORT_C MCTCertStore& ReadOnlyCertStore(TInt aIndex);
1.444 +
1.445 +private:
1.446 + enum TState
1.447 + {
1.448 + EIdle,
1.449 +
1.450 + EInitializeGetTokenList,
1.451 + EInitializeGetToken,
1.452 + EInitializeGetWritableInterface,
1.453 + EInitializeGetReadableInterface,
1.454 + EInitializeGetReadableInterfaceFinished,
1.455 + EInitializeFinished,
1.456 +
1.457 + EList,
1.458 + ERetrieve,
1.459 + ERetrieveForList,
1.460 +
1.461 + EGetCert,
1.462 + EApplications,
1.463 + EIsApplicable,
1.464 + ETrusted,
1.465 + ERetrieveData,
1.466 + ERemove,
1.467 + ESetApplicability,
1.468 + ESetTrust
1.469 + };
1.470 + enum TCompareResults
1.471 + {
1.472 + ENo,
1.473 + EYes,
1.474 + EMaybe
1.475 + };
1.476 +private:
1.477 + CUnifiedCertStore(RFs& aFs, TBool aOpenForWrite);
1.478 + void ConstructL(RArray<TInt>& aOrderFilter);
1.479 + void DoCancel();
1.480 + void RunL();
1.481 + TInt RunError(TInt aError);
1.482 +
1.483 + // Implementations for asynchronous operations
1.484 + void InitializeL();
1.485 + void ListL(RMPointerArray<CCTCertInfo>& aCertInfos,
1.486 + const CCertAttributeFilter& aFilter);
1.487 + void ListL(RMPointerArray<CCTCertInfo>& aCertInfos,
1.488 + const CCertAttributeFilter& aFilter,
1.489 + RPointerArray<const TDesC8> aIssuers);
1.490 + void RetrieveL(const CCTCertInfo& aCertInfo, CCertificate*& aCert);
1.491 + void GetCertL(CCTCertInfo*& aCertInfo, const TCTTokenObjectHandle& aHandle);
1.492 + void ApplicationsL(const CCTCertInfo& aCertInfo, RArray<TUid>& aApplications);
1.493 + void IsApplicableL(const CCTCertInfo& aCertInfo, TUid aApplication,
1.494 + TBool& aIsApplicable);
1.495 + void TrustedL(const CCTCertInfo& aCertInfo, TBool& aTrusted);
1.496 + void RetrieveDataL(const CCTCertInfo& aCertInfo, TDes8& aEncodedCert);
1.497 + void RemoveL(const CCTCertInfo& aCertInfo);
1.498 + void SetApplicabilityL(const CCTCertInfo& aCertInfo,
1.499 + const RArray<TUid>& aApplications);
1.500 + void SetTrustL(const CCTCertInfo& aCertInfo, TBool aTrusted);
1.501 +
1.502 + // Helper functions
1.503 + void AllocWorkingVarsL();
1.504 + void BeginAsyncOp(TRequestStatus& aStatus, TState aState);
1.505 + void DestroyTemporaryMembers();
1.506 + MCTCertStore* GetCertStore(const TCTTokenObjectHandle& aHandle);
1.507 + void FindCertStoreL(const TCTTokenObjectHandle& aHandle);
1.508 + void FindWritableCertStoreL(const TCTTokenObjectHandle& aHandle);
1.509 + TCompareResults CompareCertInfoDN(const CCTCertInfo* aCertInfo);
1.510 + TBool MatchL(const CX500DistinguishedName& aName) const;
1.511 + void Complete(TInt aError);
1.512 + void CancelOutstandingRequest();
1.513 +
1.514 + // Filters CertStores according to specified order.
1.515 + void ApplyOrderingL(RCPointerArray<CCTTokenTypeInfo>& aTokenTypes);
1.516 +
1.517 + void FilterTokenTypesL(RCPointerArray<CCTTokenTypeInfo>& aSearchTokenTypes,
1.518 + RCPointerArray<CCTTokenTypeInfo>& aTempTokenTypes,
1.519 + TInt aOrderAttribute);
1.520 +
1.521 +private:
1.522 + /**
1.523 + * A file server session, this is not logically a part of this class
1.524 + * but is needed for the client store and the file certstore.
1.525 + */
1.526 + RFs& iFs;
1.527 +
1.528 + TBool iOpenedForWrite;
1.529 +
1.530 + RPointerArray<CCheckedCertStore> iReadOnlyCertStores;
1.531 + RPointerArray<CCheckedCertStore> iWritableCertStores;
1.532 + RPointerArray<CCheckedCertStore> iCertStores;
1.533 +
1.534 + TBool iCurrentlyDoingReadOnly;
1.535 +
1.536 + /**
1.537 + * This a TokenType retrieved from the iTokenTypes array.
1.538 + * We use this to get a list of Tokens and to open these Tokens.
1.539 + */
1.540 + MCTTokenType* iTokenType;
1.541 +
1.542 + /**
1.543 + * This is the list of Tokens for one of the Token Types of iTokenTypes.
1.544 + */
1.545 + RCPointerArray<HBufC> iTokens;
1.546 +
1.547 + /** All the UIDs of hardware token types */
1.548 + RArray<TUid> iHardwareTypeUids;
1.549 + /**
1.550 + * This is used as an index for the iTokens array when we try
1.551 + * to get an interface to each of the tokens.
1.552 + */
1.553 + TInt iIndexTokens;
1.554 +
1.555 + /**
1.556 + * A Token interface. We will use the interface to get a readable or writable
1.557 + * certstore interface. The value is updated at EInitializeGetToken and used
1.558 + * at EInitializeGetWritableInterface.
1.559 + */
1.560 + MCTToken* iToken;
1.561 +
1.562 + /**
1.563 + * We use this to (temporarily) store the interface we obtained from iToken.
1.564 + * It will be inserted in iWritableCertStores or iCertStores.
1.565 + */
1.566 + MCTTokenInterface* iTokenInterface;
1.567 +
1.568 + /**
1.569 + The index of the plugin certstore that is being processed
1.570 + */
1.571 + TInt iIndex;
1.572 +
1.573 + /**
1.574 + * This is the status of the caller of an asynchronous function. It must be set
1.575 + * to KRequestPending by the function while doing the processing.
1.576 + */
1.577 + TRequestStatus* iClientStatus;
1.578 +
1.579 + TState iState;
1.580 +
1.581 + TBool iIsInitialized;
1.582 +
1.583 + /**
1.584 + * This member holds all the variables that are only used to store temporary results
1.585 + * while performing a given operation. It must be initialized at the start of the
1.586 + * operation and deleted at the end of it whether the opeartion completes successfully
1.587 + * or not. When no operation is being performed it must be 0.
1.588 + */
1.589 + CUnifiedCertStoreWorkingVars* iWorkingVars;
1.590 +
1.591 + /**
1.592 + * The cert store in use by an outstanding async operation.
1.593 + */
1.594 + MCTCertStore *iCurrentCertStore;
1.595 +
1.596 + /**
1.597 + * The writable cert store in use by an outstanding async operation.
1.598 + */
1.599 + MCTWritableCertStore *iCurrentWritableCertStore;
1.600 +
1.601 + // Padding to keep class size constant
1.602 + TInt32 iUnused1;
1.603 + TInt32 iUnused2;
1.604 +
1.605 + // An array of Uids specifying Token Type ordering
1.606 + RArray<TInt> iOrderAttributes;
1.607 +
1.608 + // Publish and subscribe property which is used to notify the
1.609 + // cerificate addition,removal and application&trust setting.
1.610 + RProperty iPSCertstoreChangeProperty;
1.611 +
1.612 + };
1.613 +
1.614 +#endif