vpnengine/ikev1lib/src/ikev1negotiation.cpp
branchRCL_3
changeset 23 473321461bba
parent 22 9f4e37332ce5
child 24 e06095241a65
equal deleted inserted replaced
22:9f4e37332ce5 23:473321461bba
   185     delete iICA1;
   185     delete iICA1;
   186     delete iICA2;
   186     delete iICA2;
   187 
   187 
   188     delete iPkiService;     // Trusted CA certificate list
   188     delete iPkiService;     // Trusted CA certificate list
   189 
   189 
   190     delete iSAPayload;
   190     delete[] iSAPayload;
   191     delete iPeerIdentPayload;
   191     delete[] iPeerIdentPayload;
   192     delete iOwnIdentPayload;
   192     delete iOwnIdentPayload;
   193     
   193     
   194     //Keys
   194     //Keys
   195     delete iOwnKeys;        //structure containing the public and private keys
   195     delete iOwnKeys;        //structure containing the public and private keys
   196     delete iOwnPublicKey;   //Public Key
   196     delete iOwnPublicKey;   //Public Key
  8407     InitNegotiationL();
  8407     InitNegotiationL();
  8408     
  8408     
  8409     return KErrNone;
  8409     return KErrNone;
  8410 
  8410 
  8411 }
  8411 }
  8412 
       
  8413 //
  8412 //
  8414 // The implementation for class MIkeDialogComplete virtual function
  8413 // The implementation for class MIkeDialogComplete virtual function
  8415 //
  8414 //
  8416 TInt CIkev1Negotiation::DialogCompleteL(
  8415 TInt CIkev1Negotiation::DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo,
  8417     TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret)
  8416                                             HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain)
  8418 {
  8417 {
  8419 /*---------------------------------------------------------------------------
  8418 /*---------------------------------------------------------------------------
  8420  *  
  8419  *  
  8421  *  A response received from client user (through asynchronous dialog)
  8420  *  A response received from client user (through asynchronous dialog)
  8422  *  This method is introduced as a TUserCallback for CGetIKEPassword dialog
  8421  *  This method is introduced as a TUserCallback for CGetIKEPassword dialog
  8423  *  object is created. When the dialog is completed this callback function
  8422  *  object is created. When the dialog is completed this callback function
  8424  *  is called 
  8423  *  is called 
  8425  *  
  8424  *  
  8426  *-------------------------------------------------------------------------*/
  8425  *-------------------------------------------------------------------------*/
  8427     TUint32 obj_id = 1;
  8426     TUint32 obj_id = 1;
  8428     CAuthDialogInfo* info = (CAuthDialogInfo*)aUserInfo;
  8427      CAuthDialogInfo* info = (CAuthDialogInfo*)aUserInfo;
  8429     DEBUG_LOG1(_L("CIkev1Negotiation::DialogCompleteL(), aUserInfo =  %x"), aUserInfo);
  8428      DEBUG_LOG1(_L("CIkev1Negotiation::DialogCompleteL(), aUserInfo =  %x"), aUserInfo);
  8430              
  8429              
  8431     if ( info )
  8430      if ( info )
  8432     {
  8431      {
  8433         obj_id = info->GetObjId();
  8432         obj_id = info->GetObjId();
  8434         DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id);
  8433         DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id);
  8435         if ( obj_id == DIALOG_INFO_ID )
  8434         if ( obj_id == DIALOG_INFO_ID )
  8436         {
  8435         {
  8437             info->SetUserName(aUsername);
  8436            info->iUsername = aUsername;
  8438             info->SetSecret(aSecret);
  8437            info->iSecret   = aSecret;
  8439             obj_id = info->PluginSession()->AuthDialogCompletedL(info);
  8438            info->iDomain   = aDomain;
       
  8439            obj_id = info->PluginSession()->AuthDialogCompletedL(info);
  8440         }   
  8440         }   
  8441     }
  8441      }
  8442 
  8442 
  8443     return obj_id;
  8443      return obj_id;
  8444 }
  8444     
       
  8445 }
       
  8446 
       
  8447