CTlsProviderImpl Class Reference

class CTlsProviderImpl : public CActive

Inherits from

Public Member Functions
CTlsProviderImpl()
~CTlsProviderImpl()
CTlsCryptoAttributes *Attributes()
voidCancelRequest()
voidCipherSuitesL(RArray< TTLSCipherSuite > &, TRequestStatus &)
voidClearSessionCacheL(TTLSSessionNameAndID &, TRequestStatus &)
CTlsProviderImpl *ConnectL()
voidCreateL(CTLSSession *&, TRequestStatus &)
voidGenerateRandom(TDes8 &)
voidGetSessionL(TTLSServerAddr &, TTLSSessionId &, TRequestStatus &)
MCTToken *GetTokenHandle()
CTlsSessionImpl *TlsSessionPtr()
voidVerifyServerCertificate(const TDesC8 &, CX509Certificate *&, TRequestStatus &)
TBool VerifySignatureL(const CSubjectPublicKeyInfo &, const TDesC8 &, const TDesC8 &)
Private Member Functions
TBool CheckExtendedKeyUsageL(const CX509Certificate &)
voidConstructL()
voidDoCancel()
HBufC *ExtractCertFieldL(const TDesC &, const CX500DistinguishedName &)
voidGetAvailableKeyListL()
voidGetX509CertL(HBufC8 *&, CX509Certificate *&)
voidHandleBadCertificateL(const TValidationStatus)
TBool IsCipherAvailable(const TTLSCipherSuiteMapping &)
TBool NameIsInSubtree(CX509DNSName &, CX509DNSName &, TBool)
voidNextOrEnd()
voidOnEBrowseTokens()
voidOnEGetSession()
voidOnEGetSessionInterfaceL()
voidOnEStartSession()
voidOnEUserDialogL()
voidOnQueryCacheL()
voidRetrieveSession()
voidReturnCipherListL()
voidReturnResult()
voidReturnSession()
TInt RunError(TInt)
voidRunL()
TBool SelectToken()
voidShowUntrustedDialogL(const TValidationStatus)
TBool ValidateDNSNameL(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
enumTStateLists {
ENullState, ECreate, EGetCiphers, EValidateCertificate, EClearSessionCache, EOpenToken, EGetSession, EGetSessionInterface, EStartSession, EGetKeyAndSignExAlgrthm, EConstructResumed, EConstruct, EClientAuthenticate, EBrowseTokens, EQueryCache, EUserDialog, ENextOrEnd
}
Inherited Enumerations
CActive:TPriority
Private Attributes
TBool iAbbreviatedHandshake
RTlsCacheClient iCacheClient
CPKIXValidationResult *iCertVerificationResult
CTlsClntAuthenticate *iClntAuthenticate
TStateLists iCurrentState
TInt iCurrentToken
TInt iCurrentTokentype
HBufC8 *iEncodedServerCerts
RFs iFs
RArray< CTokenTypesAndTokens >iListAllTokensAndTypes
TStateLists iNextState
TRequestStatus *iOriginalRequestStatus
TStateLists iOriginalState
TTLSSessionData iOutputSessionData
TTLSServerAddr *iPServerName
TTLSSessionId *iPSessionId
CTlsBrowseToken *iPtrTokenSearch
RArray< TTLSProtocolVersion >iReqProtList
MSecurityDialog *iSecurityDialog
CCTCertInfo *iSelectedCertInfo
CCTKeyInfo *iSelectedKeyInfo
TInt iSelectedTypeIndex
CPKIXCertChain *iServerCertsChain
TTLSSessionNameAndID iServerNameAndId
TSessiondata iSessionData
MTLSSession *iSessionInterface
RPointerArray< CCertificate >iStoredIntermediatesCACertificates
RArray< TTLSCipherSuite >iSupportedCipherSuiteList
CTlsCryptoAttributes *iTlsCryptoAttributes
CTlsProviderPolicy *iTlsProviderPolicy
CTLSSession **iTlsSessionHldr
CTlsSessionImpl *iTlsSessionImpl
TBool iTlsSessionOwnershipPassedToCaller
TInt iTotalTokenTypeCount
RArray< TTLSCipherSuite > *iUserCipherSuiteList
TValidationStatus iValidationStatus
CX509Certificate **iX509ServerCert
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CTlsProviderImpl()

CTlsProviderImpl()

~CTlsProviderImpl()

~CTlsProviderImpl()

Member Functions Documentation

Attributes()

CTlsCryptoAttributes *Attributes()

CancelRequest()

voidCancelRequest()

CheckExtendedKeyUsageL(const CX509Certificate &)

TBool CheckExtendedKeyUsageL(const CX509Certificate &aSource)[private]

Parameters

const CX509Certificate & aSource

CipherSuitesL(RArray< TTLSCipherSuite > &, TRequestStatus &)

voidCipherSuitesL(RArray< TTLSCipherSuite > &aUserCipherSuiteList,
TRequestStatus &aStatus
)

Parameters

RArray< TTLSCipherSuite > & aUserCipherSuiteList
TRequestStatus & aStatus

ClearSessionCacheL(TTLSSessionNameAndID &, TRequestStatus &)

voidClearSessionCacheL(TTLSSessionNameAndID &aServerNameAndId,
TRequestStatus &aStatus
)

Parameters

TTLSSessionNameAndID & aServerNameAndId
TRequestStatus & aStatus

ConnectL()

CTlsProviderImpl *ConnectL()[static]

This method creates a new CTlsProviderImpl object

ConstructL()

voidConstructL()[private]

CreateL(CTLSSession *&, TRequestStatus &)

voidCreateL(CTLSSession *&aTlsSession,
TRequestStatus &aStatus
)

Parameters

CTLSSession *& aTlsSession
TRequestStatus & aStatus

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

ExtractCertFieldL(const TDesC &, const CX500DistinguishedName &)

HBufC *ExtractCertFieldL(const TDesC &aFieldName,
const CX500DistinguishedName &aDistinguishedName
)[private]

Parameters

const TDesC & aFieldName
const CX500DistinguishedName & aDistinguishedName

GenerateRandom(TDes8 &)

voidGenerateRandom(TDes8 &aBuffer)

Parameters

TDes8 & aBuffer

GetAvailableKeyListL()

voidGetAvailableKeyListL()[private]

GetSessionL(TTLSServerAddr &, TTLSSessionId &, TRequestStatus &)

voidGetSessionL(TTLSServerAddr &aServerName,
TTLSSessionId &aSessionId,
TRequestStatus &aStatus
)

Parameters

TTLSServerAddr & aServerName
TTLSSessionId & aSessionId
TRequestStatus & aStatus

GetTokenHandle()

MCTToken *GetTokenHandle()

GetX509CertL(HBufC8 *&, CX509Certificate *&)

voidGetX509CertL(HBufC8 *&aEncodedCert,
CX509Certificate *&aOutputX509
)[private]

Parameters

HBufC8 *& aEncodedCert
CX509Certificate *& aOutputX509

HandleBadCertificateL(const TValidationStatus)

voidHandleBadCertificateL(const TValidationStatusaResult)[private]

Parameters

const TValidationStatus aResult

IsCipherAvailable(const TTLSCipherSuiteMapping &)

TBool IsCipherAvailable(const TTLSCipherSuiteMapping &aCipherSuiteMapping)const [private]

Parameters

const TTLSCipherSuiteMapping & aCipherSuiteMapping

NameIsInSubtree(CX509DNSName &, CX509DNSName &, TBool)

TBool NameIsInSubtree(CX509DNSName &aServerName,
CX509DNSName &aCertName,
TBoolaIsWildcard
)[private]

Parameters

CX509DNSName & aServerName
CX509DNSName & aCertName
TBool aIsWildcard

NextOrEnd()

voidNextOrEnd()[private]

OnEBrowseTokens()

voidOnEBrowseTokens()[private]

OnEGetSession()

voidOnEGetSession()[private]

OnEGetSessionInterfaceL()

voidOnEGetSessionInterfaceL()[private]

OnEStartSession()

voidOnEStartSession()[private]

OnEUserDialogL()

voidOnEUserDialogL()[private]

OnQueryCacheL()

voidOnQueryCacheL()[private]

RetrieveSession()

voidRetrieveSession()[private]

ReturnCipherListL()

voidReturnCipherListL()[private]

ReturnResult()

voidReturnResult()[private]

ReturnSession()

voidReturnSession()[private]

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

SelectToken()

TBool SelectToken()[private]

ShowUntrustedDialogL(const TValidationStatus)

voidShowUntrustedDialogL(const TValidationStatusaResult)[private]

Parameters

const TValidationStatus aResult

TlsSessionPtr()

CTlsSessionImpl *TlsSessionPtr()

ValidateDNSNameL(const CX509Certificate &)

TBool ValidateDNSNameL(const CX509Certificate &aSource)[private]

Parameters

const CX509Certificate & aSource

VerifyServerCertificate(const TDesC8 &, CX509Certificate *&, TRequestStatus &)

voidVerifyServerCertificate(const TDesC8 &aEncodedServerCerts,
CX509Certificate *&aServerCert,
TRequestStatus &aStatus
)

Parameters

const TDesC8 & aEncodedServerCerts
CX509Certificate *& aServerCert
TRequestStatus & aStatus

VerifySignatureL(const CSubjectPublicKeyInfo &, const TDesC8 &, const TDesC8 &)

TBool VerifySignatureL(const CSubjectPublicKeyInfo &aServerPublicKey,
const TDesC8 &aDigest,
const TDesC8 &aSig
)

Parameters

const CSubjectPublicKeyInfo & aServerPublicKey
const TDesC8 & aDigest
const TDesC8 & aSig

Member Enumerations Documentation

Enum TStateLists

Enumerators

ENullState
ECreate
EGetCiphers
EValidateCertificate
EClearSessionCache
EOpenToken
EGetSession
EGetSessionInterface
EStartSession
EGetKeyAndSignExAlgrthm
EConstructResumed
EConstruct
EClientAuthenticate
EBrowseTokens
EQueryCache
EUserDialog
ENextOrEnd

Member Data Documentation

TBool iAbbreviatedHandshake

TBool iAbbreviatedHandshake[private]

RTlsCacheClient iCacheClient

RTlsCacheClient iCacheClient[private]

CPKIXValidationResult * iCertVerificationResult

CPKIXValidationResult *iCertVerificationResult[private]

CTlsClntAuthenticate * iClntAuthenticate

CTlsClntAuthenticate *iClntAuthenticate[private]

TStateLists iCurrentState

TStateLists iCurrentState[private]

TInt iCurrentToken

TInt iCurrentToken[private]

TInt iCurrentTokentype

TInt iCurrentTokentype[private]

HBufC8 * iEncodedServerCerts

HBufC8 *iEncodedServerCerts[private]

RFs iFs

RFs iFs[private]

RArray< CTokenTypesAndTokens > iListAllTokensAndTypes

RArray< CTokenTypesAndTokens >iListAllTokensAndTypes[private]

TStateLists iNextState

TStateLists iNextState[private]

TRequestStatus * iOriginalRequestStatus

TRequestStatus *iOriginalRequestStatus[private]

TStateLists iOriginalState

TStateLists iOriginalState[private]

TTLSSessionData iOutputSessionData

TTLSSessionData iOutputSessionData[private]

TTLSServerAddr * iPServerName

TTLSServerAddr *iPServerName[private]

TTLSSessionId * iPSessionId

TTLSSessionId *iPSessionId[private]

CTlsBrowseToken * iPtrTokenSearch

CTlsBrowseToken *iPtrTokenSearch[private]

RArray< TTLSProtocolVersion > iReqProtList

RArray< TTLSProtocolVersion >iReqProtList[private]

MSecurityDialog * iSecurityDialog

MSecurityDialog *iSecurityDialog[private]

CCTCertInfo * iSelectedCertInfo

CCTCertInfo *iSelectedCertInfo[private]

CCTKeyInfo * iSelectedKeyInfo

CCTKeyInfo *iSelectedKeyInfo[private]

TInt iSelectedTypeIndex

TInt iSelectedTypeIndex[private]

CPKIXCertChain * iServerCertsChain

CPKIXCertChain *iServerCertsChain[private]

TTLSSessionNameAndID iServerNameAndId

TTLSSessionNameAndID iServerNameAndId[private]

TSessiondata iSessionData

TSessiondata iSessionData[private]

MTLSSession * iSessionInterface

MTLSSession *iSessionInterface[private]

RPointerArray< CCertificate > iStoredIntermediatesCACertificates

RPointerArray< CCertificate >iStoredIntermediatesCACertificates[private]

RArray< TTLSCipherSuite > iSupportedCipherSuiteList

RArray< TTLSCipherSuite >iSupportedCipherSuiteList[private]

CTlsCryptoAttributes * iTlsCryptoAttributes

CTlsCryptoAttributes *iTlsCryptoAttributes[private]

CTlsProviderPolicy * iTlsProviderPolicy

CTlsProviderPolicy *iTlsProviderPolicy[private]

CTLSSession ** iTlsSessionHldr

CTLSSession **iTlsSessionHldr[private]

CTlsSessionImpl * iTlsSessionImpl

CTlsSessionImpl *iTlsSessionImpl[private]

TBool iTlsSessionOwnershipPassedToCaller

TBool iTlsSessionOwnershipPassedToCaller[private]

TInt iTotalTokenTypeCount

TInt iTotalTokenTypeCount[private]

RArray< TTLSCipherSuite > * iUserCipherSuiteList

RArray< TTLSCipherSuite > *iUserCipherSuiteList[private]

TValidationStatus iValidationStatus

TValidationStatus iValidationStatus[private]

CX509Certificate ** iX509ServerCert

CX509Certificate **iX509ServerCert[private]