CSIPSec Class Reference

class CSIPSec : public CBase

Class provides functions for adding security information in SIP requests using different security mechanisms. SIP stack will always request to add the security parameters before sending a SIP request to a remote UA.

SipServer.exe

Inherits from

Public Member Functions
~CSIPSec ()
void AddSecurityParamsL ( TSIPTransportParams &, CSIPRequest &, TRegistrationId , TTransactionId , TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &)
void CancelPendingOperations ( MSIPSecObserver &)
void ClearCache ( MSIPSecUser *)
TInt IgnoreChallenge ( TTransactionId , const TDesC8 &, const MSIPSecUser *)
MSIPSecSecurityMechanism * MechanismByName (const TDesC8 &)
TSIPSecMechanismIter & MechanismIter ()
HBufC8 * NegotiatedSecurityMechanismL (const TDesC8 &)
CSIPSec * NewL ( MTimerManager &, MSIPTransportMgr &, TUint )
CSIPSec * NewLC ( MTimerManager &, MSIPTransportMgr &, TUint )
void Remove ( CSIPSecResponseHandler &)
TInt RemoveCredentials (const TDesC8 &)
void ResponseFirstPhaseDoneL ( CSIPResponse &, TInetAddr &, const TDesC8 &, MSIPSecUser &, TBool )
TBool ResponseReceivedL ( TSIPTransportParams &, CSIPResponse &, CSIPRequest &, TRegistrationId , TTransactionId , TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &, MSIPSecObserver &)
void SetCredentialsL ( TTransactionId , const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
void SetCredentialsL (const MSIPSecUser &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
CDesC8Array * SupportedSecurityMechanismsL ()
Private Member Functions
CSIPSec ( MTimerManager &, MSIPTransportMgr &, TUint )
void ArrayCleanup ( TAny *)
void ConstructL ()
void ListMechanismImplementationsL ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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 Attributes
CSIPSecAgreementContainer * iAgreementContainer
CSIPSecEngineContext * iEngineContext
TSIPSecMechanismIter iMechanismIter
RPointerArray < MSIPSecSecurityMechanism > iMechanisms
RPointerArray < CSIPSecResponseHandler > iResponseHandlers
TUint iT1
MTimerManager & iTimerMgr
MSIPTransportMgr & iTransportMgr

Constructor & Destructor Documentation

CSIPSec(MTimerManager &, MSIPTransportMgr &, TUint)

CSIPSec ( MTimerManager & aTimerMgr,
MSIPTransportMgr & aTransportMgr,
TUint aT1
) [private]

Parameters

MTimerManager & aTimerMgr
MSIPTransportMgr & aTransportMgr
TUint aT1

~CSIPSec()

~CSIPSec ( )

Destructor

Member Functions Documentation

AddSecurityParamsL(TSIPTransportParams &, CSIPRequest &, TRegistrationId, TTransactionId, TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &)

void AddSecurityParamsL ( TSIPTransportParams & aTransportParams,
CSIPRequest & aRequest,
TRegistrationId aRegistrationId,
TTransactionId aTransactionId,
TInetAddr & aNextHopAddr,
const TDesC8 & aNextHop,
const CUri8 & aRemoteTarget,
const TDesC8 & aOutboundProxy,
MSIPSecUser & aUser
)

Adds the cached security parameters to the SIP request. If no cache entries are found returns without any error.

Parameters

TSIPTransportParams & aTransportParams params to be used when creating IPSec SAs. If an SA was created on return contains also the updated transport identifier.
CSIPRequest & aRequest SIP request where the security parameters will be added
TRegistrationId aRegistrationId Registration ID
TTransactionId aTransactionId transaction ID
TInetAddr & aNextHopAddr the next hop IP address of the request
const TDesC8 & aNextHop the next hop of the request IP address or a domain name
const CUri8 & aRemoteTarget Remote target of the request
const TDesC8 & aOutboundProxy the outbound proxy of the request IP address or a domain name. Zero-length if not present.
MSIPSecUser & aUser the user for the possible cache entries

ArrayCleanup(TAny *)

void ArrayCleanup ( TAny * aArray ) [private, static]

Parameters

TAny * aArray

CancelPendingOperations(MSIPSecObserver &)

void CancelPendingOperations ( MSIPSecObserver & aObserver )

Cancels all the pending asynchronous operations for the given observer.

Parameters

MSIPSecObserver & aObserver observer waiting for an asynchronous cache update

ClearCache(MSIPSecUser *)

void ClearCache ( MSIPSecUser * aUser )

Clears all the cached information for the given user.

Parameters

MSIPSecUser * aUser the user for the cache entries The ownership is NOT transferred.

ConstructL()

void ConstructL ( ) [private]

IgnoreChallenge(TTransactionId, const TDesC8 &, const MSIPSecUser *)

TInt IgnoreChallenge ( TTransactionId aTransactionId,
const TDesC8 & aRealm,
const MSIPSecUser * aTrustedUser
)

Ignores the challenge for the realm. As a result the error will be generated to the original request in case.

Parameters

TTransactionId aTransactionId transaction ID if available, otherwise KEmptyTransactionId
const TDesC8 & aRealm a realm for which the challenge was ignored
const MSIPSecUser * aTrustedUser the trusted user for the ignored challenge

ListMechanismImplementationsL()

void ListMechanismImplementationsL ( ) [private]

MechanismByName(const TDesC8 &)

MSIPSecSecurityMechanism * MechanismByName ( const TDesC8 & aMechanismName )

Parameters

const TDesC8 & aMechanismName

MechanismIter()

TSIPSecMechanismIter & MechanismIter ( )

NegotiatedSecurityMechanismL(const TDesC8 &)

HBufC8 * NegotiatedSecurityMechanismL ( const TDesC8 & aHop )

Gets the negotiated security mechanism with the next hop on the signaling path.

Parameters

const TDesC8 & aHop the next hop's FQDN or numeric IP address

NewL(MTimerManager &, MSIPTransportMgr &, TUint)

CSIPSec * NewL ( MTimerManager & aTimerMgr,
MSIPTransportMgr & aTransportMgr,
TUint aT1
) [static]

Constructs an object; leaves on failure.

Parameters

MTimerManager & aTimerMgr an interface for requesting timer events
MSIPTransportMgr & aTransportMgr an interface for allocating and de-allocating transports resources for IPSec.
TUint aT1 Duration of T1

NewLC(MTimerManager &, MSIPTransportMgr &, TUint)

CSIPSec * NewLC ( MTimerManager & aTimerMgr,
MSIPTransportMgr & aTransportMgr,
TUint aT1
) [static]

Constructs an object and adds the pointer to the cleanup stack; leaves on failure.

Parameters

MTimerManager & aTimerMgr an interface for requesting timer events
MSIPTransportMgr & aTransportMgr an interface for allocating and de-allocating transports resources for IPSec.
TUint aT1 Duration of T1

Remove(CSIPSecResponseHandler &)

void Remove ( CSIPSecResponseHandler & aResponseHandler )

Parameters

CSIPSecResponseHandler & aResponseHandler

RemoveCredentials(const TDesC8 &)

TInt RemoveCredentials ( const TDesC8 & aRealm )

Removes all set credentials for the realm

Parameters

const TDesC8 & aRealm servers's realm

ResponseFirstPhaseDoneL(CSIPResponse &, TInetAddr &, const TDesC8 &, MSIPSecUser &, TBool)

void ResponseFirstPhaseDoneL ( CSIPResponse & aResponse,
TInetAddr & aNextHopAddr,
const TDesC8 & aNextHop,
MSIPSecUser & aUser,
TBool aUseSecurityServerHeaders
)

Parameters

CSIPResponse & aResponse
TInetAddr & aNextHopAddr
const TDesC8 & aNextHop
MSIPSecUser & aUser
TBool aUseSecurityServerHeaders

ResponseReceivedL(TSIPTransportParams &, CSIPResponse &, CSIPRequest &, TRegistrationId, TTransactionId, TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &, MSIPSecObserver &)

TBool ResponseReceivedL ( TSIPTransportParams & aTransportParams,
CSIPResponse & aResponse,
CSIPRequest & aRequest,
TRegistrationId aRegistrationId,
TTransactionId aTransactionId,
TInetAddr & aNextHopAddr,
const TDesC8 & aNextHop,
const CUri8 & aRemoteTarget,
const TDesC8 & aOutboundProxy,
MSIPSecUser & aUser,
MSIPSecObserver & aObserver
)

Updates the SIPSec cache if necessary. If nothing was updated returns without any error. May lead to asynchronous processing. If so, returns ETrue and the user must wait for the cache to be updated before sending the SIP request again.

Parameters

TSIPTransportParams & aTransportParams params to be used when creating IPSec SAs. If an SA was updated on return contains also the updated transport identifier.
CSIPResponse & aResponse SIP response to be processed to update the cache
CSIPRequest & aRequest IN: SIP request related to the aResponse
TRegistrationId aRegistrationId registration ID
TTransactionId aTransactionId transaction ID
TInetAddr & aNextHopAddr the next hop of the original request
const TDesC8 & aNextHop the next hop of the request IP address or a domain name
const CUri8 & aRemoteTarget Remote target of the original request
const TDesC8 & aOutboundProxy the outbound proxy of the original request IP address or a domain name. Zero-length if not present.
MSIPSecUser & aUser the user for the possible cache entries, Can be used to getting the credentials for the cache. The ownership is NOT transferred.
MSIPSecObserver & aObserver observer that will be notified when after an asynchronous cache update has been completed.

SetCredentialsL(TTransactionId, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

void SetCredentialsL ( TTransactionId aTransactionId,
const TDesC8 & aRealm,
const TDesC8 & aOutboundProxy,
const TDesC8 & aUserName,
const TDesC8 & aPassword
)

Will be called as a result to asynchronous call to MSIPSecUser::RequestCredentialsL .

Parameters

TTransactionId aTransactionId transaction ID if available, otherwise KEmptyTransactionId
const TDesC8 & aRealm the realm for the credentials
const TDesC8 & aOutboundProxy Outbound proxy
const TDesC8 & aUserName the username
const TDesC8 & aPassword the password

SetCredentialsL(const MSIPSecUser &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

void SetCredentialsL ( const MSIPSecUser & aUser,
const TDesC8 & aRealm,
const TDesC8 & aOutboundProxy,
const TDesC8 & aUserName,
const TDesC8 & aPassword
)

Will be called as a result to asynchronous call to MSIPSecUser::RequestCredentialsL .

Parameters

const MSIPSecUser & aUser SIPSec user
const TDesC8 & aRealm the realm for the credentials
const TDesC8 & aOutboundProxy Outbound proxy
const TDesC8 & aUserName the username
const TDesC8 & aPassword the password

SupportedSecurityMechanismsL()

CDesC8Array * SupportedSecurityMechanismsL ( )

Gets all supported security mechanisms

Member Data Documentation

CSIPSecAgreementContainer * iAgreementContainer

CSIPSecAgreementContainer * iAgreementContainer [private]

CSIPSecEngineContext * iEngineContext

CSIPSecEngineContext * iEngineContext [private]

TSIPSecMechanismIter iMechanismIter

TSIPSecMechanismIter iMechanismIter [private]

RPointerArray< MSIPSecSecurityMechanism > iMechanisms

RPointerArray < MSIPSecSecurityMechanism > iMechanisms [private]

RPointerArray< CSIPSecResponseHandler > iResponseHandlers

RPointerArray < CSIPSecResponseHandler > iResponseHandlers [private]

TUint iT1

TUint iT1 [private]

MTimerManager & iTimerMgr

MTimerManager & iTimerMgr [private]

MSIPTransportMgr & iTransportMgr

MSIPTransportMgr & iTransportMgr [private]