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