1 /* |
1 /* |
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-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". |
248 // if (iTransformNum != aAttr.iTransformNum) //Transform number |
248 // if (iTransformNum != aAttr.iTransformNum) //Transform number |
249 // return KErrTransformNum; // Test retired |
249 // return KErrTransformNum; // Test retired |
250 if ( iTransformID != aAttr.iTransformID ) //Transform ID |
250 if ( iTransformID != aAttr.iTransformID ) //Transform ID |
251 return KErrTransformID; |
251 return KErrTransformID; |
252 |
252 |
253 if ((iGroupDesc != aAttr.iGroupDesc) && |
253 if ((aAttr.iGroupDesc < iGroupDesc) && |
254 (!(iGroupDesc == 0) && (aAttr.iGroupDesc == MODP_768))) //OAKLEY GROUP |
254 (!(iGroupDesc == 0))) |
255 return KErrGroupDesc; |
255 return KErrGroupDesc; |
256 if (iEncMode != aAttr.iEncMode) //Encapsulation Mode |
256 if (iEncMode != aAttr.iEncMode) //Encapsulation Mode |
257 return KErrEncMode; |
257 return KErrEncMode; |
258 if (iAuthAlg != aAttr.iAuthAlg) //HMAC |
258 if (iAuthAlg != aAttr.iAuthAlg) //HMAC |
259 return KErrAuthAlg; |
259 return KErrAuthAlg; |
289 { |
289 { |
290 if (iLifeDurationSecs.Compare(aAttr.iLifeDurationSecs)!=0) |
290 if (iLifeDurationSecs.Compare(aAttr.iLifeDurationSecs)!=0) |
291 return KErrLifeTime; |
291 return KErrLifeTime; |
292 if (iLifeDurationKBytes.Compare(aAttr.iLifeDurationKBytes)!=0) |
292 if (iLifeDurationKBytes.Compare(aAttr.iLifeDurationKBytes)!=0) |
293 return KErrLifeSize; |
293 return KErrLifeSize; |
|
294 if (iResponderLifetimeSecs.Compare(aAttr.iResponderLifetimeSecs)!=0) |
|
295 return KErrLifeTime; |
|
296 if (iResponderLifetimeKBytes.Compare(aAttr.iResponderLifetimeKBytes)!=0) |
|
297 return KErrLifeSize; |
294 } |
298 } |
295 return KErrNone; |
299 return KErrNone; |
296 } |
300 } |
297 |
301 |
298 void TAttrib_II::Copy(TAttrib_II &aAttr) |
302 void TAttrib_II::Copy(TAttrib_II &aAttr) |
299 { |
303 { |
300 iTransformNum = aAttr.iTransformNum; //Transform number |
304 iTransformNum = aAttr.iTransformNum; //Transform number |
301 iTransformID = aAttr.iTransformID; //Transform ID |
305 iTransformID = aAttr.iTransformID; //Transform ID |
302 iLifeDurationSecs.Copy(aAttr.iLifeDurationSecs); |
306 iLifeDurationSecs.Copy(aAttr.iLifeDurationSecs); |
303 iLifeDurationKBytes.Copy(aAttr.iLifeDurationKBytes); |
307 iLifeDurationKBytes.Copy(aAttr.iLifeDurationKBytes); |
|
308 iResponderLifetimeSecs.Copy(aAttr.iResponderLifetimeSecs); |
|
309 iResponderLifetimeKBytes.Copy(aAttr.iResponderLifetimeKBytes); |
304 iGroupDesc = aAttr.iGroupDesc; //OAKLEY GROUP |
310 iGroupDesc = aAttr.iGroupDesc; //OAKLEY GROUP |
305 iEncMode = aAttr.iEncMode; //Encapsulation Mode |
311 iEncMode = aAttr.iEncMode; //Encapsulation Mode |
306 iAuthAlg = aAttr.iAuthAlg; //HMAC |
312 iAuthAlg = aAttr.iAuthAlg; //HMAC |
307 iKeyLength = aAttr.iKeyLength; |
313 iKeyLength = aAttr.iKeyLength; |
308 iKeyRounds = aAttr.iKeyRounds; |
314 iKeyRounds = aAttr.iKeyRounds; |
424 tmodif->iPropNum = prop1->iProposalNum; // Store local proposal number |
430 tmodif->iPropNum = prop1->iProposalNum; // Store local proposal number |
425 tmodif->iTransNum = trans_num; // Store remote transform index in proposal |
431 tmodif->iTransNum = trans_num; // Store remote transform index in proposal |
426 tmodif->iReplayWindowLength = prop1->iReplayWindowLength; //to update SAD correctly |
432 tmodif->iReplayWindowLength = prop1->iReplayWindowLength; //to update SAD correctly |
427 tmodif->iReducedLifeSecs.Set(prop1->iAttrList->At(local_num)->iLifeDurationSecs); |
433 tmodif->iReducedLifeSecs.Set(prop1->iAttrList->At(local_num)->iLifeDurationSecs); |
428 tmodif->iReducedLifeKBytes.Set(prop1->iAttrList->At(local_num)->iLifeDurationKBytes); |
434 tmodif->iReducedLifeKBytes.Set(prop1->iAttrList->At(local_num)->iLifeDurationKBytes); |
|
435 tmodif->iResponderLifetimeSecs.Set(prop1->iAttrList->At(local_num)->iResponderLifetimeSecs); |
|
436 tmodif->iResponderLifetimeKBytes.Set(prop1->iAttrList->At(local_num)->iResponderLifetimeKBytes); |
429 aTransArray->AppendL(tmodif); //add to the array and go for the next |
437 aTransArray->AppendL(tmodif); //add to the array and go for the next |
430 CleanupStack::Pop(); //tmodif safe |
438 CleanupStack::Pop(); //tmodif safe |
431 if ( (i1 + 1) < Count() ) //still proposals left in 'this' list |
439 if ( (i1 + 1) < Count() ) //still proposals left in 'this' list |
432 { |
440 { |
433 prop1 = At(i1++); |
441 prop1 = At(i1++); |