vpnengine/ikev1lib/src/ikev1crack.cpp
branchRCL_3
changeset 23 473321461bba
parent 22 9f4e37332ce5
child 24 e06095241a65
equal deleted inserted replaced
22:9f4e37332ce5 23:473321461bba
    22 #include "ikev1timeout.h"
    22 #include "ikev1timeout.h"
    23 #include "ikev1negotiation.h"
    23 #include "ikev1negotiation.h"
    24 #include "ikev1payload.h"
    24 #include "ikev1payload.h"
    25 #include "ikev1isakmpstream.h"
    25 #include "ikev1isakmpstream.h"
    26 #include "ikepolparser.h"
    26 #include "ikepolparser.h"
    27 
       
    28 
       
    29 CAuthDialogInfo::~CAuthDialogInfo()
       
    30 {
       
    31     delete iUsername;
       
    32     delete iSecret;
       
    33 }
       
    34 
       
    35 
       
    36 void CAuthDialogInfo::SetUserName( HBufC8* aUserName )
       
    37 {
       
    38     delete iUsername;
       
    39     iUsername = aUserName;
       
    40 }
       
    41 
       
    42 
       
    43 void CAuthDialogInfo::SetSecret( HBufC8* aSecret )
       
    44 {
       
    45     delete iSecret;
       
    46     iSecret = aSecret;
       
    47 }
       
    48 
    27 
    49 
    28 
    50 //
    29 //
    51 // Class that implements IKE CRACK authentication method
    30 // Class that implements IKE CRACK authentication method
    52 //
    31 //
   537 }
   516 }
   538 
   517 
   539 //
   518 //
   540 // The implementation for class MIkeDialogComplete virtual function
   519 // The implementation for class MIkeDialogComplete virtual function
   541 //
   520 //
   542 TInt CIKECRACKNegotiation::DialogCompleteL(
   521 TInt CIKECRACKNegotiation::DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo,
   543     TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret)
   522                                             HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain)
   544 {
   523 {
   545 /*---------------------------------------------------------------------------
   524 /*---------------------------------------------------------------------------
   546  *  
   525  *  
   547  *  A response received from client user (through asynchronous dialog)
   526  *  A response received from client user (through asynchronous dialog)
   548  *  This method is introduced as a TUserCallback for CGetIKEPassword dialog
   527  *  This method is introduced as a TUserCallback for CGetIKEPassword dialog
   560 	{
   539 	{
   561        obj_id = info->GetObjId();
   540        obj_id = info->GetObjId();
   562 	   DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id);
   541 	   DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id);
   563        if ( obj_id == DIALOG_INFO_ID )
   542        if ( obj_id == DIALOG_INFO_ID )
   564 	   {
   543 	   {
   565           info->SetUserName( aUsername );
   544           info->iUsername = aUsername;
   566           info->SetSecret( aSecret );
   545           info->iSecret   = aSecret;
       
   546           info->iDomain   = aDomain;
   567           obj_id = info->PluginSession()->AuthDialogCompletedL(info);
   547           obj_id = info->PluginSession()->AuthDialogCompletedL(info);
   568        }
   548        }   
   569     }
   549     }
   570 
   550 
   571     return obj_id;
   551     return obj_id;
   572 }
   552 }
       
   553 
       
   554