eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: %
    19 * %version: 10.1.4 %
    20 */
    20 */
    21 
    21 
    22 #ifndef EAP_TYPE_SECURID_H
    22 #ifndef EAP_TYPE_SECURID_H
    23 #define EAP_TYPE_SECURID_H
    23 #define EAP_TYPE_SECURID_H
    24 
    24 
    27 #include "abs_eap_am_type_securid.h"
    27 #include "abs_eap_am_type_securid.h"
    28 #include "eap_am_type_securid.h"
    28 #include "eap_am_type_securid.h"
    29 #include "eap_am_network_id.h"
    29 #include "eap_am_network_id.h"
    30 
    30 
    31 #include "eap_type_securid_state.h"
    31 #include "eap_type_securid_state.h"
       
    32 #include "eap_am_export.h"
       
    33 // Start: added by script change_export_macros.sh.
       
    34 #if defined(EAP_NO_EXPORT_EAP_TYPE_SECURID_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SECURID_H EAP_NONSHARABLE 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SECURID_H 
       
    38 	#define EAP_FUNC_EXPORT_EAP_TYPE_SECURID_H 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SECURID_H 
       
    40 #elif defined(EAP_EXPORT_EAP_TYPE_SECURID_H)
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SECURID_H EAP_EXPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H EAP_FUNC_EXPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SECURID_H EAP_C_FUNC_EXPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_TYPE_SECURID_H EAP_FUNC_EXPORT 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SECURID_H EAP_C_FUNC_EXPORT 
       
    46 #else
       
    47 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SECURID_H EAP_IMPORT 
       
    48 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H EAP_FUNC_IMPORT 
       
    49 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SECURID_H EAP_C_FUNC_IMPORT 
       
    50 	#define EAP_FUNC_EXPORT_EAP_TYPE_SECURID_H 
       
    51 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SECURID_H 
       
    52 #endif
       
    53 // End: added by script change_export_macros.sh.
       
    54 
    32 
    55 
    33 /// This class is implementation of SecurID EAP-type.
    56 /// This class is implementation of SecurID EAP-type.
    34 class EAP_EXPORT eap_type_securid_c
    57 class EAP_CLASS_VISIBILITY_EAP_TYPE_SECURID_H eap_type_securid_c
    35 : public abs_eap_am_type_securid_c 
    58 : public abs_eap_am_type_securid_c 
    36 , public eap_base_type_c
    59 , public eap_base_type_c
    37 {
    60 {
    38 
    61 
    39 private:
    62 private:
    84 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
   107 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
    85 	bool m_skip_user_interactions;
   108 	bool m_skip_user_interactions;
    86 #endif //#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
   109 #endif //#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
    87 
   110 
    88 
   111 
    89 	EAP_FUNC_IMPORT eap_status_e finish_successful_authentication();
   112 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e finish_successful_authentication();
    90 
   113 
    91 	EAP_FUNC_IMPORT eap_status_e finish_unsuccessful_authentication(
   114 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e finish_unsuccessful_authentication(
    92 		const bool authentication_cancelled);
   115 		const bool authentication_cancelled);
    93 
   116 
    94 	EAP_FUNC_IMPORT eap_status_e complete_eap_identity_query(
   117 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e complete_eap_identity_query(
    95 		const eap_variable_data_c * const identity);
   118 		const eap_variable_data_c * const identity);
    96 
   119 
    97 	EAP_FUNC_IMPORT eap_status_e client_securid_complete_passcode_query(
   120 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e client_securid_complete_passcode_query(
    98 		const eap_variable_data_c * const passcode);
   121 		const eap_variable_data_c * const passcode);
    99 
   122 
   100 	EAP_FUNC_IMPORT eap_status_e client_securid_complete_pincode_query(
   123 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e client_securid_complete_pincode_query(
   101 		const eap_variable_data_c * const pincode,
   124 		const eap_variable_data_c * const pincode,
   102 		const eap_variable_data_c * const passcode);
   125 		const eap_variable_data_c * const passcode);
   103 
   126 
   104 	EAP_FUNC_IMPORT eap_status_e client_gtc_complete_user_input_query(
   127 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e client_gtc_complete_user_input_query(
       
   128 		const eap_variable_data_c * const identity_utf8,
   105 		const eap_variable_data_c * const input);
   129 		const eap_variable_data_c * const input);
   106 
   130 
   107 	EAP_FUNC_IMPORT eap_status_e remove_username_store();
   131 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e remove_username_store();
   108 
   132 
   109 	/**
   133 	/**
   110 	 * This function processes the SecurID packets.
   134 	 * This function processes the SecurID packets.
   111 	 */
   135 	 */
   112 	EAP_FUNC_IMPORT eap_status_e securid_packet_process(
   136 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e securid_packet_process(
   113 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   137 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   114 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   138 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   115 		);
   139 		);
   116 
   140 
   117 	/**
   141 	/**
   118 	 * This function tells if the object is a client or a server..
   142 	 * This function tells if the object is a client or a server..
   119 	 */
   143 	 */
   120 	EAP_FUNC_IMPORT bool get_is_client();
   144 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H bool get_is_client();
   121 
   145 
   122 	eap_buf_chain_wr_c * create_send_packet(u32_t length);
   146 	eap_buf_chain_wr_c * create_send_packet(u32_t length);
   123 
   147 
   124 	eap_status_e packet_send(
   148 	eap_status_e packet_send(
   125 		eap_buf_chain_wr_c * const data,
   149 		eap_buf_chain_wr_c * const data,
   150 public:
   174 public:
   151 
   175 
   152 	/**
   176 	/**
   153 	 * Destructor cancels all timers and deletes member attributes.
   177 	 * Destructor cancels all timers and deletes member attributes.
   154 	 */
   178 	 */
   155 	EAP_FUNC_IMPORT virtual ~eap_type_securid_c();
   179 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H virtual ~eap_type_securid_c();
   156 
   180 
   157 	/**
   181 	/**
   158 	 * Constructor initializes all member attributes.
   182 	 * Constructor initializes all member attributes.
   159 	 */
   183 	 */
   160 	EAP_FUNC_IMPORT eap_type_securid_c(
   184 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_type_securid_c(
   161 		abs_eap_am_tools_c * const tools,
   185 		abs_eap_am_tools_c * const tools,
   162 		abs_eap_base_type_c * const partner,
   186 		abs_eap_base_type_c * const partner,
   163 		eap_am_type_securid_c * const am_type_securid,
   187 		eap_am_type_securid_c * const am_type_securid,
   164 		const bool free_am_type_securid,
   188 		const bool free_am_type_securid,
   165 		const eap_type_value_e current_eap_type,
   189 		const eap_type_value_e current_eap_type,
   168 
   192 
   169 	/**
   193 	/**
   170 	 * The partner class calls this function when EAP/SecurID packet is received.
   194 	 * The partner class calls this function when EAP/SecurID packet is received.
   171 	 * see also eap_base_type_c::packet_process().
   195 	 * see also eap_base_type_c::packet_process().
   172 	 */
   196 	 */
   173 	EAP_FUNC_IMPORT eap_status_e packet_process(
   197 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e packet_process(
   174 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   198 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   175 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   199 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   176 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   200 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   177 		);
   201 		);
   178 
   202 
   179 
   203 
   180 	// This is commented in eap_base_type_c::get_is_valid().
   204 	// This is commented in eap_base_type_c::get_is_valid().
   181 	EAP_FUNC_IMPORT bool get_is_valid();
   205 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H bool get_is_valid();
   182 	
   206 	
   183 	EAP_FUNC_IMPORT void set_is_valid();
   207 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H void set_is_valid();
   184 
   208 
   185 	/**
   209 	/**
   186 	 * This function resets the reused eap_type_securid_c object.
   210 	 * This function resets the reused eap_type_securid_c object.
   187 	 */
   211 	 */
   188 	EAP_FUNC_IMPORT eap_status_e reset();
   212 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e reset();
   189 
   213 
   190 	EAP_FUNC_IMPORT eap_status_e shutdown();
   214 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e shutdown();
   191 
   215 
   192 	EAP_FUNC_IMPORT eap_status_e configure();
   216 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e configure();
   193 
   217 
   194 	// This is commented in eap_base_type_c::query_eap_identity().
   218 	// This is commented in eap_base_type_c::query_eap_identity().
   195 	EAP_FUNC_IMPORT eap_status_e query_eap_identity(
   219 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e query_eap_identity(
   196 		const bool must_be_synchronous,
   220 		const bool must_be_synchronous,
   197 		eap_variable_data_c * const identity,
   221 		eap_variable_data_c * const identity,
   198 		const eap_am_network_id_c * const receive_network_id,
   222 		const eap_am_network_id_c * const receive_network_id,
   199 		const u8_t eap_identifier);
   223 		const u8_t eap_identifier);
   200 
   224 
   201 	EAP_FUNC_IMPORT eap_status_e set_initial_eap_identifier(
   225 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e set_initial_eap_identifier(
   202 		const eap_am_network_id_c * const receive_network_id,
   226 		const eap_am_network_id_c * const receive_network_id,
   203 		const u8_t initial_identifier);
   227 		const u8_t initial_identifier);
   204 
   228 
   205 	// This is commented in eap_base_type_c::eap_acknowledge().
   229 	// This is commented in eap_base_type_c::eap_acknowledge().
   206 	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
   230 	EAP_FUNC_VISIBILITY_EAP_TYPE_SECURID_H eap_status_e eap_acknowledge(
   207 		const eap_am_network_id_c * const receive_network_id);
   231 		const eap_am_network_id_c * const receive_network_id);
   208 
   232 
   209 }; // class eap_type_securid_c
   233 }; // class eap_type_securid_c
   210 
   234 
   211 #endif // EAP_TYPE_SECURID_H
   235 #endif // EAP_TYPE_SECURID_H