class CPKIXCertChainAO : public CActive |
This class handles the asynchronous part of the pkix chain validation. It is an active object which handles the asynchronous certificate store operations.
Public Member Functions | |
---|---|
~CPKIXCertChainAO () | |
void | CancelValidate () |
void | DoCancel () |
CPKIXCertChainAO * | NewL ( MCertStore &, CPKIXCertChainBase &, const RPointerArray < CX509Certificate > &) |
CPKIXCertChainAO * | NewL ( MCertStore &, CPKIXCertChainBase &, const TUid ) |
TInt | RunError ( TInt ) |
void | RunL () |
void | ValidateL ( CPKIXValidationResultBase &, const TTime &, const CArrayPtr < HBufC > *, TRequestStatus &) |
Private Member Enumerations | |
---|---|
enum |
TState
{
EAddRoots , ERootsInitialized , EBuildChainStart , EBuildChainAddCandidateEnd , EBuildChainCertsFromStoreBegin , EBuildChainCertsFromStoreEnd , EAddCandidateIntermediateCertsEnd , EValidateEnd } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CPKIXCertChainAO | ( | MCertStore & | aCertStore, |
CPKIXCertChainBase & | aPKIXCertChain | ||
) | [private] |
MCertStore & aCertStore | |
CPKIXCertChainBase & aPKIXCertChain |
CPKIXCertChainAO | ( | MCertStore & | aCertStore, |
CPKIXCertChainBase & | aPKIXCertChain, | ||
const TUid | aClient | ||
) | [private] |
MCertStore & aCertStore | |
CPKIXCertChainBase & aPKIXCertChain | |
const TUid aClient |
void | CheckCriticalExtsL | ( | CPKIXValidationState & | aState, |
CPKIXValidationResultBase & | aResult | |||
) | const [private] |
CPKIXValidationState & aState | |
CPKIXValidationResultBase & aResult |
void | CheckSignatureAndNameL | ( | const CX509Certificate & | aCert, |
CPKIXValidationState & | aState, | |||
CPKIXValidationResultBase & | aResult | |||
) | const [private] |
const CX509Certificate & aCert | |
CPKIXValidationState & aState | |
CPKIXValidationResultBase & aResult |
void | ConstructL | ( | const RPointerArray < CX509Certificate > & | aRootCerts | ) | [private] |
const RPointerArray < CX509Certificate > & aRootCerts |
void | CriticalExtsL | ( | CPKIXValidationState & | aState, |
const CX509Certificate & | aCert | |||
) | const [private] |
CPKIXValidationState & aState | |
const CX509Certificate & aCert |
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() .
void | DoValidateL | ( | CPKIXValidationResultBase & | aValidationResult, |
const TTime & | aValidationTime, | |||
const CArrayPtr < HBufC > * | aInitialPolicies | |||
) | [private] |
CPKIXValidationResultBase & aValidationResult | |
const TTime & aValidationTime | |
const CArrayPtr < HBufC > * aInitialPolicies |
void | HandleEAddCandidateIntermediateCertsEndL | ( | ) | [private] |
void | HandleEAddRootsL | ( | ) | [private] |
Creates a list of all the certificates retrieved from the store based on the filter passed.
void | HandleERootsInitializedL | ( | ) | [private] |
Adds the list of certificates retrieved from the store, iRoots ( CPKIXChainBuilder ) maintains a templatized list of all the certificates in MPKIXCertSource format.
CPKIXCertChainAO * | NewL | ( | MCertStore & | aCertStore, |
CPKIXCertChainBase & | aPKIXCertChain, | |||
const RPointerArray < CX509Certificate > & | aRootCerts | |||
) | [static] |
MCertStore & aCertStore | |
CPKIXCertChainBase & aPKIXCertChain | |
const RPointerArray < CX509Certificate > & aRootCerts |
CPKIXCertChainAO * | NewL | ( | MCertStore & | aCertStore, |
CPKIXCertChainBase & | aPKIXCertChain, | |||
const TUid | aClient | |||
) | [static] |
MCertStore & aCertStore | |
CPKIXCertChainBase & aPKIXCertChain | |
const TUid aClient |
void | ProcessCertsL | ( | CPKIXValidationState & | aState, |
CPKIXValidationResultBase & | aResult | |||
) | const [private] |
CPKIXValidationState & aState | |
CPKIXValidationResultBase & aResult |
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
void | SetParamsL | ( | CX509Certificate & | aCert, |
const TPtrC8 & | aEncodedParams | |||
) | [private] |
CX509Certificate & aCert | |
const TPtrC8 & aEncodedParams |
void | ValidateL | ( | CPKIXValidationResultBase & | aValidationResult, |
const TTime & | aValidationTime, | |||
const CArrayPtr < HBufC > * | aInitialPolicies, | |||
TRequestStatus & | aStatus | |||
) |
CPKIXValidationResultBase & aValidationResult | |
const TTime & aValidationTime | |
const CArrayPtr < HBufC > * aInitialPolicies | |
TRequestStatus & aStatus |
The states used to know what to do in the RunL function.
EAddRoots | |
ERootsInitialized | |
EBuildChainStart | |
EBuildChainAddCandidateEnd | |
EBuildChainCertsFromStoreBegin | |
EBuildChainCertsFromStoreEnd | |
EAddCandidateIntermediateCertsEnd | |
EValidateEnd |
CPKIXCertsFromStore * | iCertsFromStoreRoots | [private] |
Ownership of this object is peculiar.
We need this to be a member because it is created and initialized in the EAddRoots handler but is only added to iRoots in the ERootsInitialized handler. iRoots takes ownesrhip of it, so it is set to 0 afterwards.
The only case where the destructor will have to delete it, is when a leave occurs between the EAddRoots and ERootsInitialized states.
const CArrayPtr < HBufC > * | iInitialPolicies | [private] |
To store the parameters passed to CPKIXCertChainBase::Validate
CPKIXChainBuilder * | iRoots | [private] |
explicitly : the user gives a set of root certificates at construction time.
implicitly : the user gives the uid of the application and the validation code retrieves the root certificates trusted for this application from the certificate store.
CPKIXValidationResultBase * | iValidationResult | [private] |
To store the parameters passed to CPKIXCertChainBase::Validate
TTime | iValidationTime | [private] |
To store the parameters passed to CPKIXCertChainBase::Validate
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.