|
1 /* |
|
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: IKEv2 IPsec SA data definition |
|
15 * Class TIkeV2IpsecSAData is the IKEv2 specific version of |
|
16 * IPsec SA parameter definition which |
|
17 * is used to pass SA information between store IPsec SA |
|
18 * information internally by the IKEv2 plugin. |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef __IKEV2IPSECSADATA_H__ |
|
23 #define __IKEV2IPSECSADATA_H__ |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 class CIpsecSARekeyData; |
|
28 class MIkeDebug; |
|
29 |
|
30 class TIkeV2IpsecSAData |
|
31 { |
|
32 public: |
|
33 TIkeV2IpsecSAData(MIkeDebug& aDebug); |
|
34 void Copy(const TIkeV2IpsecSAData& aSrc); |
|
35 //void StoreKeyMaterial(HBufC8* aKeyMaterial); |
|
36 void PurgeKeyMaterial(); |
|
37 void DeleteRekeyData(); |
|
38 |
|
39 void GenerateIpsecKeysL(const TDesC8& aSKd, |
|
40 const TDesC8& aGPowIr, |
|
41 const TDesC8& aNonceI, |
|
42 const TDesC8& aNonceR, |
|
43 TUint16 aPrfAlg); |
|
44 |
|
45 public: |
|
46 |
|
47 |
|
48 TBuf8<4> iSPI_In; // Local SPI |
|
49 TBuf8<4> iSPI_Out; // Remote SPI |
|
50 |
|
51 // |
|
52 // Selected IPSEC SA proposal |
|
53 // |
|
54 TUint16 iEncrAlg; // Encryption algorithm (transform ID 1) |
|
55 TUint16 iIntegAlg; // Integrity algorithm (transform ID 3) |
|
56 TUint8 iSaType; // AH, ESP SA type from pfkeyv2.h |
|
57 TUint8 iESN; // 0 = no ESN; 1 = ESN with ESP |
|
58 TInt iCipherKeyLth; // Cipher key length |
|
59 TInt iIntegKeyLth; // Integrity key length |
|
60 TBool iTransport; // if Transport mode value is ETrue |
|
61 TBool iSrcSpecific; // if IPSec SA is source specific is ETrue |
|
62 |
|
63 CIpsecSARekeyData* iRekeyData; |
|
64 // |
|
65 // IPSEC keymaterial buffers |
|
66 // |
|
67 HBufC8* iKeyMaterial; // Cipher key buffer |
|
68 TIkeV2IpsecSAData* iNext; // Next Ipsec SA pair |
|
69 |
|
70 private: |
|
71 MIkeDebug& iDebug; |
|
72 }; |
|
73 |
|
74 |
|
75 #endif /* __IKEV2IPSECSADATA_H__ */ |