realtimenetprots/sipfw/SIP/SIPSec/DigestPlugin/src/CSIPSecChallengeAKA.cpp
branchRCL_3
changeset 16 43c4dec3cb1f
parent 0 307788aac0a8
equal deleted inserted replaced
14:532ef74cdfa0 16:43c4dec3cb1f
    24 #include "CSIPSecSIMRecord.h"
    24 #include "CSIPSecSIMRecord.h"
    25 #include "CSIPSecDigestPlugin.h"
    25 #include "CSIPSecDigestPlugin.h"
    26 #include "sipsecdigestcontext.h"
    26 #include "sipsecdigestcontext.h"
    27 #include "sipstrings.h"
    27 #include "sipstrings.h"
    28 #include "sipstrconsts.h"
    28 #include "sipstrconsts.h"
    29 #include <imcvcodc.h>
    29 #include <tconvbase64.h>
    30 
    30 
    31 // ============================ MEMBER FUNCTIONS ===============================
    31 // ============================ MEMBER FUNCTIONS ===============================
    32 
    32 
    33 
    33 
    34 // -----------------------------------------------------------------------------
    34 // -----------------------------------------------------------------------------
   130             {
   130             {
   131             const TInt KBase64EncodedAutsLength = 20;
   131             const TInt KBase64EncodedAutsLength = 20;
   132 			HBufC8* auts = HBufC8::NewLC( KBase64EncodedAutsLength );
   132 			HBufC8* auts = HBufC8::NewLC( KBase64EncodedAutsLength );
   133 			TPtr8 autsPtr( auts->Des() );
   133 			TPtr8 autsPtr( auts->Des() );
   134 
   134 
   135 		    TImCodecB64 encoder;
   135 			TBase64 encoder;
   136 		    User::LeaveIfError( encoder.Encode( userData.AUTS(), autsPtr ) );
   136 			User::LeaveIfError( encoder.Encode( userData.AUTS(), autsPtr ) );
   137             aContext.SetParamValueL( SipStrConsts::EAuts, *auts );
   137             aContext.SetParamValueL( SipStrConsts::EAuts, *auts );
   138 
   138 
   139             CleanupStack::PopAndDestroy( auts );
   139             CleanupStack::PopAndDestroy( auts );
   140             }
   140             }
   141         if ( userData.SecretData().Length() == 0 )
   141         if ( userData.SecretData().Length() == 0 )