CTlsProviderImpl Class Reference

class CTlsProviderImpl : public CActive

Inherits from

Public Member Functions
CTlsProviderImpl ()
~CTlsProviderImpl ()
CTlsCryptoAttributes * Attributes ()
void CancelRequest ()
void CipherSuitesL ( RArray < TTLSCipherSuite > &, TRequestStatus &)
void ClearSessionCacheL ( TTLSSessionNameAndID &, TRequestStatus &)
CTlsProviderImpl * ConnectL ()
void CreateL ( CTLSSession *&, TRequestStatus &)
void GenerateRandom ( TDes8 &)
void GetSessionL ( TTLSServerAddr &, TTLSSessionId &, TRequestStatus &)
MCTToken * GetTokenHandle ()
CTlsSessionImpl * TlsSessionPtr ()
void VerifyServerCertificate (const TDesC8 &, CX509Certificate *&, TRequestStatus &)
TBool VerifySignatureL (const CSubjectPublicKeyInfo &, const TDesC8 &, const TDesC8 &)
Private Member Functions
TBool CheckExtendedKeyUsageL (const CX509Certificate &)
void ConstructL ()
void DoCancel ()
HBufC * ExtractCertFieldL (const TDesC &, const CX500DistinguishedName &)
void GetAvailableKeyListL ()
void GetX509CertL ( HBufC8 *&, CX509Certificate *&)
void HandleBadCertificateL (const TValidationStatus )
TBool IsCipherAvailable (const TTLSCipherSuiteMapping &)
TBool NameIsInSubtree ( CX509DNSName &, CX509DNSName &, TBool )
void NextOrEnd ()
void OnEBrowseTokens ()
void OnEGetSession ()
void OnEGetSessionInterfaceL ()
void OnEStartSession ()
void OnEUserDialogL ()
void OnQueryCacheL ()
void RetrieveSession ()
void ReturnCipherListL ()
void ReturnResult ()
void ReturnSession ()
TInt RunError ( TInt )
void RunL ()
TBool SelectToken ()
void ShowUntrustedDialogL (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
enum TStateLists {
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()

void CancelRequest ( )

CheckExtendedKeyUsageL(const CX509Certificate &)

TBool CheckExtendedKeyUsageL ( const CX509Certificate & aSource ) [private]

Parameters

const CX509Certificate & aSource

CipherSuitesL(RArray< TTLSCipherSuite > &, TRequestStatus &)

void CipherSuitesL ( RArray < TTLSCipherSuite > & aUserCipherSuiteList,
TRequestStatus & aStatus
)

Parameters

RArray < TTLSCipherSuite > & aUserCipherSuiteList
TRequestStatus & aStatus

ClearSessionCacheL(TTLSSessionNameAndID &, TRequestStatus &)

void ClearSessionCacheL ( TTLSSessionNameAndID & aServerNameAndId,
TRequestStatus & aStatus
)

Parameters

TTLSSessionNameAndID & aServerNameAndId
TRequestStatus & aStatus

ConnectL()

CTlsProviderImpl * ConnectL ( ) [static]

This method creates a new CTlsProviderImpl object

ConstructL()

void ConstructL ( ) [private]

CreateL(CTLSSession *&, TRequestStatus &)

void CreateL ( CTLSSession *& aTlsSession,
TRequestStatus & aStatus
)

Parameters

CTLSSession *& aTlsSession
TRequestStatus & aStatus

DoCancel()

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

void GenerateRandom ( TDes8 & aBuffer )

Parameters

TDes8 & aBuffer

GetAvailableKeyListL()

void GetAvailableKeyListL ( ) [private]

GetSessionL(TTLSServerAddr &, TTLSSessionId &, TRequestStatus &)

void GetSessionL ( TTLSServerAddr & aServerName,
TTLSSessionId & aSessionId,
TRequestStatus & aStatus
)

Parameters

TTLSServerAddr & aServerName
TTLSSessionId & aSessionId
TRequestStatus & aStatus

GetTokenHandle()

MCTToken * GetTokenHandle ( )

GetX509CertL(HBufC8 *&, CX509Certificate *&)

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

Parameters

HBufC8 *& aEncodedCert
CX509Certificate *& aOutputX509

HandleBadCertificateL(const TValidationStatus)

void HandleBadCertificateL ( const TValidationStatus aResult ) [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,
TBool aIsWildcard
) [private]

Parameters

CX509DNSName & aServerName
CX509DNSName & aCertName
TBool aIsWildcard

NextOrEnd()

void NextOrEnd ( ) [private]

OnEBrowseTokens()

void OnEBrowseTokens ( ) [private]

OnEGetSession()

void OnEGetSession ( ) [private]

OnEGetSessionInterfaceL()

void OnEGetSessionInterfaceL ( ) [private]

OnEStartSession()

void OnEStartSession ( ) [private]

OnEUserDialogL()

void OnEUserDialogL ( ) [private]

OnQueryCacheL()

void OnQueryCacheL ( ) [private]

RetrieveSession()

void RetrieveSession ( ) [private]

ReturnCipherListL()

void ReturnCipherListL ( ) [private]

ReturnResult()

void ReturnResult ( ) [private]

ReturnSession()

void ReturnSession ( ) [private]

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]

Parameters

TInt aError

RunL()

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

void ShowUntrustedDialogL ( const TValidationStatus aResult ) [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 &)

void VerifyServerCertificate ( 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]