CUnifiedCertStore Class Reference

class CUnifiedCertStore : public CActive

The unified certificate store.

This class provides a certificate store whose contents are the sum of the contents of all certificate store implementations on the device. It is intended as the single point of access for clients wishing to use certificate stores.

Since this class is intended for widespread use, capability checks relating to certificate access are documented here even though the checks are actually made in the individual cert store implementations.

Inherits from

Public Member Functions
~CUnifiedCertStore()
voidApplications(const CCTCertInfo &, RArray< TUid > &, TRequestStatus &)
voidCancelApplications()
voidCancelGetCert()
IMPORT_C voidCancelInitialize()
voidCancelIsApplicable()
voidCancelList()
IMPORT_C voidCancelRemove()
voidCancelRetrieve()
IMPORT_C voidCancelSetApplicability()
IMPORT_C voidCancelSetTrust()
voidCancelTrusted()
IMPORT_C MCTCertStore &CertStore(TInt)
IMPORT_C TIntCertStoreCount()
voidGetCert(CCTCertInfo *&, const TCTTokenObjectHandle &, TRequestStatus &)
IMPORT_C voidInitialize(TRequestStatus &)
voidIsApplicable(const CCTCertInfo &, TUid, TBool &, TRequestStatus &)
voidList(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, TRequestStatus &)
IMPORT_C voidList(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidList(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, RPointerArray< const TDesC8 >, TRequestStatus &)
IMPORT_C CUnifiedCertStore *NewL(RFs &, TBool)
IMPORT_C CUnifiedCertStore *NewL(RFs &, TBool, RArray< TInt > &)
IMPORT_C CUnifiedCertStore *NewLC(RFs &, TBool)
IMPORT_C CUnifiedCertStore *NewLC(RFs &, TBool, RArray< TInt > &)
IMPORT_C MCTCertStore &ReadOnlyCertStore(TInt)
IMPORT_C TIntReadOnlyCertStoreCount()
IMPORT_C voidRemove(const CCTCertInfo &, TRequestStatus &)
voidRetrieve(const CCTCertInfo &, TDes8 &, TRequestStatus &)
IMPORT_C voidRetrieve(const CCTCertInfo &, CCertificate *&, TRequestStatus &)
IMPORT_C voidSetApplicability(const CCTCertInfo &, const RArray< TUid > &, TRequestStatus &)
IMPORT_C voidSetTrust(const CCTCertInfo &, TBool, TRequestStatus &)
voidTrusted(const CCTCertInfo &, TBool &, TRequestStatus &)
IMPORT_C MCTWritableCertStore &WritableCertStore(TInt)
IMPORT_C TIntWritableCertStoreCount()
Private Member Functions
CUnifiedCertStore(RFs &, TBool)
voidAllocWorkingVarsL()
voidApplicationsL(const CCTCertInfo &, RArray< TUid > &)
voidApplyOrderingL(RCPointerArray< CCTTokenTypeInfo > &)
voidBeginAsyncOp(TRequestStatus &, TState)
voidCancelOutstandingRequest()
TCompareResults CompareCertInfoDN(const CCTCertInfo *)
voidComplete(TInt)
voidConstructL(RArray< TInt > &)
voidDestroyTemporaryMembers()
voidDoCancel()
voidFilterTokenTypesL(RCPointerArray< CCTTokenTypeInfo > &, RCPointerArray< CCTTokenTypeInfo > &, TInt)
voidFindCertStoreL(const TCTTokenObjectHandle &)
voidFindWritableCertStoreL(const TCTTokenObjectHandle &)
voidGetCertL(CCTCertInfo *&, const TCTTokenObjectHandle &)
MCTCertStore *GetCertStore(const TCTTokenObjectHandle &)
voidInitializeL()
voidIsApplicableL(const CCTCertInfo &, TUid, TBool &)
voidListL(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &)
voidListL(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, RPointerArray< const TDesC8 >)
TBool MatchL(const CX500DistinguishedName &)
voidRemoveL(const CCTCertInfo &)
voidRetrieveDataL(const CCTCertInfo &, TDes8 &)
voidRetrieveL(const CCTCertInfo &, CCertificate *&)
TInt RunError(TInt)
voidRunL()
voidSetApplicabilityL(const CCTCertInfo &, const RArray< TUid > &)
voidSetTrustL(const CCTCertInfo &, TBool)
voidTrustedL(const CCTCertInfo &, TBool &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTCompareResults { ENo, EYes, EMaybe }
enumTState {
EIdle, EInitializeGetTokenList, EInitializeGetToken, EInitializeGetWritableInterface, EInitializeGetReadableInterface, EInitializeGetReadableInterfaceFinished, EInitializeFinished, EList, ERetrieve, ERetrieveForList, EGetCert, EApplications, EIsApplicable, ETrusted, ERetrieveData, ERemove, ESetApplicability, ESetTrust
}
Inherited Enumerations
CActive:TPriority
Private Attributes
RPointerArray< CCheckedCertStore >iCertStores
TRequestStatus *iClientStatus
MCTCertStore *iCurrentCertStore
MCTWritableCertStore *iCurrentWritableCertStore
TBool iCurrentlyDoingReadOnly
RFs &iFs
RArray< TUid >iHardwareTypeUids
TInt iIndex
TInt iIndexTokens
TBool iIsInitialized
TBool iOpenedForWrite
RArray< TInt >iOrderAttributes
RProperty iPSCertstoreChangeProperty
RPointerArray< CCheckedCertStore >iReadOnlyCertStores
TState iState
MCTToken *iToken
MCTTokenInterface *iTokenInterface
MCTTokenType *iTokenType
RCPointerArray< HBufC >iTokens
TInt32 iUnused1
TInt32 iUnused2
CUnifiedCertStoreWorkingVars *iWorkingVars
RPointerArray< CCheckedCertStore >iWritableCertStores
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CUnifiedCertStore(RFs &, TBool)

CUnifiedCertStore(RFs &aFs,
TBoolaOpenForWrite
)[private]

Parameters

RFs & aFs
TBool aOpenForWrite

~CUnifiedCertStore()

IMPORT_C~CUnifiedCertStore()

The destructor destroys all the resources owned by this object.

Member Functions Documentation

AllocWorkingVarsL()

voidAllocWorkingVarsL()[private]

Applications(const CCTCertInfo &, RArray< TUid > &, TRequestStatus &)

voidApplications(const CCTCertInfo &aCertInfo,
RArray< TUid > &aApplications,
TRequestStatus &aStatus
)[virtual]

Gets the list of applications . Applications are represented by UIDs .

Parameters

const CCTCertInfo & aCertInfo
RArray< TUid > & aApplicationsAn array that the returned application UIDs are added to.
TRequestStatus & aStatusThe request status object.

ApplicationsL(const CCTCertInfo &, RArray< TUid > &)

voidApplicationsL(const CCTCertInfo &aCertInfo,
RArray< TUid > &aApplications
)[private]

Parameters

const CCTCertInfo & aCertInfo
RArray< TUid > & aApplications

ApplyOrderingL(RCPointerArray< CCTTokenTypeInfo > &)

voidApplyOrderingL(RCPointerArray< CCTTokenTypeInfo > &aTokenTypes)[private]

Parameters

RCPointerArray< CCTTokenTypeInfo > & aTokenTypes

BeginAsyncOp(TRequestStatus &, TState)

voidBeginAsyncOp(TRequestStatus &aStatus,
TStateaState
)[private]

Parameters

TRequestStatus & aStatus
TState aState

CancelApplications()

voidCancelApplications()[virtual]

CancelGetCert()

voidCancelGetCert()[virtual]

CancelInitialize()

IMPORT_C voidCancelInitialize()

Cancels an ongoing Initialize() operation.

The operation completes with KErrCancel.

CancelIsApplicable()

voidCancelIsApplicable()[virtual]

CancelList()

voidCancelList()[virtual]

CancelOutstandingRequest()

voidCancelOutstandingRequest()[private]

CancelRemove()

IMPORT_C voidCancelRemove()

Cancels an ongoing Remove() operation.

The operation completes with KErrCancel.

CancelRetrieve()

voidCancelRetrieve()[virtual]

CancelSetApplicability()

IMPORT_C voidCancelSetApplicability()

Cancels an ongoing SetApplicability() operation.

The operation completes with KErrCancel.

CancelSetTrust()

IMPORT_C voidCancelSetTrust()

Cancels an ongoing SetTrust() operation.

The operation completes with KErrCancel.

CancelTrusted()

voidCancelTrusted()[virtual]

CertStore(TInt)

IMPORT_C MCTCertStore &CertStore(TIntaIndex)

Gets a particular certificate store.

The certificate store.

Parameters

TInt aIndexThe index of the required certificate store. A number between 0 and CertStoreCount() - 1.

CertStoreCount()

IMPORT_C TIntCertStoreCount()const

Gets the number of certificate stores.

The total number of certificate stores.

CompareCertInfoDN(const CCTCertInfo *)

TCompareResults CompareCertInfoDN(const CCTCertInfo *aCertInfo)[private]

Parameters

const CCTCertInfo * aCertInfo

Complete(TInt)

voidComplete(TIntaError)[private]

Parameters

TInt aError

ConstructL(RArray< TInt > &)

voidConstructL(RArray< TInt > &aOrderFilter)[private]

Parameters

RArray< TInt > & aOrderFilter

DestroyTemporaryMembers()

voidDestroyTemporaryMembers()[private]

DoCancel()

voidDoCancel()[private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

CActive::Cancel

FilterTokenTypesL(RCPointerArray< CCTTokenTypeInfo > &, RCPointerArray< CCTTokenTypeInfo > &, TInt)

voidFilterTokenTypesL(RCPointerArray< CCTTokenTypeInfo > &aSearchTokenTypes,
RCPointerArray< CCTTokenTypeInfo > &aTempTokenTypes,
TIntaOrderAttribute
)[private]

Parameters

RCPointerArray< CCTTokenTypeInfo > & aSearchTokenTypes
RCPointerArray< CCTTokenTypeInfo > & aTempTokenTypes
TInt aOrderAttribute

FindCertStoreL(const TCTTokenObjectHandle &)

voidFindCertStoreL(const TCTTokenObjectHandle &aHandle)[private]

Parameters

const TCTTokenObjectHandle & aHandle

FindWritableCertStoreL(const TCTTokenObjectHandle &)

voidFindWritableCertStoreL(const TCTTokenObjectHandle &aHandle)[private]

Parameters

const TCTTokenObjectHandle & aHandle

GetCert(CCTCertInfo *&, const TCTTokenObjectHandle &, TRequestStatus &)

voidGetCert(CCTCertInfo *&aCertInfo,
const TCTTokenObjectHandle &aHandle,
TRequestStatus &aStatus
)[virtual]

Parameters

CCTCertInfo *& aCertInfo
const TCTTokenObjectHandle & aHandle
TRequestStatus & aStatus

GetCertL(CCTCertInfo *&, const TCTTokenObjectHandle &)

voidGetCertL(CCTCertInfo *&aCertInfo,
const TCTTokenObjectHandle &aHandle
)[private]

Parameters

CCTCertInfo *& aCertInfo
const TCTTokenObjectHandle & aHandle

GetCertStore(const TCTTokenObjectHandle &)

MCTCertStore *GetCertStore(const TCTTokenObjectHandle &aHandle)[private]

Parameters

const TCTTokenObjectHandle & aHandle

Initialize(TRequestStatus &)

IMPORT_C voidInitialize(TRequestStatus &aStatus)

Initializes the manager.

It must be called after the manager has been constructed and before any call to the manager functions.

This is an asynchronous request.

Parameters

TRequestStatus & aStatusThe request status object; contains the result of the Initialize() request when complete. Set to KErrCancel if any outstanding request is cancelled.

InitializeL()

voidInitializeL()[private]

IsApplicable(const CCTCertInfo &, TUid, TBool &, TRequestStatus &)

voidIsApplicable(const CCTCertInfo &aCertInfo,
TUidaApplication,
TBool &aIsApplicable,
TRequestStatus &aStatus
)[virtual]

Parameters

const CCTCertInfo & aCertInfo
TUid aApplication
TBool & aIsApplicable
TRequestStatus & aStatus

IsApplicableL(const CCTCertInfo &, TUid, TBool &)

voidIsApplicableL(const CCTCertInfo &aCertInfo,
TUidaApplication,
TBool &aIsApplicable
)[private]

Parameters

const CCTCertInfo & aCertInfo
TUid aApplication
TBool & aIsApplicable

List(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, TRequestStatus &)

voidList(RMPointerArray< CCTCertInfo > &aCertInfos,
const CCertAttributeFilter &aFilter,
TRequestStatus &aStatus
)[virtual]

Lists all certificates that satisfy the supplied filter.

Parameters

RMPointerArray< CCTCertInfo > & aCertInfosAn array that the returned certificates are added to .
const CCertAttributeFilter & aFilterA filter to restrict which certificates are returned.
TRequestStatus & aStatusThe request status object.

List(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidList(RMPointerArray< CCTCertInfo > &aCertInfos,
const CCertAttributeFilter &aFilter,
const TDesC8 &aIssuer,
TRequestStatus &aStatus
)

Lists all certificates that have a particular subject DN.

Parameters

RMPointerArray< CCTCertInfo > & aCertInfosAn array that the returned certificates are added to
const CCertAttributeFilter & aFilterA filter to restrict which certificates are returned.
const TDesC8 & aIssuerOnly certificates with this issuer DN will be returned
TRequestStatus & aStatusAsynchronous request status.

List(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, RPointerArray< const TDesC8 >, TRequestStatus &)

IMPORT_C voidList(RMPointerArray< CCTCertInfo > &aCertInfos,
const CCertAttributeFilter &aFilter,
RPointerArray< const TDesC8 >aIssuers,
TRequestStatus &aStatus
)

Lists all certificates that have a particular issuer.

Parameters

RMPointerArray< CCTCertInfo > & aCertInfosAn array that the returned certificates are added to
const CCertAttributeFilter & aFilterA filter to restrict which certificates are returned.
RPointerArray< const TDesC8 > aIssuersOnly certificates with this issuer will be returned
TRequestStatus & aStatusAsynchronous request status.

ListL(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &)

voidListL(RMPointerArray< CCTCertInfo > &aCertInfos,
const CCertAttributeFilter &aFilter
)[private]

Parameters

RMPointerArray< CCTCertInfo > & aCertInfos
const CCertAttributeFilter & aFilter

ListL(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, RPointerArray< const TDesC8 >)

voidListL(RMPointerArray< CCTCertInfo > &aCertInfos,
const CCertAttributeFilter &aFilter,
RPointerArray< const TDesC8 >aIssuers
)[private]

Parameters

RMPointerArray< CCTCertInfo > & aCertInfos
const CCertAttributeFilter & aFilter
RPointerArray< const TDesC8 > aIssuers

MatchL(const CX500DistinguishedName &)

TBool MatchL(const CX500DistinguishedName &aName)const [private]

Parameters

const CX500DistinguishedName & aName

NewL(RFs &, TBool)

IMPORT_C CUnifiedCertStore *NewL(RFs &aFs,
TBoolaOpenForWrite
)[static]

Creates a new CUnifiedCertStore

A pointer to an instance of the CUnifiedCertStore class.

Parameters

RFs & aFsA file server session. It must already be open.
TBool aOpenForWriteETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access.

NewL(RFs &, TBool, RArray< TInt > &)

IMPORT_C CUnifiedCertStore *NewL(RFs &aFs,
TBoolaOpenForWrite,
RArray< TInt > &aOrderFilter
)[static]

Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed by it will be filtered and ordered.

A pointer to an instance of the CUnifiedCertStore class.

Parameters

RFs & aFsA file server session. It must already be open.
TBool aOpenForWriteETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. Ownership is taken.
RArray< TInt > & aOrderFilterAn array of the unique sequence IDs specifying CertStore ordering.

NewLC(RFs &, TBool)

IMPORT_C CUnifiedCertStore *NewLC(RFs &aFs,
TBoolaOpenForWrite
)[static]

Creates a new CUnifiedCertStore and pushes it on the cleanup stack.

A pointer to an instance of the CUnifiedCertStore class.

Parameters

RFs & aFsA file server session. It must already be open.
TBool aOpenForWriteETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access.

NewLC(RFs &, TBool, RArray< TInt > &)

IMPORT_C CUnifiedCertStore *NewLC(RFs &aFs,
TBoolaOpenForWrite,
RArray< TInt > &aOrderFilter
)[static]

Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed by it will be filtered and ordered, and it is pushed on the cleanup stack.

A pointer to an instance of the CUnifiedCertStore class.

Parameters

RFs & aFsA file server session. It must already be open.
TBool aOpenForWriteETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. Ownership is taken.
RArray< TInt > & aOrderFilterAn array of the unique sequence IDs specifying CertStore ordering.

ReadOnlyCertStore(TInt)

IMPORT_C MCTCertStore &ReadOnlyCertStore(TIntaIndex)

Gets a particular read-only certificate store.

The read-only certificate store.

Parameters

TInt aIndexThe index of the required certificate store. A number between 0 and ReadOnlyCertStoreCount() - 1.

ReadOnlyCertStoreCount()

IMPORT_C TIntReadOnlyCertStoreCount()const

Gets the number of read-only certificate stores.

The number of read-only certificate stores.

Remove(const CCTCertInfo &, TRequestStatus &)

IMPORT_C voidRemove(const CCTCertInfo &aCertInfo,
TRequestStatus &aStatus
)

Removes a certificate.

capability

WriteUserData This requires the WriteUserData capability when applied to user certificates.

capability

WriteDeviceData This requires the WriteDeviceData capability when applied to CA certificates.

leave

KErrPermissionDenied If the caller doesn't have the required capabilities.

Parameters

const CCTCertInfo & aCertInfoThe certificate to be removed.
TRequestStatus & aStatusThe request status object; contains the result of the Remove() request when complete. Set to KErrCancel if an outstanding request is cancelled.

RemoveL(const CCTCertInfo &)

voidRemoveL(const CCTCertInfo &aCertInfo)[private]

Parameters

const CCTCertInfo & aCertInfo

Retrieve(const CCTCertInfo &, TDes8 &, TRequestStatus &)

voidRetrieve(const CCTCertInfo &aCertInfo,
TDes8 &aEncodedCert,
TRequestStatus &aStatus
)[virtual]

Parameters

const CCTCertInfo & aCertInfo
TDes8 & aEncodedCert
TRequestStatus & aStatus

Retrieve(const CCTCertInfo &, CCertificate *&, TRequestStatus &)

IMPORT_C voidRetrieve(const CCTCertInfo &aCertInfo,
CCertificate *&aCert,
TRequestStatus &aStatus
)

Retrieves a certificate as a parsed object.

This will only work for certificates that have a CCertificate-derived representation, in other words X509 and WTLS certificates. If called for a URL certificate, KErrNotSupported is returned.

capability

ReadUserData This requires the ReadUserData capability when applied to user certificates, as these may contain sensitive user data.

leave

KErrPermissionDenied If called for a user certificate when the caller doesn't have the ReadUserData capability.

Parameters

const CCTCertInfo & aCertInfoThe certificate to retrieve
CCertificate *& aCertThe returned certificate. This object can safely be up-cast to a CX509Certificate or CWTLSCertificate if it's known that that is the certificate format.
TRequestStatus & aStatusAsynchronous request status.

RetrieveDataL(const CCTCertInfo &, TDes8 &)

voidRetrieveDataL(const CCTCertInfo &aCertInfo,
TDes8 &aEncodedCert
)[private]

Parameters

const CCTCertInfo & aCertInfo
TDes8 & aEncodedCert

RetrieveL(const CCTCertInfo &, CCertificate *&)

voidRetrieveL(const CCTCertInfo &aCertInfo,
CCertificate *&aCert
)[private]

Parameters

const CCTCertInfo & aCertInfo
CCertificate *& aCert

RunError(TInt)

TInt RunError(TIntaError)[private, virtual]

Parameters

TInt aError

RunL()

voidRunL()[private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start

CActiveScheduler::Error

CActiveScheduler::WaitForAnyRequest

TRAPD

SetApplicability(const CCTCertInfo &, const RArray< TUid > &, TRequestStatus &)

IMPORT_C voidSetApplicability(const CCTCertInfo &aCertInfo,
const RArray< TUid > &aApplications,
TRequestStatus &aStatus
)

Replaces the current applicability settings with the settings in the supplied array.

This should only be called for CA certificates - it has no meaning for user certificates.

capability

WriteDeviceData This requires the WriteDeviceData capability.

leave

KErrPermissionDenied If the caller doesn't have the required capabilities.

Parameters

const CCTCertInfo & aCertInfoThe certificate whose applicability should be updated.
const RArray< TUid > & aApplicationsThe new applicability settings. Ownership of this remains with the caller, and it must remain valid for the lifetime of the call.
TRequestStatus & aStatusThe request status object; contains the result of the SetApplicability() request when complete. Set to KErrCancel, if an outstanding request is cancelled.

SetApplicabilityL(const CCTCertInfo &, const RArray< TUid > &)

voidSetApplicabilityL(const CCTCertInfo &aCertInfo,
const RArray< TUid > &aApplications
)[private]

Parameters

const CCTCertInfo & aCertInfo
const RArray< TUid > & aApplications

SetTrust(const CCTCertInfo &, TBool, TRequestStatus &)

IMPORT_C voidSetTrust(const CCTCertInfo &aCertInfo,
TBoolaTrusted,
TRequestStatus &aStatus
)

Changes the trust settings.

A CA certificate is trusted if the user is willing to use it for authenticating servers. It has no meaning with other types of certificates.

capability

WriteDeviceData This requires the WriteDeviceData capability.

leave

KErrPermissionDenied If the caller doesn't have the required capabilities.

Parameters

const CCTCertInfo & aCertInfoThe certificate to be updated.
TBool aTrustedETrue, if trusted; EFalse, otherwise.
TRequestStatus & aStatusThe request status object; contains the result of the SetTrust() request when complete. Set to KErrCancel, if an outstanding request is cancelled.

SetTrustL(const CCTCertInfo &, TBool)

voidSetTrustL(const CCTCertInfo &aCertInfo,
TBoolaTrusted
)[private]

Parameters

const CCTCertInfo & aCertInfo
TBool aTrusted

Trusted(const CCTCertInfo &, TBool &, TRequestStatus &)

voidTrusted(const CCTCertInfo &aCertInfo,
TBool &aTrusted,
TRequestStatus &aStatus
)[virtual]

Parameters

const CCTCertInfo & aCertInfo
TBool & aTrusted
TRequestStatus & aStatus

TrustedL(const CCTCertInfo &, TBool &)

voidTrustedL(const CCTCertInfo &aCertInfo,
TBool &aTrusted
)[private]

Parameters

const CCTCertInfo & aCertInfo
TBool & aTrusted

WritableCertStore(TInt)

IMPORT_C MCTWritableCertStore &WritableCertStore(TIntaIndex)

Gets a particular writeable certificate store.

The writeable certificate store.

Parameters

TInt aIndexThe index of the required certificate store. A number between 0 and WriteableCertStoreCount() - 1.

WritableCertStoreCount()

IMPORT_C TIntWritableCertStoreCount()const

Gets the number of writeable certificate stores.

The number of writeable certificate stores.

Member Enumerations Documentation

Enum TCompareResults

Enumerators

ENo
EYes
EMaybe

Enum TState

Enumerators

EIdle
EInitializeGetTokenList
EInitializeGetToken
EInitializeGetWritableInterface
EInitializeGetReadableInterface
EInitializeGetReadableInterfaceFinished
EInitializeFinished
EList
ERetrieve
ERetrieveForList
EGetCert
EApplications
EIsApplicable
ETrusted
ERetrieveData
ERemove
ESetApplicability
ESetTrust

Member Data Documentation

RPointerArray< CCheckedCertStore > iCertStores

RPointerArray< CCheckedCertStore >iCertStores[private]

TRequestStatus * iClientStatus

TRequestStatus *iClientStatus[private]

This is the status of the caller of an asynchronous function. It must be set to KRequestPending by the function while doing the processing.

MCTCertStore * iCurrentCertStore

MCTCertStore *iCurrentCertStore[private]

The cert store in use by an outstanding async operation.

MCTWritableCertStore * iCurrentWritableCertStore

MCTWritableCertStore *iCurrentWritableCertStore[private]

The writable cert store in use by an outstanding async operation.

TBool iCurrentlyDoingReadOnly

TBool iCurrentlyDoingReadOnly[private]

RFs & iFs

RFs &iFs[private]

A file server session, this is not logically a part of this class but is needed for the client store and the file certstore.

RArray< TUid > iHardwareTypeUids

RArray< TUid >iHardwareTypeUids[private]

All the UIDs of hardware token types

TInt iIndex

TInt iIndex[private]

The index of the plugin certstore that is being processed

TInt iIndexTokens

TInt iIndexTokens[private]

This is used as an index for the iTokens array when we try to get an interface to each of the tokens.

TBool iIsInitialized

TBool iIsInitialized[private]

TBool iOpenedForWrite

TBool iOpenedForWrite[private]

RArray< TInt > iOrderAttributes

RArray< TInt >iOrderAttributes[private]

RProperty iPSCertstoreChangeProperty

RProperty iPSCertstoreChangeProperty[private]

RPointerArray< CCheckedCertStore > iReadOnlyCertStores

RPointerArray< CCheckedCertStore >iReadOnlyCertStores[private]

TState iState

TState iState[private]

MCTToken * iToken

MCTToken *iToken[private]

A Token interface. We will use the interface to get a readable or writable certstore interface. The value is updated at EInitializeGetToken and used at EInitializeGetWritableInterface.

MCTTokenInterface * iTokenInterface

MCTTokenInterface *iTokenInterface[private]

We use this to (temporarily) store the interface we obtained from iToken. It will be inserted in iWritableCertStores or iCertStores.

MCTTokenType * iTokenType

MCTTokenType *iTokenType[private]

This a TokenType retrieved from the iTokenTypes array. We use this to get a list of Tokens and to open these Tokens.

RCPointerArray< HBufC > iTokens

RCPointerArray< HBufC >iTokens[private]

This is the list of Tokens for one of the Token Types of iTokenTypes.

TInt32 iUnused1

TInt32 iUnused1[private]

TInt32 iUnused2

TInt32 iUnused2[private]

CUnifiedCertStoreWorkingVars * iWorkingVars

CUnifiedCertStoreWorkingVars *iWorkingVars[private]

This member holds all the variables that are only used to store temporary results while performing a given operation. It must be initialized at the start of the operation and deleted at the end of it whether the opeartion completes successfully or not. When no operation is being performed it must be 0.

RPointerArray< CCheckedCertStore > iWritableCertStores

RPointerArray< CCheckedCertStore >iWritableCertStores[private]