|
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 |
|
20 |
|
21 #if !defined(_TLS_AM_APPLICATION_EAP_FAST_H_) |
|
22 #define _TLS_AM_APPLICATION_EAP_FAST_H_ |
|
23 |
|
24 #if defined(USE_FAST_EAP_TYPE) |
|
25 |
|
26 #include "eap_am_export.h" |
|
27 #include "eap_array.h" |
|
28 #include "eap_fast_pac_store_types.h" |
|
29 |
|
30 #include "eap_fast_tlv_header.h" |
|
31 |
|
32 #if defined(USE_EAP_TLS_SESSION_TICKET) |
|
33 class tls_extension_c; |
|
34 #endif // #if defined(USE_EAP_TLS_SESSION_TICKET) |
|
35 |
|
36 class abs_tls_am_application_eap_fast_c; |
|
37 class eap_fast_variable_data_c; |
|
38 |
|
39 |
|
40 /// This class declares the functions adaptation module of TLS |
|
41 /// requires from the TLS. |
|
42 class EAP_EXPORT tls_am_application_eap_fast_c |
|
43 { |
|
44 private: |
|
45 //-------------------------------------------------- |
|
46 |
|
47 //-------------------------------------------------- |
|
48 protected: |
|
49 //-------------------------------------------------- |
|
50 |
|
51 //-------------------------------------------------- |
|
52 public: |
|
53 //-------------------------------------------------- |
|
54 |
|
55 /// Destructor does nothing. |
|
56 virtual ~tls_am_application_eap_fast_c() |
|
57 { |
|
58 } |
|
59 |
|
60 /// Constructor does nothing. |
|
61 tls_am_application_eap_fast_c() |
|
62 { |
|
63 } |
|
64 |
|
65 /// This function sets pointer to application of TLS. See abs_tls_am_application_eap_fast_c. |
|
66 virtual void set_tls_application(abs_tls_am_application_eap_fast_c * const tls_application) = 0; |
|
67 |
|
68 // This is commented in eap_base_type_c::configure(). |
|
69 virtual eap_status_e configure() = 0; |
|
70 |
|
71 /** |
|
72 * This function initializes PAC store. |
|
73 * Imported PACs and other configuration can be done within this function call. |
|
74 * If asyncronous operations are needed the operations must be completed |
|
75 * by complete_initialize_PAC_store() function call. |
|
76 */ |
|
77 virtual eap_status_e initialize_PAC_store( |
|
78 const eap_fast_completion_operation_e completion_operation, |
|
79 const eap_fast_initialize_pac_store_completion_e completion) = 0; |
|
80 |
|
81 /** |
|
82 * This function reads the authority identity (A-ID) of server. |
|
83 * This is used in EAP-FAST. |
|
84 * Parameter includes the TLV of A-ID. |
|
85 */ |
|
86 virtual eap_status_e read_authority_identity(eap_variable_data_c * const authority_identity_payload) = 0; |
|
87 |
|
88 /** |
|
89 * This function call is always asyncronous. |
|
90 * It will be completed always with complete_query_pac_of_type() function call. |
|
91 * Function creates a new PAC. |
|
92 */ |
|
93 virtual eap_status_e query_pac_of_type(const eap_fast_pac_type_e pac_type) = 0; |
|
94 |
|
95 #if defined(USE_EAP_CORE_SERVER) |
|
96 /** |
|
97 * This function call is always asyncronous. |
|
98 * It will be completed always with complete_verify_pac() function call. |
|
99 * Function verifies the received PAC is valid. |
|
100 */ |
|
101 virtual eap_status_e verify_pac(const eap_fast_variable_data_c * const tlv_pac) = 0; |
|
102 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
103 |
|
104 |
|
105 virtual eap_status_e indicates_eap_fast_provisioning_starts( |
|
106 const eap_fast_completion_operation_e provisioning_mode, |
|
107 const eap_fast_pac_type_e pac_type) = 0; |
|
108 |
|
109 virtual eap_status_e indicates_eap_fast_provisioning_ends( |
|
110 const bool provisioning_successfull, |
|
111 const eap_fast_completion_operation_e provisioning_mode, |
|
112 const eap_fast_pac_type_e pac_type) = 0; |
|
113 |
|
114 // This is commented in eap_am_fast_pac_store_services_c::query_user_permission_for_A_ID(). |
|
115 virtual eap_status_e query_user_permission_for_A_ID( |
|
116 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
117 const eap_fast_variable_data_c * const in_pac_attribute_A_ID_info, |
|
118 const eap_fast_variable_data_c * const in_pac_attribute_A_ID) = 0; |
|
119 |
|
120 // This is commented in eap_am_fast_pac_store_services_c::read_PAC_store_data(). |
|
121 virtual eap_status_e read_PAC_store_data( |
|
122 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
123 EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references) = 0; |
|
124 |
|
125 // This is commented in eap_am_fast_pac_store_services_c::write_PAC_store_data(). |
|
126 virtual eap_status_e write_PAC_store_data( |
|
127 const bool when_true_must_be_synchronous_operation, |
|
128 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
129 EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references_and_data_blocks) = 0; |
|
130 |
|
131 // This is commented in eap_am_fast_pac_store_services_c::complete_add_imported_PAC_file(). |
|
132 virtual eap_status_e complete_add_imported_PAC_file( |
|
133 const eap_status_e in_completion_status, |
|
134 const eap_variable_data_c * const in_imported_PAC_filename, |
|
135 const eap_variable_data_c * const out_used_group_reference) = 0; |
|
136 |
|
137 // This is commented in eap_am_fast_pac_store_services_c::complete_remove_PAC(). |
|
138 virtual eap_status_e complete_remove_PAC( |
|
139 const eap_status_e in_completion_status, |
|
140 const eap_variable_data_c * const out_used_group_reference) = 0; |
|
141 |
|
142 // This is commented in eap_am_fast_pac_store_services_c::complete_remove_IAP_reference(). |
|
143 virtual eap_status_e complete_remove_IAP_reference( |
|
144 const eap_status_e in_completion_status) = 0; |
|
145 |
|
146 // This is commented in eap_am_fast_pac_store_services_c::cancel_PAC_store_operations(). |
|
147 virtual eap_status_e cancel_PAC_store_operations() = 0; |
|
148 |
|
149 //-------------------------------------------------- |
|
150 }; // class tls_am_application_eap_fast_c |
|
151 |
|
152 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
153 |
|
154 #endif //#if !defined(_TLS_AM_APPLICATION_EAP_FAST_H_) |
|
155 |
|
156 //-------------------------------------------------- |
|
157 |
|
158 // End. |