eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h
branchRCL_3
changeset 19 c74b3d9f6b9e
parent 18 bad0cc58d154
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h	Tue Aug 31 15:16:37 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h	Wed Sep 01 12:23:57 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 112 %
+* %version: 86.1.2 %
 */
 
 #if !defined(_EAP_AM_TYPE_TLS_PEAP_SYMBIAN_H_)
@@ -33,8 +33,7 @@
 #include <unifiedcertstore.h>
 #include <mctwritablecertstore.h>
 #include <pkixcertchain.h>
-#include "eap_auth_notifier.h"
-
+#include "EapTlsPeapNotifierStructs.h"
 #include "EapTlsPeapUtils.h"
 #include <bigint.h>
 
@@ -49,12 +48,14 @@
 class CEapTlsPeapCertInterface;
 class eap_am_tools_symbian_c;
 class abs_tls_am_application_eap_fast_c;
-
-
+#if defined(USE_FAST_EAP_TYPE)
+class CEapFastActive;
+#endif
+class CEapTtlsPapActive;
 
 #ifdef USE_PAC_STORE
 class CPacStoreDatabase;
-class SInfoEntry;
+struct SInfoEntry;
 #endif
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
 class eap_file_config_c;
@@ -62,7 +63,6 @@
 
 const TInt KMaxLabelLength = 64;
 const TInt KMaxDatabaseTableName = 64;
-const TInt KOffsetCorrection = 1;
 
 #if defined(USE_FAST_EAP_TYPE)
 const char KEapFastPacProvisResultKey[] = "eap_am_type_tls_peap_symbian_c prov. result";
@@ -72,10 +72,8 @@
 
 /// This class is interface to adaptation module of EAP/TLS and PEAP.
 class EAP_EXPORT eap_am_type_tls_peap_symbian_c
-: public CActive
-, public eap_am_type_tls_peap_c
-, public abs_eap_base_timer_c
-, public MNotificationCallback
+: public CActive, public eap_am_type_tls_peap_c
+,public abs_eap_base_timer_c 
 {
 
 public:
@@ -87,12 +85,10 @@
     EEapFastPacProvisResultSuccess  /* 1 */  
     };
 #endif
-
 private: // data
+//--------------------------------------------------
 
-	//--------------------------------------------------
-
-	RFs m_session;
+	RDbs m_session;
 
 	RDbNamedDatabase m_database;
 
@@ -102,21 +98,17 @@
 		EHandlingManualIdentityQuery,     /* 1 */
 		EHandlingChainQuery,              /* 2 */
 		EHandlingCipherSuiteQuery,        /* 3 */
-    EHandlingDeviceSeedQuery,        /* 4 */
-#if defined(USE_FAST_EAP_TYPE)            /* 5 */
-		EHandlingNotifierQuery,           /* 6 */
-		EPasswordQuery,                   /* 7 */
-		EWrongPassword,                   /* 8 */
-		EFilePasswordQuery,               /* 9 */
-		EMasterkeyQuery,                  /* 10 */
-		EPasswordCancel,                  /* 11 */
-		EShowProvSuccesstNote,            /* 12 */
-		EShowProvNotSuccesstNote,         /* 13 */
-		ENotifierComplete,				/*14 */
+#if defined(USE_FAST_EAP_TYPE)            /* 4 */
+		EHandlingNotifierQuery,           /* 5 */
+		EPasswordQuery,                   /* 6 */
+		EWrongPassword,                   /* 7 */
+		EFilePasswordQuery,               /* 8 */
+		EMasterkeyQuery,                  /* 9 */
+		EPasswordCancel,                  /* 10 */
+		EShowProvSuccesstNote,            /* 11 */
+		EShowProvNotSuccesstNote,         /* 12 */
+		ENone                             /* 13 */
 #endif //#if defined(USE_FAST_EAP_TYPE)
-		EPapUserNameAndPassword, /* 15 */
-		EPapChallenge, /* 16 */
-		ENone                             /* 17 */
 		
 	};
 	
@@ -138,7 +130,9 @@
 
 #if defined(USE_FAST_EAP_TYPE)
 	abs_tls_am_application_eap_fast_c * m_tls_application;
-
+	CEapFastActive* iEapFastActiveWaitNote;
+	CEapFastActive* iEapFastActiveNotes;
+	
 	enum TAlterTableCmd
 	    {
 	    EAddColumn,
@@ -152,6 +146,11 @@
 
 	eap_type_value_e m_current_eap_type;
 
+	// These are the vendor-types for EAP type and tunneling EAP type.
+	// Valid for both expanded and non-expanded EAP types.
+	u32_t m_current_eap_vendor_type;
+	u32_t m_tunneling_vendor_type;
+
 	TBufC<KMaxDatabaseTableName> m_db_table_name;
 	TBufC<KMaxDatabaseTableName> m_db_user_cert_table_name;
 	TBufC<KMaxDatabaseTableName> m_db_ca_cert_table_name;
@@ -159,8 +158,8 @@
 	TBufC<KMaxDatabaseTableName> m_db_name;
 
 #if defined (USE_FAST_EAP_TYPE)	
-	TBufC<KMaxDatabaseTableName> m_db_fast_special_table_name;
-	RPointerArray<SInfoEntry> m_info_array;
+TBufC<KMaxDatabaseTableName> m_db_fast_special_table_name;
+RArray<SInfoEntry> m_info_array;
 #endif	
 
 	u32_t m_max_count_of_session_resumes;
@@ -175,7 +174,7 @@
 
 	CEapTlsPeapCertInterface* m_cert_if;	
 
-	EapCertificateEntry m_own_certificate_info;
+	SCertEntry m_own_certificate_info;
 
 	eap_am_network_id_c m_receive_network_id;
 
@@ -183,11 +182,11 @@
 
 	TKeyIdentifier m_subject_key_id;
 
-	RPointerArray<EapCertificateEntry> m_allowed_ca_certs;
+	RArray<SCertEntry> m_allowed_ca_certs;
 
-	RPointerArray<EapCertificateEntry> m_allowed_user_certs;
+	RArray<SCertEntry> m_allowed_user_certs;
 	
-	RPointerArray<EapCertificateEntry> m_allowed_server_certs;
+	RArray<SCertEntry> m_allowed_server_certs;
 
 	RArray<TUint> m_allowed_cipher_suites;
 
@@ -199,11 +198,20 @@
 	
 	bool m_shutdown_was_called;
 
+#ifdef USE_EAP_EXPANDED_TYPES
+
 	/// Tunneling EAP configuration data from EAP database.
-	RPointerArray<TEapExpandedType> m_enabled_tunneling_exp_eap_array;
-	RPointerArray<TEapExpandedType> m_disabled_tunneling_exp_eap_array;
+	RExpandedEapTypePtrArray m_enabled_tunneling_exp_eap_array;
+	RExpandedEapTypePtrArray m_disabled_tunneling_exp_eap_array;
+
+#else
 
+	/// Tunneling EAP configuration data from EAP database.
+	TEapArray m_iap_eap_array;
 
+#endif  // #ifdef USE_EAP_EXPANDED_TYPES
+	TIdentityInfo* m_identity_info; 
+	
 	TBuf8<4> m_selector_output;
 
 	eap_type_value_e m_tunneled_type;
@@ -222,8 +230,6 @@
 	
 	bool m_tls_peap_server_authenticates_client_policy_flag;
 
-	bool m_use_automatic_ca_certificate;
-
 	/// This flag prevents double configuration. This can happen when 
 	/// this class implements many interfaces.
 	bool m_configured;
@@ -258,16 +264,18 @@
 	
 	bool m_serv_unauth_prov_mode;
 	bool m_serv_auth_prov_mode;
-#endif
 	
-
+	// For FAST notifiers
+	RNotifier m_notifier;	
+	bool m_is_notifier_connected; // Tells if notifier server is connected.
 
-	CEapAuthNotifier::TEapDialogInfo * m_notifier_data_to_user;
+	TEapFastNotifierStruct * m_notifier_data_to_user;
+	TPckg<TEapFastNotifierStruct> * m_notifier_data_pckg_to_user;	
 
-	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_notifier_data_pckg_to_user;
+	TEapFastNotifierStruct * m_notifier_data_from_user;
+	TPckg<TEapFastNotifierStruct> * m_notifier_data_pckg_from_user;	
 
     /* For MMETEL */
-#if defined(USE_FAST_EAP_TYPE)
     
 	// ETel connection.
     RTelServer iServer;
@@ -279,7 +287,6 @@
     	
     // Tells if MMETEL is connected already or not.
     TBool iMMETELConnectionStatus;    
-
     TBool m_completed_with_zero;   
 	TBool m_verificationStatus;
 
@@ -287,6 +294,7 @@
 	EEapFastNotifierUserAction m_userAction;
 	eap_pac_store_data_type_e m_pacStoreDataRefType;
 	eap_fast_pac_store_data_c m_data_reference;
+	TBool m_notifier_complete;
 	eap_variable_data_c m_userResponse;
 	eap_fast_pac_store_pending_operation_e m_pending_operation;
 	TInt m_both_completed;
@@ -308,7 +316,6 @@
 	eap_fast_initialize_pac_store_completion_e iCompletion;
 
 #endif //#if defined(USE_FAST_EAP_TYPE)
-	TBool m_notifier_complete;
 
 #ifdef USE_PAC_STORE
 	CPacStoreDatabase * iPacStoreDb;
@@ -331,16 +338,7 @@
 	* Provides asynch services used by the caller such as
     * query for TTLS-PAP user name and password.
     */
-
- //   eap_am_type_tls_peap_symbian_c* iCaller;
-    
-    eap_variable_data_c* iPacStoreDeviceSeed;
-
-#ifdef USE_PAC_STORE
-#endif
-
-	CEapAuthNotifier* iEapAuthNotifier;
-
+	CEapTtlsPapActive* iEapTtlsPapActive;
 
 	
 //--------------------------------------------------
@@ -421,6 +419,10 @@
 
 	void send_error_notification(const eap_status_e error);
 
+	eap_status_e show_certificate_selection_dialog();
+
+	eap_status_e show_manual_identity_dialog();
+
 	void ResetSessionIdL();
 	
 	/**
@@ -458,7 +460,8 @@
 		const eap_fast_pac_store_pending_operation_e in_pending_operation,
 		EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references_and_data_blocks);
 		
-
+	eap_status_e ShowNotifierItemAndGetResponse(
+		EEapFastNotifierUiItem aNotifierUiItem, TBool aSetActive );
 
 	eap_status_e RemoveIAPReference();
 
@@ -470,6 +473,8 @@
 	
 	eap_status_e CompleteFilePasswordQueryL();
 	
+	eap_status_e CompleteNotifierL();
+		
 	eap_status_e CompleteFilePasswordQuery();
 	
 	eap_status_e FinalCompleteReadPACStoreDataL(eap_status_e status);
@@ -557,23 +562,7 @@
 		const TInt64& aInMaxSessionTime,
 		const TInt64& aInLastFullAuthTime );
 	
-#ifdef USE_FAST_EAP_TYPE    
-    TInt CreateMMETelConnectionL();
-
-    void DisconnectMMETel();    
-
-    eap_status_e CreateDeviceSeedAsync();
-    
-    void CompleteCreateDeviceSeedL( TInt aStatus );
-#endif
 	
-	eap_status_e select_cipher_suite(
-		const bool select_all_cipher_suites,
-		const tls_cipher_suites_e test_cipher_suite,
-		const TAlgorithmId testcertAlgorithm,
-		const TAlgorithmId certAlgorithm,
-		eap_array_c<u16_t> * cipher_suites);
-
 //--------------------------------------------------
 protected: // methods
 //--------------------------------------------------
@@ -613,7 +602,7 @@
 
 	EAP_FUNC_IMPORT virtual ~eap_am_type_tls_peap_symbian_c();
 
-	EAP_FUNC_IMPORT eap_status_e shutdown();
+	EAP_FUNC_EXPORT eap_status_e shutdown();
 
 	EAP_FUNC_IMPORT void set_is_valid();
 
@@ -827,9 +816,9 @@
 	eap_status_e complete_read_ca_certificate(
 		const RPointerArray<CX509Certificate>& aCertChain, eap_status_e aStatus);
 
-	void complete_validate_chain(const CPKIXValidationResult * const aValidationResult, const eap_status_e aStatus);
+	void complete_validate_chain(CPKIXValidationResult& aValidationResult, eap_status_e aStatus);
 
-	void complete_get_matching_certificates(RPointerArray<EapCertificateEntry>& aMatchingCerts, eap_status_e aStatus);
+	void complete_get_matching_certificates(CArrayFixFlat<SCertEntry>& aMatchingCerts, eap_status_e aStatus);
 
 	void complete_sign(const RInteger& aR, const RInteger& aS, eap_status_e aStatus);
 
@@ -1027,12 +1016,7 @@
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
  	eap_status_e ReadFileConfig();
 #endif
-
-#endif 
-
-	EAP_FUNC_IMPORT void DlgComplete( TInt aStatus );
-
-	
+#endif 	
 }; // class eap_am_type_tls_peap_symbian_c