CPKIXCertsFromStore Class Reference

class CPKIXCertsFromStore : public CActive

This class is used to retrieve the certificates from a store It doesn't work with client base trust.

Inherits from

Public Member Functions
~CPKIXCertsFromStore ()
void CancelCandidates ()
void CandidatesL (const CX509Certificate &, RPointerArray < CX509Certificate > &, TRequestStatus &)
void DoCancel ()
void Initialize ( TRequestStatus &)
CPKIXCertsFromStore * NewL ( MCertStore &)
CPKIXCertsFromStore * NewL ( MCertStore &, TUid )
CPKIXCertsFromStore * NewLC ( MCertStore &)
CPKIXCertsFromStore * NewLC ( MCertStore &, TUid )
void Release ()
TInt RunError ( TInt )
void RunL ()
Private Member Functions
CPKIXCertsFromStore ( MCertStore &)
CPKIXCertsFromStore ( MCertStore &, TUid )
void ConstructL ()
void ConstructL ( TUid )
void HandleEAddCandidateL ()
void HandleECheckTrusted ()
void HandleEGetCertificateL ()
TBool IsDuplicateL (const CX509Certificate &)
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
enum TState {
EIdle  = 0, EInitialize , ECheckTrusted , EGetCertificate , EAddCandidate , EEnd
}
Inherited Enumerations
CActive:TPriority
Private Attributes
RPointerArray < CX509Certificate > * iCandidates
HBufC8 * iCertData
RMPointerArray < CCTCertInfo > iCertInfos
TPtr8 * iCertPtr
MCertStore & iCertStore
TUid iClient
TInt iEntriesIndex
CCertAttributeFilter * iFilter
TBool iIsTrusted
TRequestStatus * iOriginalRequestStatus
const CX500DistinguishedName * iRootName
TState iState
const CX509Certificate * iSubject
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CPKIXCertsFromStore(MCertStore &)

CPKIXCertsFromStore ( MCertStore & aCertStore ) [private]

Parameters

MCertStore & aCertStore

CPKIXCertsFromStore(MCertStore &, TUid)

CPKIXCertsFromStore ( MCertStore & aCertStore,
TUid aClient
) [private]

Parameters

MCertStore & aCertStore
TUid aClient

~CPKIXCertsFromStore()

~CPKIXCertsFromStore ( ) [virtual]

Member Functions Documentation

CancelCandidates()

void CancelCandidates ( ) [virtual]

CandidatesL(const CX509Certificate &, RPointerArray< CX509Certificate > &, TRequestStatus &)

void CandidatesL ( const CX509Certificate & aSubject,
RPointerArray < CX509Certificate > & aCandidates,
TRequestStatus & aStatus
) [virtual]

This function returns a list of CA certificates that authenticate the aSubject certificate.

Parameters

const CX509Certificate & aSubject
RPointerArray < CX509Certificate > & aCandidates On return, this array contains the list of CA certificates that can possibly be used to authenticate aSubject. The array owns the elements and must take care of deleting them.
TRequestStatus & aStatus

ConstructL()

void ConstructL ( ) [private]

ConstructL(TUid)

void ConstructL ( TUid aClient ) [private]

Parameters

TUid aClient

DoCancel()

void DoCancel ( ) [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

HandleEAddCandidateL()

void HandleEAddCandidateL ( ) [private]

HandleECheckTrusted()

void HandleECheckTrusted ( ) [private]

HandleEGetCertificateL()

void HandleEGetCertificateL ( ) [private]

Initialize(TRequestStatus &)

void Initialize ( TRequestStatus & aStatus )

This function does the actual listing of certificates based on the filter created. It must be called after construction.

Parameters

TRequestStatus & aStatus Standard parameter for asynchronous calling convention.

IsDuplicateL(const CX509Certificate &)

TBool IsDuplicateL ( const CX509Certificate & aCertificate ) [private]

Parameters

const CX509Certificate & aCertificate

NewL(MCertStore &)

CPKIXCertsFromStore * NewL ( MCertStore & aCertStore ) [static]

Constructs a new CPKIXCertsFromStore instance and adds it to the active scheduler Initialize must be called after this function

Parameters

MCertStore & aCertStore

NewL(MCertStore &, TUid)

CPKIXCertsFromStore * NewL ( MCertStore & aCertStore,
TUid aClient
) [static]

Constructs a new CPKIXCertsFromStore instance and adds it to the active scheduler Initialize must be called after this function

Parameters

MCertStore & aCertStore
TUid aClient The UID for which the certificates are to be retrieved from the cert store, This UID is also passed to the filter for retrieving the certificates specific to this client UID.

NewLC(MCertStore &)

CPKIXCertsFromStore * NewLC ( MCertStore & aCertStore ) [static]

Parameters

MCertStore & aCertStore

NewLC(MCertStore &, TUid)

CPKIXCertsFromStore * NewLC ( MCertStore & aCertStore,
TUid aClient
) [static]

Parameters

MCertStore & aCertStore
TUid aClient

Release()

void Release ( ) [virtual]

RunError(TInt)

TInt RunError ( TInt aError ) [virtual]

Parameters

TInt aError

RunL()

void RunL ( ) [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

Member Enumerations Documentation

Enum TState

Enumerators

EIdle = 0
EInitialize
ECheckTrusted
EGetCertificate
EAddCandidate
EEnd

Member Data Documentation

RPointerArray< CX509Certificate > * iCandidates

RPointerArray < CX509Certificate > * iCandidates [private]

We don't own this

HBufC8 * iCertData

HBufC8 * iCertData [private]

iCertData is used for CandidateL

RMPointerArray< CCTCertInfo > iCertInfos

RMPointerArray < CCTCertInfo > iCertInfos [private]

Used when listing certificates (filtered but not on trust).

TPtr8 * iCertPtr

TPtr8 * iCertPtr [private]

MCertStore & iCertStore

MCertStore & iCertStore [private]

TUid iClient

TUid iClient [private]

TInt iEntriesIndex

TInt iEntriesIndex [private]

iEntriesIndex is used for CandidateL

CCertAttributeFilter * iFilter

CCertAttributeFilter * iFilter [private]

TBool iIsTrusted

TBool iIsTrusted [private]

Applies to certificate at iEntriesIndex - reflects trust setting

TRequestStatus * iOriginalRequestStatus

TRequestStatus * iOriginalRequestStatus [private]

The TRequestStatus that must be updated when the operation requested by a user of this class has been completed

const CX500DistinguishedName * iRootName

const CX500DistinguishedName * iRootName [private]

iRootName is used for CandidateL

TState iState

TState iState [private]

The state used to know what must be done when executing RunL() .

const CX509Certificate * iSubject

const CX509Certificate * iSubject [private]

We don't own this