vpnengine/ikepolparser/src/ikepolparser.cpp
branchRCL_3
changeset 38 9f4e37332ce5
parent 0 33413c0669b9
child 40 473321461bba
equal deleted inserted replaced
32:352850cbed81 38:9f4e37332ce5
     1 /*
     1 /*
     2 * Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   167             *ca_copy = *(aData->iCAList->At(x));
   167             *ca_copy = *(aData->iCAList->At(x));
   168             iCAList->AppendL(ca_copy);
   168             iCAList->AppendL(ca_copy);
   169             CleanupStack::Pop(ca_copy);
   169             CleanupStack::Pop(ca_copy);
   170             }
   170             }
   171         }
   171         }
       
   172         
       
   173     iUseCache = aData->iUseCache;
   172     }
   174     }
   173 
   175 
   174 void CIkeData::Empty()
   176 void CIkeData::Empty()
   175     {
   177     {
   176     TProposalData* prop = iPropList;
   178     TProposalData* prop = iPropList;
   723         else if (token.CompareF(_L("OWN_CERTS:"))==0)   //CompareF ignores case
   725         else if (token.CompareF(_L("OWN_CERTS:"))==0)   //CompareF ignores case
   724             err = ParseOwnCerts(aConf);
   726             err = ParseOwnCerts(aConf);
   725         //PeerCerts List
   727         //PeerCerts List
   726         else if (token.CompareF(_L("PEER_CERTS:"))==0)  //CompareF ignores case
   728         else if (token.CompareF(_L("PEER_CERTS:"))==0)  //CompareF ignores case
   727             err = ParsePeerCerts(aConf);
   729             err = ParsePeerCerts(aConf);
       
   730         else if (token.CompareF(_L("USE_CACHE:"))==0) //CompareF ignores case
       
   731         {
       
   732             aConf->iUseCache = EFalse;          
       
   733             token.Set(NextToken());
       
   734             if (token.CompareF(_L("True"))==0)
       
   735                 aConf->iUseCache = ETrue;
       
   736         }
   728     }
   737     }
   729 	if ( err == KErrNone )
   738 	if ( err == KErrNone )
   730 		errCA=CheckPolicy(aConf);
   739 		errCA=CheckPolicy(aConf);
   731     if (errCA)
   740     if (errCA)
   732     	err=errCA;
   741     	err=errCA;
  1103     else
  1112     else
  1104         line.Append(_L("FALSE\n"));
  1113         line.Append(_L("FALSE\n"));
  1105     err = BufferAppend(aPolBfr, line);
  1114     err = BufferAppend(aPolBfr, line);
  1106     if (err != KErrNone)
  1115     if (err != KErrNone)
  1107         return err;
  1116         return err;
       
  1117         
       
  1118     line.Copy(_L8("USE_CACHE: "));
       
  1119     if (aConf->iUseCache)
       
  1120         line.Append(_L("TRUE\n"));
       
  1121     else
       
  1122         line.Append(_L("FALSE\n"));
       
  1123     err = BufferAppend(aPolBfr, line);
       
  1124     if (err != KErrNone)
       
  1125         return err;
       
  1126 
  1108     if ( aConf->iCRACKLAMUserName )
  1127     if ( aConf->iCRACKLAMUserName )
  1109 	{
  1128 	{
  1110 		line.Copy(_L8("CRACK_LAM_USERNAME: "));
  1129 		line.Copy(_L8("CRACK_LAM_USERNAME: "));
  1111 		line.Append(aConf->iCRACKLAMUserName->GetData());
  1130 		line.Append(aConf->iCRACKLAMUserName->GetData());
  1112 		line.Append(_L8("\n"));
  1131 		line.Append(_L8("\n"));