1 /* |
|
2 * Copyright (c) 2001-2006 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 the License "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: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: % |
|
20 */ |
|
21 |
|
22 #if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_) |
|
23 #define _EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_ |
|
24 |
|
25 #include "eap_tools.h" |
|
26 #include "eap_am_export.h" |
|
27 #include "eap_pac_store_message_base.h" |
|
28 #include "abs_eap_am_message_if.h" |
|
29 #include "eap_array.h" |
|
30 #include "eap_process_tlv_message_data.h" |
|
31 #include "eap_am_message_if.h" |
|
32 #include "abs_eap_pac_store_message.h" |
|
33 |
|
34 class eap_method_settings_c; |
|
35 class eap_am_message_if_c; |
|
36 class abs_eap_pac_store_message_c; |
|
37 class eap_tlv_header_c; |
|
38 |
|
39 /// A eap_pac_store_client_message_if_c class implements mapping of EAP authentication sessions. |
|
40 /// Network identity separates parallel EAP authentication sessions. |
|
41 class EAP_EXPORT eap_pac_store_client_message_if_c |
|
42 : public eap_pac_store_message_base_c |
|
43 , public abs_eap_am_message_if_c |
|
44 { |
|
45 private: |
|
46 //-------------------------------------------------- |
|
47 |
|
48 /// This is pointer to the tools class. |
|
49 abs_eap_am_tools_c * const m_am_tools; |
|
50 |
|
51 /// eap_pac_store_client_message_if_c deletes m_client_if in destructor. |
|
52 eap_am_message_if_c * m_client_if; |
|
53 |
|
54 /// This is back pointer to object which created this object. |
|
55 /// Packets are sent to the partner. |
|
56 abs_eap_pac_store_message_c * const m_partner; |
|
57 |
|
58 /// This indicates whether this object was generated successfully. |
|
59 bool m_is_valid; |
|
60 |
|
61 eap_status_e m_error_code; |
|
62 |
|
63 eap_tlv_message_type_function_e m_error_function; |
|
64 |
|
65 eap_status_e complete_open_pac_store( |
|
66 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
67 |
|
68 eap_status_e complete_create_device_seed( |
|
69 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
70 |
|
71 eap_status_e complete_is_master_key_present( |
|
72 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
73 |
|
74 eap_status_e complete_is_master_key_and_password_matching( |
|
75 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
76 |
|
77 eap_status_e complete_create_and_save_master_key( |
|
78 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
79 |
|
80 eap_status_e complete_compare_pac_store_password( |
|
81 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
82 |
|
83 eap_status_e complete_is_pacstore_password_present( |
|
84 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
85 |
|
86 eap_status_e complete_set_pac_store_password( |
|
87 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
88 |
|
89 eap_status_e complete_destroy_pac_store( |
|
90 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
91 |
|
92 eap_status_e process_message_type_error( |
|
93 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
94 |
|
95 //-------------------------------------------------- |
|
96 protected: |
|
97 //-------------------------------------------------- |
|
98 |
|
99 //-------------------------------------------------- |
|
100 public: |
|
101 //-------------------------------------------------- |
|
102 |
|
103 /** |
|
104 * The destructor of the eap_core class does nothing special. |
|
105 */ |
|
106 EAP_FUNC_IMPORT virtual ~eap_pac_store_client_message_if_c(); |
|
107 |
|
108 /** |
|
109 * The constructor initializes member attributes using parameters passed to it. |
|
110 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
|
111 * @param partner is back pointer to object which created this object. |
|
112 * @param is_client_when_true indicates whether the network entity should act |
|
113 * as a client (true) or server (false), in terms of EAP-protocol |
|
114 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
|
115 */ |
|
116 EAP_FUNC_IMPORT eap_pac_store_client_message_if_c( |
|
117 abs_eap_am_tools_c * const tools, |
|
118 eap_am_message_if_c * const client_if, |
|
119 abs_eap_pac_store_message_c * const partner); |
|
120 |
|
121 /** |
|
122 * This function must reset the state of object to same as |
|
123 * state was after the configure() function call. |
|
124 * If object reset succeeds this function must return eap_status_ok. |
|
125 * If object reset fails this function must return corresponding error status. |
|
126 * @return This function returns the status of reset operation. |
|
127 */ |
|
128 EAP_FUNC_IMPORT eap_status_e reset(); |
|
129 |
|
130 // This is documented in abs_eap_stack_interface_c::configure(). |
|
131 EAP_FUNC_IMPORT eap_status_e configure(); |
|
132 |
|
133 // This is documented in abs_eap_stack_interface_c::shutdown(). |
|
134 EAP_FUNC_IMPORT eap_status_e shutdown(); |
|
135 |
|
136 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
|
137 EAP_FUNC_IMPORT bool get_is_valid(); |
|
138 |
|
139 EAP_FUNC_IMPORT eap_status_e process_message(eap_process_tlv_message_data_c * const message); |
|
140 |
|
141 EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length); |
|
142 |
|
143 EAP_FUNC_IMPORT eap_status_e open_pac_store( |
|
144 const eap_status_e completion_status); |
|
145 |
|
146 EAP_FUNC_IMPORT eap_status_e create_device_seed( |
|
147 const eap_status_e completion_status); |
|
148 |
|
149 EAP_FUNC_IMPORT eap_status_e is_master_key_present( |
|
150 const eap_status_e completion_status); |
|
151 |
|
152 EAP_FUNC_IMPORT eap_status_e is_master_key_and_password_matching( |
|
153 const eap_variable_data_c * const pac_store_password |
|
154 ,const eap_status_e completion_status); |
|
155 |
|
156 EAP_FUNC_IMPORT eap_status_e create_and_save_master_key( |
|
157 const eap_variable_data_c * const pac_store_password |
|
158 ,const eap_status_e completion_status); |
|
159 |
|
160 EAP_FUNC_IMPORT eap_status_e compare_pac_store_password( |
|
161 eap_variable_data_c * const pac_store_password); |
|
162 |
|
163 EAP_FUNC_IMPORT eap_status_e is_pacstore_password_present(); |
|
164 |
|
165 EAP_FUNC_IMPORT eap_status_e set_pac_store_password( |
|
166 const eap_variable_data_c * const pac_store_password |
|
167 ,const eap_status_e completion_status); |
|
168 |
|
169 EAP_FUNC_IMPORT eap_status_e destroy_pac_store( |
|
170 const eap_status_e completion_status); |
|
171 |
|
172 |
|
173 |
|
174 //-------------------------------------------------- |
|
175 }; // class eap_pac_store_client_message_if_c |
|
176 |
|
177 //-------------------------------------------------- |
|
178 |
|
179 #endif //#if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_) |
|
180 |
|
181 //-------------------------------------------------- |
|
182 |
|
183 |
|
184 |
|
185 // End. |
|