CWimCert Class Reference

class CWimCert : public CActive

Reads certificate extra information from Smart Card

WimClient
Since
Series60 2.1

Inherits from

Public Member Functions
~CWimCert ()
IMPORT_C void CancelGetExtras ()
IMPORT_C void CancelInitialize ()
IMPORT_C void GetExtras (const TDesC8 &, RCPointerArray < HBufC > &, TCertLocation &, TRequestStatus &)
IMPORT_C void Initialize ( TRequestStatus &)
IMPORT_C CWimCert * NewL ()
Private Member Functions
CWimCert ()
void AllocMemoryForExtraDataRetrieveL ()
TBool CertificateLocated ()
void Cleanup ( TAny *)
void CleanupRefLst ( TAny *)
void ConstructL ()
void DeAllocMemoryForExtraDataRetrieve ()
void DeallocRArrays ()
void DeallocWimCertInfo ()
void DoCancel ()
void ExtraDataFoundL ()
TInt RunError ( TInt )
void RunL ()
void SignalOwnStatusAndComplete ()
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 TPhase {
EConnectClientSession , ECreateNewSession , EInitializeWim , EListCertsFromWim , EGetCertClientSession , ELocateCertificate , EGiveExtraData
}
Inherited Enumerations
CActive:TPriority
Private Attributes
PHBufC8 * iCAId
PTPtr8 * iCAIdPtr
TUint8 iCertCount
HBufC * iCertHBufTrustedUsageFromServer
TPtr * iCertHBufTrustedUsageFromServerPtr
TUint8 iCertIndex
RArray < TUint > iCertTypes
RWimMgmt * iClientSession
TRequestStatus * iClientStatus
RWimCertMgmt * iConnectionHandle
PHBufC8 * iIssuerHash
PTPtr8 * iIssuerHashPtr
PHBufC8 * iKeyId
TPtr8 * iKeyIdPointer
PTPtr8 * iKeyIdPtr
HBufC8 * iKeyIdToBeMatched
RArray < HBufC8 * > iKeyIds
PHBufC8 * iLabel
PTPtr8 * iLabelPtr
TCertLocation * iLocation
TPhase iPhase
RArray < TUint > iTrustedUsageLengths
RCPointerArray < HBufC > * iTrustedUsages
RArray < TUint > iUsages
TInt iWimStartErr
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CWimCert()

CWimCert ( ) [private]

C++ default constructor.

~CWimCert()

IMPORT_C ~CWimCert ( ) [virtual]

Destructor

Member Functions Documentation

AllocMemoryForExtraDataRetrieveL()

void AllocMemoryForExtraDataRetrieveL ( ) [private]

Allocates variables when retrieving extra certificate data from WimServer.

CancelGetExtras()

IMPORT_C void CancelGetExtras ( )

Cancels outgoing GetExtras operation. After necessary cleanup, caller is signalled with KErrCancel

CancelInitialize()

IMPORT_C void CancelInitialize ( )

Cancels outgoing Initialize operation. After necessary cleanup, caller (given aStatus) is signalled with KErrCancel

CertificateLocated()

TBool CertificateLocated ( ) [private]

Tries to locate certificate by using retrieved KeyId.

Cleanup(TAny *)

void Cleanup ( TAny * aObject ) [private, static]

Handles cleanup for an object which is not derived from CBase

Parameters

TAny * aObject -object to be cleaned up

CleanupRefLst(TAny *)

void CleanupRefLst ( TAny * aObject ) [private, static]

Handles cleanup for an object which is not derived from CBase

Parameters

TAny * aObject -object to be cleaned up

ConstructL()

void ConstructL ( ) [private]

Symbian constructor

DeAllocMemoryForExtraDataRetrieve()

void DeAllocMemoryForExtraDataRetrieve ( ) [private]

DeallocRArrays()

void DeallocRArrays ( ) [private]

DeallocWimCertInfo()

void DeallocWimCertInfo ( ) [private]

Deallocates memory from the array.

DoCancel()

void DoCancel ( ) [private, virtual]

Cancellation function Deallocates member variables and completes client status with KErrCancel error code.

ExtraDataFoundL()

void ExtraDataFoundL ( ) [private]

Fills caller's data area with requested extra data

GetExtras(const TDesC8 &, RCPointerArray< HBufC > &, TCertLocation &, TRequestStatus &)

IMPORT_C void GetExtras ( const TDesC8 & aKeyId,
RCPointerArray < HBufC > & aTrustedUsages,
TCertLocation & aLocation,
TRequestStatus & aStatus
)

Fetches trusted usages and location information for Key ID.

Parameters

const TDesC8 & aKeyId (IN) Key identifier (hash), which points to a certificate.
RCPointerArray < HBufC > & aTrustedUsages (OUT) An array of OID strings indicating trusted usage. The notation is dot delimited (for example 1.23.456.7), the length of O D can vary. (OID=Object IDentifier). Caller is responsible of destroying array.
TCertLocation & aLocation (OUT) Indicates certificate directory location in Smart Card.
TRequestStatus & aStatus Indicates the result of this call. Values: KErrNotFound, given certificate KeyId was not found from card KErrNone, no errors, given certificate was found and trusted usage was present and location were known KErrPathNotFound, trusted usage was not found or location was not known KErrGeneral, any other error KErrNoMemory, No memory

Initialize(TRequestStatus &)

IMPORT_C void Initialize ( TRequestStatus & aStatus )

Initializes the WIM server cache and restores certificates to WimClient memory area. This is the most time consuming call.

Parameters

TRequestStatus & aStatus Indicates the result of this call. Values: KErrNotFound, no certificates was found KErrNone, call was successull and at least one certificate found. KErrGeneral, any other error KErrNoMemory, no memory

NewL()

IMPORT_C CWimCert * NewL ( ) [static]

Two-phased constructor.

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]

The active scheduler calls this function if this active object's RunL() function leaves. Handles necessary cleanup and completes request with received error code.

Parameters

TInt aError -Error code which launched this event.

RunL()

void RunL ( ) [private, virtual]

Different phases are handled here.

SignalOwnStatusAndComplete()

void SignalOwnStatusAndComplete ( ) [private]

Sets own iStatus to KRequestPending, and signals it with User::RequestComplete() request. This gives chance to active scheduler to run other active objects. After a quick visit in actives cheduler, signal returns to RunL() and starts next phase of operation.

Member Enumerations Documentation

Enum TPhase

Different states of this state machine

Enumerators

EConnectClientSession
ECreateNewSession
EInitializeWim
EListCertsFromWim
EGetCertClientSession
ELocateCertificate
EGiveExtraData

Member Data Documentation

PHBufC8 * iCAId

PHBufC8 * iCAId [private]

PTPtr8 * iCAIdPtr

PTPtr8 * iCAIdPtr [private]

TUint8 iCertCount

TUint8 iCertCount [private]

HBufC * iCertHBufTrustedUsageFromServer

HBufC * iCertHBufTrustedUsageFromServer [private]

TPtr * iCertHBufTrustedUsageFromServerPtr

TPtr * iCertHBufTrustedUsageFromServerPtr [private]

TUint8 iCertIndex

TUint8 iCertIndex [private]

RArray< TUint > iCertTypes

RArray < TUint > iCertTypes [private]

RWimMgmt * iClientSession

RWimMgmt * iClientSession [private]

TRequestStatus * iClientStatus

TRequestStatus * iClientStatus [private]

RWimCertMgmt * iConnectionHandle

RWimCertMgmt * iConnectionHandle [private]

PHBufC8 * iIssuerHash

PHBufC8 * iIssuerHash [private]

PTPtr8 * iIssuerHashPtr

PTPtr8 * iIssuerHashPtr [private]

PHBufC8 * iKeyId

PHBufC8 * iKeyId [private]

TPtr8 * iKeyIdPointer

TPtr8 * iKeyIdPointer [private]

PTPtr8 * iKeyIdPtr

PTPtr8 * iKeyIdPtr [private]

HBufC8 * iKeyIdToBeMatched

HBufC8 * iKeyIdToBeMatched [private]

RArray< HBufC8 * > iKeyIds

RArray < HBufC8 * > iKeyIds [private]

PHBufC8 * iLabel

PHBufC8 * iLabel [private]

PTPtr8 * iLabelPtr

PTPtr8 * iLabelPtr [private]

TCertLocation * iLocation

TCertLocation * iLocation [private]

TPhase iPhase

TPhase iPhase [private]

RArray< TUint > iTrustedUsageLengths

RArray < TUint > iTrustedUsageLengths [private]

RCPointerArray< HBufC > * iTrustedUsages

RCPointerArray < HBufC > * iTrustedUsages [private]

RArray< TUint > iUsages

RArray < TUint > iUsages [private]

TInt iWimStartErr

TInt iWimStartErr [private]