56 class TCHREISAKMP; |
56 class TCHREISAKMP; |
57 class ThdrISAKMP; |
57 class ThdrISAKMP; |
58 class CIkev1PluginSession; |
58 class CIkev1PluginSession; |
59 class MIkeDebug; |
59 class MIkeDebug; |
60 |
60 |
61 |
61 class CAuthDialogInfo : public CBase |
62 NONSHARABLE_CLASS(CAuthDialogInfo) : public CBase |
|
63 { |
62 { |
64 public: |
63 public: |
65 CAuthDialogInfo(CIkev1PluginSession* aPluginSession, TUint32 aObjId, TUint32 aSAId, TUint32 aMsgId) |
64 CAuthDialogInfo(CIkev1PluginSession* aPluginSession, TUint32 aObjId, TUint32 aSAId, TUint32 aMsgId) |
66 { iPluginSession = aPluginSession; iSAId = aSAId; iObjId = aObjId; iMsgId = aMsgId; } |
65 { iPluginSession = aPluginSession; iSAId = aSAId; iObjId = aObjId; iMsgId = aMsgId; } |
67 ~CAuthDialogInfo(); |
66 ~CAuthDialogInfo() {iObjId = 0;} |
68 inline CIkev1PluginSession* PluginSession() { return iPluginSession;} |
67 inline CIkev1PluginSession* PluginSession() { return iPluginSession;} |
69 inline TUint32 SAId() { return iSAId;} |
68 inline TUint32 SAId() { return iSAId;} |
70 inline TUint32 GetObjId() { return iObjId;} |
69 inline TUint32 GetObjId() { return iObjId;} |
71 inline TUint32 GetMsgId() { return iMsgId;} |
70 inline TUint32 GetMsgId() { return iMsgId;} |
72 |
71 |
73 void SetUserName( HBufC8* aUserName ); |
|
74 void SetSecret( HBufC8* aSecret ); |
|
75 |
|
76 private: |
72 private: |
77 TUint32 iObjId; // Object identifier |
73 TUint32 iObjId; // Object identifier |
78 CIkev1PluginSession* iPluginSession; // Plugin session pointer |
74 CIkev1PluginSession* iPluginSession; // Plugin session pointer |
79 TUint32 iSAId; // SA id of CIkev1Negotiation |
75 TUint32 iSAId; // SA id of CIkev1Negotiation |
80 TUint32 iMsgId; // Transaction exchange message ID |
76 TUint32 iMsgId; // Transaction exchange message ID |
81 |
77 |
82 public: |
78 public: |
83 /** |
79 // Credentials data get from user with asynchronous dialog |
84 * Username from UI dialog or cache. |
80 HBufC8 *iUsername; |
85 * Own. |
81 HBufC8 *iSecret; |
86 */ |
82 HBufC8 *iDomain; |
87 HBufC8* iUsername; |
|
88 |
|
89 /** |
|
90 * Secret from UI dialog or cache. |
|
91 * Own. |
|
92 */ |
|
93 HBufC8* iSecret; |
|
94 }; |
83 }; |
95 |
84 |
96 |
85 |
97 NONSHARABLE_CLASS(CIKECRACKNegotiation) : public CBase, public MIkeDialogComplete |
86 NONSHARABLE_CLASS(CIKECRACKNegotiation) : public CBase, public MIkeDialogComplete |
98 { |
87 { |
101 ~CIKECRACKNegotiation(); |
90 ~CIKECRACKNegotiation(); |
102 TInt ConstructL(TInt aLAMType, CIkev1Negotiation *aNegotiation, const TDesC &aDomain); |
91 TInt ConstructL(TInt aLAMType, CIkev1Negotiation *aNegotiation, const TDesC &aDomain); |
103 TInt ExecuteCRACKMsgL(const ThdrISAKMP &aHdr); |
92 TInt ExecuteCRACKMsgL(const ThdrISAKMP &aHdr); |
104 TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); |
93 TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); |
105 TInt CrackAuthenticationFailedL(const TNotificationISAKMP *aNotifPayload); |
94 TInt CrackAuthenticationFailedL(const TNotificationISAKMP *aNotifPayload); |
106 |
95 |
107 TInt DialogCompleteL(TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret); |
96 TInt DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain); |
|
97 |
108 |
98 |
109 private: |
99 private: |
110 TInt GetDataL(HBufC8* aChallenge); |
100 TInt GetDataL(HBufC8* aChallenge); |
111 TInt GetDatafromUserL(HBufC8 *aChallenge); |
101 TInt GetDatafromUserL(HBufC8 *aChallenge); |
112 TInt GetUNPWDFromPolicyL(); |
102 TInt GetUNPWDFromPolicyL(); |
125 CIkev1Dialog* iDialog; // Pending dialog object |
115 CIkev1Dialog* iDialog; // Pending dialog object |
126 CAuthDialogInfo* iDialogInfo; // Dialog info object |
116 CAuthDialogInfo* iDialogInfo; // Dialog info object |
127 |
117 |
128 HBufC8 *iUserName; // Saved for User name caching |
118 HBufC8 *iUserName; // Saved for User name caching |
129 HBufC8 *iDomain; // Fixed domain value for this CRACK negotiation |
119 HBufC8 *iDomain; // Fixed domain value for this CRACK negotiation |
130 |
120 |
131 MIkeDebug& iDebug; |
121 MIkeDebug& iDebug; |
132 }; |
122 }; |
133 |
123 |
134 |
124 |
135 #endif // IKEV1CRACK_H |
125 #endif // IKEV1CRACK_H |