eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_aka_symbian.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 18.1.4 %
    19 * %version: 18.1.5 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(_EAP_AM_TYPE_AKA_SYMBIAN_H_)
    22 #if !defined(_EAP_AM_TYPE_AKA_SYMBIAN_H_)
    23 #define _EAP_AM_TYPE_AKA_SYMBIAN_H_
    23 #define _EAP_AM_TYPE_AKA_SYMBIAN_H_
    24 
    24 
    27 
    27 
    28 #include <EapType.h>
    28 #include <EapType.h>
    29 #include <d32dbms.h>
    29 #include <d32dbms.h>
    30 #include "eap_tools.h"
    30 #include "eap_tools.h"
    31 #include "eap_am_export.h"
    31 #include "eap_am_export.h"
       
    32 // Start: added by script change_export_macros.sh.
       
    33 #if defined(EAP_NO_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H)
       
    34 	#define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_NONSHARABLE 
       
    35 	#define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    36 	#define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    37 	#define EAP_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    38 	#define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    39 #elif defined(EAP_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H)
       
    40 	#define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_EXPORT 
       
    41 	#define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_FUNC_EXPORT 
       
    42 	#define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_C_FUNC_EXPORT 
       
    43 	#define EAP_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_FUNC_EXPORT 
       
    44 	#define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_C_FUNC_EXPORT 
       
    45 #else
       
    46 	#define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_IMPORT 
       
    47 	#define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_FUNC_IMPORT 
       
    48 	#define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H EAP_C_FUNC_IMPORT 
       
    49 	#define EAP_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    50 	#define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_AKA_SYMBIAN_H 
       
    51 #endif
       
    52 // End: added by script change_export_macros.sh.
    32 #include "abs_eap_base_type.h"
    53 #include "abs_eap_base_type.h"
    33 
    54 
    34 #include "eap_am_type_aka.h"
    55 #include "eap_am_type_aka.h"
    35 #include "abs_eap_am_aka_algorithm.h"
    56 #include "abs_eap_am_aka_algorithm.h"
    36 
    57 
    49 * Class that implements the operating system dependent portion of 
    70 * Class that implements the operating system dependent portion of 
    50 * EAP AKA protocol for Symbian OS.
    71 * EAP AKA protocol for Symbian OS.
    51 */
    72 */
    52 
    73 
    53 
    74 
    54 class EAP_EXPORT eap_am_type_aka_symbian_c
    75 class EAP_CLASS_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_am_type_aka_symbian_c
    55 : public CBase, public eap_am_type_aka_c
    76 : public CBase, public eap_am_type_aka_c
    56 {
    77 {
    57 public:
    78 public:
    58 	//--------------------------------------------------
    79 	//--------------------------------------------------
    59 	
    80 	
    60 	EAP_FUNC_IMPORT static eap_am_type_aka_symbian_c* NewL(
    81 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H static eap_am_type_aka_symbian_c* NewL(
    61 		abs_eap_am_tools_c * const aTools,
    82 		abs_eap_am_tools_c * const aTools,
    62 		abs_eap_base_type_c * const aPartner,
    83 		abs_eap_base_type_c * const aPartner,
    63 		const TIndexType aIndexType,
    84 		const TIndexType aIndexType,
    64 		const TInt aIndex,
    85 		const TInt aIndex,
    65 		const eap_type_value_e aTunnelingType,
    86 		const eap_type_value_e aTunnelingType,
    66 		const bool aIsClient,
    87 		const bool aIsClient,
    67 		const eap_am_network_id_c * const receive_network_id);
    88 		const eap_am_network_id_c * const receive_network_id);
    68 		
    89 		
    69 	// 
    90 	// 
    70 	EAP_FUNC_IMPORT virtual ~eap_am_type_aka_symbian_c();	
    91 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H virtual ~eap_am_type_aka_symbian_c();	
    71 	
    92 	
    72 	
    93 	
    73 	/**  From the parent eap_am_type_aka_c **/
    94 	/**  From the parent eap_am_type_aka_c **/
    74 
    95 
    75 	EAP_FUNC_IMPORT eap_status_e configure();
    96 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e configure();
    76 
    97 
    77 	EAP_FUNC_IMPORT eap_status_e reset();
    98 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e reset();
    78 
    99 
    79 	/**
   100 	/**
    80 	 * The shutdown() function is called before the destructor of the 
   101 	 * The shutdown() function is called before the destructor of the 
    81 	 * object is executed. During the function call the object 
   102 	 * object is executed. During the function call the object 
    82 	 * could shutdown the operations, for example cancel timers.
   103 	 * could shutdown the operations, for example cancel timers.
    83 	 * Each derived class must define this function.
   104 	 * Each derived class must define this function.
    84 	 */
   105 	 */
    85 	EAP_FUNC_IMPORT eap_status_e shutdown();
   106 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e shutdown();
    86 
   107 
    87 	/** AKA client calls this function.
   108 	/** AKA client calls this function.
    88 	 *  AKA AM could store copy of pseudonym identity to favourite place for future use.
   109 	 *  AKA AM could store copy of pseudonym identity to favourite place for future use.
    89 	 *  If parameter pseudonym is NULL pointer, AM should reset the existing pseudonym.
   110 	 *  If parameter pseudonym is NULL pointer, AM should reset the existing pseudonym.
    90 	 */
   111 	 */
    91 	EAP_FUNC_IMPORT eap_status_e store_pseudonym_id(
   112 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e store_pseudonym_id(
    92 		const eap_am_network_id_c * const send_network_id,
   113 		const eap_am_network_id_c * const send_network_id,
    93 		const eap_variable_data_c * const pseudonym);
   114 		const eap_variable_data_c * const pseudonym);
    94 
   115 
    95 	/** AKA client calls this function.
   116 	/** AKA client calls this function.
    96 	 *  AKA AM could store copy of reauthentication identity to favourite place for future use.
   117 	 *  AKA AM could store copy of reauthentication identity to favourite place for future use.
    97 	 *  If parameter reauthentication_identity is NULL pointer, AM should reset the existing reauthentication identity.
   118 	 *  If parameter reauthentication_identity is NULL pointer, AM should reset the existing reauthentication identity.
    98 	 */
   119 	 */
    99 	EAP_FUNC_IMPORT eap_status_e store_reauthentication_id(
   120 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e store_reauthentication_id(
   100 		const eap_am_network_id_c * const send_network_id,
   121 		const eap_am_network_id_c * const send_network_id,
   101 		const eap_variable_data_c * const reauthentication_identity);
   122 		const eap_variable_data_c * const reauthentication_identity);
   102 
   123 
   103 	/** AKA server and client calls this function.
   124 	/** AKA server and client calls this function.
   104 	 * In order to use re-authentication, the client and the server need to
   125 	 * In order to use re-authentication, the client and the server need to
   105 	 * store the following values: original XKEY, K_aut, K_encr, latest
   126 	 * store the following values: original XKEY, K_aut, K_encr, latest
   106 	 * counter value and the next re-authentication identity.
   127 	 * counter value and the next re-authentication identity.
   107 	 * This function stores original XKEY, K_aut, K_encr and latest
   128 	 * This function stores original XKEY, K_aut, K_encr and latest
   108 	 * counter value.
   129 	 * counter value.
   109 	 */
   130 	 */
   110 	EAP_FUNC_IMPORT eap_status_e store_reauth_parameters(
   131 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e store_reauth_parameters(
   111 		const eap_variable_data_c * const XKEY,
   132 		const eap_variable_data_c * const XKEY,
   112 		const eap_variable_data_c * const K_aut,
   133 		const eap_variable_data_c * const K_aut,
   113 		const eap_variable_data_c * const K_encr,
   134 		const eap_variable_data_c * const K_encr,
   114 		const u32_t reauth_counter);
   135 		const u32_t reauth_counter);
   115 
   136 
   116 	/** AKA client calls this function.
   137 	/** AKA client calls this function.
   117 	 *  AKA AM could do finishing operations to databases etc. based on authentication status and type.
   138 	 *  AKA AM could do finishing operations to databases etc. based on authentication status and type.
   118 	 */
   139 	 */
   119 	EAP_FUNC_IMPORT eap_status_e authentication_finished(
   140 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e authentication_finished(
   120 		const bool true_when_successfull,
   141 		const bool true_when_successfull,
   121 		const eap_aka_authentication_type_e authentication_type,
   142 		const eap_aka_authentication_type_e authentication_type,
   122 		const eap_type_aka_identity_type identity_type);
   143 		const eap_type_aka_identity_type identity_type);
   123 
   144 
   124 	/** AKA server and client calls this function.
   145 	/** AKA server and client calls this function.
   125 	 * In order to use re-authentication, the client and the server need to
   146 	 * In order to use re-authentication, the client and the server need to
   126 	 * store the following values: original XKEY, K_aut, K_encr, latest
   147 	 * store the following values: original XKEY, K_aut, K_encr, latest
   127 	 * counter value and the next re-authentication identity.
   148 	 * counter value and the next re-authentication identity.
   128 	 */
   149 	 */
   129 	EAP_FUNC_IMPORT eap_status_e query_reauth_parameters(
   150 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_reauth_parameters(
   130 		eap_variable_data_c * const XKEY,
   151 		eap_variable_data_c * const XKEY,
   131 		eap_variable_data_c * const K_aut,
   152 		eap_variable_data_c * const K_aut,
   132 		eap_variable_data_c * const K_encr,
   153 		eap_variable_data_c * const K_encr,
   133 		u32_t * const reauth_counter);
   154 		u32_t * const reauth_counter);
   134 
   155 
   135 	/** AKA server and client calls this function.
   156 	/** AKA server and client calls this function.
   136 	 *  This function increases re-authentication counter after a successfull re-authentication.
   157 	 *  This function increases re-authentication counter after a successfull re-authentication.
   137 	 */
   158 	 */
   138 	EAP_FUNC_IMPORT eap_status_e increase_reauth_counter();
   159 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e increase_reauth_counter();
   139 
   160 
   140 	/** AKA client calls this function.
   161 	/** AKA client calls this function.
   141 	 *  AM could copy IMSI or pseudonym to output parameters.
   162 	 *  AM could copy IMSI or pseudonym to output parameters.
   142 	 *  AM must copy IMSI or pseudonym to output parameters.
   163 	 *  AM must copy IMSI or pseudonym to output parameters.
   143 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() function call.
   164 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() function call.
   144 	 */
   165 	 */
   145 	EAP_FUNC_IMPORT eap_status_e query_AKA_IMSI_or_pseudonym_or_reauthentication_id(
   166 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_AKA_IMSI_or_pseudonym_or_reauthentication_id(
   146 		eap_variable_data_c * const IMSI,
   167 		eap_variable_data_c * const IMSI,
   147 		eap_variable_data_c * const pseudonym_identity,
   168 		eap_variable_data_c * const pseudonym_identity,
   148 		eap_variable_data_c * const reauthentication_identity,
   169 		eap_variable_data_c * const reauthentication_identity,
   149 		eap_variable_data_c * const automatic_realm, ///< If this is not used, do not add any data to this parameter.
   170 		eap_variable_data_c * const automatic_realm, ///< If this is not used, do not add any data to this parameter.
   150 		u32_t * const length_of_mnc,
   171 		u32_t * const length_of_mnc,
   157 	 *  This call cancels asyncronous query_AKA_IMSI_or_pseudonym_or_reauthentication_id() function call.
   178 	 *  This call cancels asyncronous query_AKA_IMSI_or_pseudonym_or_reauthentication_id() function call.
   158 	 *  AM must not complete query_AKA_IMSI_or_pseudonym_or_reauthentication_id()
   179 	 *  AM must not complete query_AKA_IMSI_or_pseudonym_or_reauthentication_id()
   159 	 *  with abs_eap_am_type_aka_c::complete_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() after
   180 	 *  with abs_eap_am_type_aka_c::complete_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() after
   160 	 *  cancel_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() call.
   181 	 *  cancel_AKA_IMSI_or_pseudonym_or_reauthentication_id_query() call.
   161 	 */
   182 	 */
   162 	EAP_FUNC_IMPORT eap_status_e cancel_AKA_IMSI_or_pseudonym_or_reauthentication_id_query();
   183 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e cancel_AKA_IMSI_or_pseudonym_or_reauthentication_id_query();
   163 
   184 
   164 
   185 
   165 	/** AKA client calls this function.
   186 	/** AKA client calls this function.
   166 	 *  Input parameter RAND and AUTN as input to AKA algorithm.
   187 	 *  Input parameter RAND and AUTN as input to AKA algorithm.
   167 	 *  AM could copy CK, IK and RES to output parameters.
   188 	 *  AM could copy CK, IK and RES to output parameters.
   168 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_RES_query() function call.
   189 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_RES_query() function call.
   169 	 */
   190 	 */
   170 	EAP_FUNC_IMPORT eap_status_e query_AKA_RES(
   191 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_AKA_RES(
   171 		eap_type_aka_authentication_vector_c * const authentication_vector);
   192 		eap_type_aka_authentication_vector_c * const authentication_vector);
   172 
   193 
   173 	/** AKA client calls this function.
   194 	/** AKA client calls this function.
   174 	 *  This call cancels asyncronous query_AKA_RES() function call.
   195 	 *  This call cancels asyncronous query_AKA_RES() function call.
   175 	 *  AM must not complete query_AKA_RES()
   196 	 *  AM must not complete query_AKA_RES()
   176 	 *  with abs_eap_am_type_aka_c::complete_AKA_RES_query() after
   197 	 *  with abs_eap_am_type_aka_c::complete_AKA_RES_query() after
   177 	 *  cancel_AKA_RES_query() call.
   198 	 *  cancel_AKA_RES_query() call.
   178 	 */
   199 	 */
   179 	EAP_FUNC_IMPORT eap_status_e cancel_AKA_RES_query();
   200 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e cancel_AKA_RES_query();
   180 
   201 
   181 	/** AKA client calls this function.
   202 	/** AKA client calls this function.
   182 	 *  Received AT_NOTIFICATION is handled in AM of AKA.
   203 	 *  Received AT_NOTIFICATION is handled in AM of AKA.
   183 	 *  AM could show localized message to user.
   204 	 *  AM could show localized message to user.
   184 	 */
   205 	 */
   185 	EAP_FUNC_IMPORT eap_status_e handle_aka_notification(eap_aka_notification_codes_e aka_notification_code);
   206 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e handle_aka_notification(eap_aka_notification_codes_e aka_notification_code);
   186 
   207 
   187 	/** AKA server calls this function.
   208 	/** AKA server calls this function.
   188 	 *  AM could copy triplets to output parameters.
   209 	 *  AM could copy triplets to output parameters.
   189 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_authentication_vector_query() function call.
   210 	 *  This function could be completed asyncronously with abs_eap_am_type_aka_c::complete_AKA_authentication_vector_query() function call.
   190 	 */
   211 	 */
   191 	EAP_FUNC_IMPORT eap_status_e query_AKA_authentication_vector(
   212 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_AKA_authentication_vector(
   192 		const eap_variable_data_c * const username, ///< // This is payload AT_IDENTITY. If this is uninitialized then imsi must be initialized.
   213 		const eap_variable_data_c * const username, ///< // This is payload AT_IDENTITY. If this is uninitialized then imsi must be initialized.
   193 		const u8_t next_eap_identifier,
   214 		const u8_t next_eap_identifier,
   194 		eap_variable_data_c * const imsi, ///< This is the real IMSI. If this is uninitialized then username must be initialized and imsi will be initialized after this call.
   215 		eap_variable_data_c * const imsi, ///< This is the real IMSI. If this is uninitialized then username must be initialized and imsi will be initialized after this call.
   195 		eap_type_aka_authentication_vector_c * const authentication_vector,
   216 		eap_type_aka_authentication_vector_c * const authentication_vector,
   196 		eap_type_aka_identity_type * const type);
   217 		eap_type_aka_identity_type * const type);
   198 	/** AKA server calls this function.
   219 	/** AKA server calls this function.
   199 	 *  This call cancels asyncronous query_AKA_authentication_vector() function call.
   220 	 *  This call cancels asyncronous query_AKA_authentication_vector() function call.
   200 	 *  AM must not complete query_AKA_authentication_vector() with abs_eap_am_type_aka_c::complete_AKA_authentication_vector_query() after
   221 	 *  AM must not complete query_AKA_authentication_vector() with abs_eap_am_type_aka_c::complete_AKA_authentication_vector_query() after
   201 	 *  cancel_AKA_authentication_vector_query() call.
   222 	 *  cancel_AKA_authentication_vector_query() call.
   202 	 */
   223 	 */
   203 	EAP_FUNC_IMPORT eap_status_e cancel_AKA_authentication_vector_query();
   224 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e cancel_AKA_authentication_vector_query();
   204 
   225 
   205 	/** AKA server/client calls this function.
   226 	/** AKA server/client calls this function.
   206 	 *  This function call generates with a good source of
   227 	 *  This function call generates with a good source of
   207 	 *  randomness the initialization vector (AT_IV payload).
   228 	 *  randomness the initialization vector (AT_IV payload).
   208 	 */
   229 	 */
   209 	EAP_FUNC_IMPORT eap_status_e generate_encryption_IV(
   230 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e generate_encryption_IV(
   210 		eap_variable_data_c * const encryption_IV,
   231 		eap_variable_data_c * const encryption_IV,
   211 		const u32_t IV_length);
   232 		const u32_t IV_length);
   212 
   233 
   213 	/** AKA server calls this function.
   234 	/** AKA server calls this function.
   214 	 *  New pseudonym identity is generated for IMSI.
   235 	 *  New pseudonym identity is generated for IMSI.
   215 	 *  Algorithm is freely selected. Look at query_imsi_from_username().
   236 	 *  Algorithm is freely selected. Look at query_imsi_from_username().
   216 	 *  Pseudonym identity is copied to pseudonym_identity parameter.
   237 	 *  Pseudonym identity is copied to pseudonym_identity parameter.
   217 	 *  Maximum length of pseudonym is maximum_pseudonym_length bytes.
   238 	 *  Maximum length of pseudonym is maximum_pseudonym_length bytes.
   218 	 */
   239 	 */
   219 	EAP_FUNC_IMPORT eap_status_e generate_pseudonym_id(
   240 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e generate_pseudonym_id(
   220 		const eap_am_network_id_c * const send_network_id,
   241 		const eap_am_network_id_c * const send_network_id,
   221 		const eap_variable_data_c * const imsi,
   242 		const eap_variable_data_c * const imsi,
   222 		eap_variable_data_c * const pseudonym_identity,
   243 		eap_variable_data_c * const pseudonym_identity,
   223 		const u32_t maximum_pseudonym_length);
   244 		const u32_t maximum_pseudonym_length);
   224 
   245 
   226 	 *  New reauthentication identity is generated for IMSI.
   247 	 *  New reauthentication identity is generated for IMSI.
   227 	 *  Algorithm is freely selected. Look at query_imsi_from_username().
   248 	 *  Algorithm is freely selected. Look at query_imsi_from_username().
   228 	 *  Reauthentication identity is copied to pseudonym parameter.
   249 	 *  Reauthentication identity is copied to pseudonym parameter.
   229 	 *  Maximum length of pseudonym is maximum_reauthentication_identity_length bytes.
   250 	 *  Maximum length of pseudonym is maximum_reauthentication_identity_length bytes.
   230 	 */
   251 	 */
   231 	EAP_FUNC_IMPORT eap_status_e generate_reauthentication_id(
   252 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e generate_reauthentication_id(
   232 		const eap_am_network_id_c * const send_network_id,
   253 		const eap_am_network_id_c * const send_network_id,
   233 		const eap_variable_data_c * const imsi,
   254 		const eap_variable_data_c * const imsi,
   234 		eap_variable_data_c * const reauthentication_identity,
   255 		eap_variable_data_c * const reauthentication_identity,
   235 		const u32_t maximum_reauthentication_identity_length);
   256 		const u32_t maximum_reauthentication_identity_length);
   236 
   257 
   240 	 *  Adaptation module must verify which username is.
   261 	 *  Adaptation module must verify which username is.
   241 	 *  Adaptation module could map IMSI and username as it wish.
   262 	 *  Adaptation module could map IMSI and username as it wish.
   242 	 *  It can select any algorithm. Look at generate_pseudonym_id() and generate_reauthentication_id().
   263 	 *  It can select any algorithm. Look at generate_pseudonym_id() and generate_reauthentication_id().
   243 	 *  Function must return IMSI and set the identity type of received username.
   264 	 *  Function must return IMSI and set the identity type of received username.
   244 	 */
   265 	 */
   245 	EAP_FUNC_IMPORT eap_status_e query_imsi_from_username(
   266 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_imsi_from_username(
   246 		const u8_t next_eap_identifier,
   267 		const u8_t next_eap_identifier,
   247 		const eap_am_network_id_c * const send_network_id,
   268 		const eap_am_network_id_c * const send_network_id,
   248 		const eap_variable_data_c * const username,
   269 		const eap_variable_data_c * const username,
   249 		eap_variable_data_c * const imsi,
   270 		eap_variable_data_c * const imsi,
   250 		eap_type_aka_identity_type * const type,
   271 		eap_type_aka_identity_type * const type,
   252 
   273 
   253 	/** AKA server calls this function.
   274 	/** AKA server calls this function.
   254 	 *  Server queries re-syncronization.
   275 	 *  Server queries re-syncronization.
   255 	 *  This function call is completed by complete_re_syncronization_query() function.
   276 	 *  This function call is completed by complete_re_syncronization_query() function.
   256 	 */
   277 	 */
   257 	EAP_FUNC_IMPORT eap_status_e query_re_syncronization(
   278 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_re_syncronization(
   258 		const u8_t next_eap_identifier,
   279 		const u8_t next_eap_identifier,
   259 		eap_type_aka_authentication_vector_c * const authentication_vector
   280 		eap_type_aka_authentication_vector_c * const authentication_vector
   260 		);
   281 		);
   261 
   282 
   262 	/** AKA server calls this function.
   283 	/** AKA server calls this function.
   263 	 *  This call cancels asyncronous query_imsi_from_username() function call.
   284 	 *  This call cancels asyncronous query_imsi_from_username() function call.
   264 	 *  AM must not complete query_imsi_from_username()
   285 	 *  AM must not complete query_imsi_from_username()
   265 	 *  with abs_eap_am_type_aka_c::complete_imsi_from_username() after
   286 	 *  with abs_eap_am_type_aka_c::complete_imsi_from_username() after
   266 	 *  cancel_imsi_from_username_query() call.
   287 	 *  cancel_imsi_from_username_query() call.
   267 	 */
   288 	 */
   268 	EAP_FUNC_IMPORT eap_status_e cancel_imsi_from_username_query();
   289 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e cancel_imsi_from_username_query();
   269 
   290 
   270 	/**
   291 	/**
   271 	 * The type_configure_read() function reads the configuration data identified
   292 	 * The type_configure_read() function reads the configuration data identified
   272 	 * by the field string of field_length bytes length. Adaptation module must direct
   293 	 * by the field string of field_length bytes length. Adaptation module must direct
   273 	 * the query to some persistent store.
   294 	 * the query to some persistent store.
   274 	 * @param field is generic configure string idenfying the required configure data.
   295 	 * @param field is generic configure string idenfying the required configure data.
   275 	 * @param field_length is length of the field string.
   296 	 * @param field_length is length of the field string.
   276 	 * @param data is pointer to existing eap_variable_data object.
   297 	 * @param data is pointer to existing eap_variable_data object.
   277 	 */
   298 	 */
   278 	EAP_FUNC_IMPORT eap_status_e type_configure_read(
   299 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e type_configure_read(
   279 		const eap_configuration_field_c * const field,
   300 		const eap_configuration_field_c * const field,
   280 		eap_variable_data_c * const data);
   301 		eap_variable_data_c * const data);
   281 
   302 
   282 	/**
   303 	/**
   283 	 * The type_configure_write() function writes the configuration data identified
   304 	 * The type_configure_write() function writes the configuration data identified
   285 	 * the action to some persistent store.
   306 	 * the action to some persistent store.
   286 	 * @param field is generic configure string idenfying the required configure data.
   307 	 * @param field is generic configure string idenfying the required configure data.
   287 	 * @param field_length is length of the field string.
   308 	 * @param field_length is length of the field string.
   288 	 * @param data is pointer to existing eap_variable_data object.
   309 	 * @param data is pointer to existing eap_variable_data object.
   289 	 */
   310 	 */
   290 	EAP_FUNC_IMPORT eap_status_e type_configure_write(
   311 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e type_configure_write(
   291 		const eap_configuration_field_c * const field,
   312 		const eap_configuration_field_c * const field,
   292 		eap_variable_data_c * const data);		
   313 		eap_variable_data_c * const data);		
   293 
   314 
   294 	EAP_FUNC_IMPORT void set_is_valid();
   315 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H void set_is_valid();
   295 
   316 
   296 	EAP_FUNC_IMPORT bool get_is_valid();
   317 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H bool get_is_valid();
   297 	
   318 	
   298 #if defined(__WINS__)
   319 #if defined(__WINS__)
   299 	
   320 	
   300 	EAP_FUNC_IMPORT eap_status_e query_SIM_imsi(
   321 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e query_SIM_imsi(
   301 		u8_t * const imsi, const u32_t max_length, u32_t * const imsi_length);
   322 		u8_t * const imsi, const u32_t max_length, u32_t * const imsi_length);
   302 		
   323 		
   303 #endif //#if defined(__WINS__)
   324 #endif //#if defined(__WINS__)
   304 	
   325 	
   305 	EAP_FUNC_IMPORT eap_status_e complete_AKA_imsi_L(
   326 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e complete_AKA_imsi_L(
   306 		const eap_variable_data_c * const IMSI,
   327 		const eap_variable_data_c * const IMSI,
   307 		const eap_status_e completion_status = eap_status_ok);
   328 		const eap_status_e completion_status = eap_status_ok);
   308 		
   329 		
   309 	EAP_FUNC_IMPORT eap_status_e complete_AKA_RES_L(
   330 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H eap_status_e complete_AKA_RES_L(
   310 		eap_variable_data_c * const aRES, 
   331 		eap_variable_data_c * const aRES, 
   311 		eap_variable_data_c * const aCK,
   332 		eap_variable_data_c * const aCK,
   312 		eap_variable_data_c * const aIK,
   333 		eap_variable_data_c * const aIK,
   313 		eap_variable_data_c * const aAUTS,
   334 		eap_variable_data_c * const aAUTS,
   314 		eap_status_e authenticationStatus = eap_status_ok,
   335 		eap_status_e authenticationStatus = eap_status_ok,
   320 	 * last full authentication time. If the difference is less than the
   341 	 * last full authentication time. If the difference is less than the
   321 	 * Maximum Session Validity Time, then session is valid, returns true.
   342 	 * Maximum Session Validity Time, then session is valid, returns true.
   322 	 * Otherwise returns false. 
   343 	 * Otherwise returns false. 
   323 	 * Full authentication should be done if the session is not valid.
   344 	 * Full authentication should be done if the session is not valid.
   324 	 */
   345 	 */
   325 	EAP_FUNC_IMPORT bool is_session_valid();
   346 	EAP_FUNC_VISIBILITY_EAP_AM_TYPE_AKA_SYMBIAN_H bool is_session_valid();
   326 
   347 
   327 	//--------------------------------------------------
   348 	//--------------------------------------------------
   328 protected:
   349 protected:
   329 	//--------------------------------------------------
   350 	//--------------------------------------------------
   330 
   351