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()
voidAddSecurityParamsL(TSIPTransportParams &, CSIPRequest &, TRegistrationId, TTransactionId, TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &)
voidCancelPendingOperations(MSIPSecObserver &)
voidClearCache(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)
voidRemove(CSIPSecResponseHandler &)
TInt RemoveCredentials(const TDesC8 &)
voidResponseFirstPhaseDoneL(CSIPResponse &, TInetAddr &, const TDesC8 &, MSIPSecUser &, TBool)
TBool ResponseReceivedL(TSIPTransportParams &, CSIPResponse &, CSIPRequest &, TRegistrationId, TTransactionId, TInetAddr &, const TDesC8 &, const CUri8 &, const TDesC8 &, MSIPSecUser &, MSIPSecObserver &)
voidSetCredentialsL(TTransactionId, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
voidSetCredentialsL(const MSIPSecUser &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
CDesC8Array *SupportedSecurityMechanismsL()
Private Member Functions
CSIPSec(MTimerManager &, MSIPTransportMgr &, TUint)
voidArrayCleanup(TAny *)
voidConstructL()
voidListMechanismImplementationsL()
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,
TUintaT1
)[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 &)

voidAddSecurityParamsL(TSIPTransportParams &aTransportParams,
CSIPRequest &aRequest,
TRegistrationIdaRegistrationId,
TTransactionIdaTransactionId,
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 & aTransportParamsparams to be used when creating IPSec SAs. If an SA was created on return contains also the updated transport identifier.
CSIPRequest & aRequestSIP request where the security parameters will be added
TRegistrationId aRegistrationIdRegistration ID
TTransactionId aTransactionIdtransaction ID
TInetAddr & aNextHopAddrthe next hop IP address of the request
const TDesC8 & aNextHopthe next hop of the request IP address or a domain name
const CUri8 & aRemoteTargetRemote target of the request
const TDesC8 & aOutboundProxythe outbound proxy of the request IP address or a domain name. Zero-length if not present.
MSIPSecUser & aUserthe user for the possible cache entries

ArrayCleanup(TAny *)

voidArrayCleanup(TAny *aArray)[private, static]

Parameters

TAny * aArray

CancelPendingOperations(MSIPSecObserver &)

voidCancelPendingOperations(MSIPSecObserver &aObserver)

Cancels all the pending asynchronous operations for the given observer.

Parameters

MSIPSecObserver & aObserverobserver waiting for an asynchronous cache update

ClearCache(MSIPSecUser *)

voidClearCache(MSIPSecUser *aUser)

Clears all the cached information for the given user.

Parameters

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

ConstructL()

voidConstructL()[private]

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

TInt IgnoreChallenge(TTransactionIdaTransactionId,
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 aTransactionIdtransaction ID if available, otherwise KEmptyTransactionId
const TDesC8 & aRealma realm for which the challenge was ignored
const MSIPSecUser * aTrustedUserthe trusted user for the ignored challenge

ListMechanismImplementationsL()

voidListMechanismImplementationsL()[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 & aHopthe next hop's FQDN or numeric IP address

NewL(MTimerManager &, MSIPTransportMgr &, TUint)

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

Constructs an object; leaves on failure.

Parameters

MTimerManager & aTimerMgran interface for requesting timer events
MSIPTransportMgr & aTransportMgran interface for allocating and de-allocating transports resources for IPSec.
TUint aT1Duration of T1

NewLC(MTimerManager &, MSIPTransportMgr &, TUint)

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

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

Parameters

MTimerManager & aTimerMgran interface for requesting timer events
MSIPTransportMgr & aTransportMgran interface for allocating and de-allocating transports resources for IPSec.
TUint aT1Duration of T1

Remove(CSIPSecResponseHandler &)

voidRemove(CSIPSecResponseHandler &aResponseHandler)

Parameters

CSIPSecResponseHandler & aResponseHandler

RemoveCredentials(const TDesC8 &)

TInt RemoveCredentials(const TDesC8 &aRealm)

Removes all set credentials for the realm

Parameters

const TDesC8 & aRealmservers's realm

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

voidResponseFirstPhaseDoneL(CSIPResponse &aResponse,
TInetAddr &aNextHopAddr,
const TDesC8 &aNextHop,
MSIPSecUser &aUser,
TBoolaUseSecurityServerHeaders
)

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,
TRegistrationIdaRegistrationId,
TTransactionIdaTransactionId,
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 & aTransportParamsparams to be used when creating IPSec SAs. If an SA was updated on return contains also the updated transport identifier.
CSIPResponse & aResponseSIP response to be processed to update the cache
CSIPRequest & aRequestIN: SIP request related to the aResponse
TRegistrationId aRegistrationIdregistration ID
TTransactionId aTransactionIdtransaction ID
TInetAddr & aNextHopAddrthe next hop of the original request
const TDesC8 & aNextHopthe next hop of the request IP address or a domain name
const CUri8 & aRemoteTargetRemote target of the original request
const TDesC8 & aOutboundProxythe outbound proxy of the original request IP address or a domain name. Zero-length if not present.
MSIPSecUser & aUserthe user for the possible cache entries, Can be used to getting the credentials for the cache. The ownership is NOT transferred.
MSIPSecObserver & aObserverobserver that will be notified when after an asynchronous cache update has been completed.

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

voidSetCredentialsL(TTransactionIdaTransactionId,
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 aTransactionIdtransaction ID if available, otherwise KEmptyTransactionId
const TDesC8 & aRealmthe realm for the credentials
const TDesC8 & aOutboundProxyOutbound proxy
const TDesC8 & aUserNamethe username
const TDesC8 & aPasswordthe password

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

voidSetCredentialsL(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 & aUserSIPSec user
const TDesC8 & aRealmthe realm for the credentials
const TDesC8 & aOutboundProxyOutbound proxy
const TDesC8 & aUserNamethe username
const TDesC8 & aPasswordthe 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]