eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_wlan_authentication_symbian.cpp
changeset 49 43351a4f2da3
parent 34 ad1f037f1ac2
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: 94 %
    19 * %version: 95 %
    20 */
    20 */
    21 
    21 
    22 // This is enumeration of EAPOL source code.
    22 // This is enumeration of EAPOL source code.
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    24 	#undef EAP_FILE_NUMBER_ENUM
    24 	#undef EAP_FILE_NUMBER_ENUM
   586 		send_error_notification(eap_status_key_error);
   586 		send_error_notification(eap_status_key_error);
   587 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   587 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   588 		return EAP_STATUS_RETURN(m_am_tools, status);
   588 		return EAP_STATUS_RETURN(m_am_tools, status);
   589 	}
   589 	}
   590 
   590 
       
   591 	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
       
   592 	{
       
   593 		// Normally here is HASH of WPA pre-shared key, but when connection is Wi-fi Protected setup here is PIN or push button (00000000) key.
       
   594 		status = m_wpa_preshared_key_hash.set_copy_of_buffer(wpa_preshared_key);
       
   595 		if (status != eap_status_ok)
       
   596 		{
       
   597 			send_error_notification(eap_status_key_error);
       
   598 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   599 			return EAP_STATUS_RETURN(m_am_tools, status);
       
   600 		}
       
   601 
       
   602 		EAP_TRACE_DATA_DEBUG(
       
   603 			m_am_tools,
       
   604 			TRACE_FLAGS_DEFAULT,
       
   605 			(EAPL("new m_wpa_preshared_key_hash for WPS"),
       
   606 			m_wpa_preshared_key_hash.get_data(),
       
   607 			m_wpa_preshared_key_hash.get_data_length()));
       
   608 	}
       
   609 
       
   610     EAP_TRACE_DATA_DEBUG(
       
   611         m_am_tools,
       
   612         TRACE_FLAGS_DEFAULT,
       
   613         (EAPL("new m_SSID"),
       
   614         m_SSID.get_data(),
       
   615         m_SSID.get_data_length()));
       
   616 
       
   617     EAP_TRACE_DATA_DEBUG(
       
   618         m_am_tools,
       
   619         TRACE_FLAGS_DEFAULT,
       
   620         (EAPL("new m_wpa_preshared_key"),
       
   621         m_wpa_preshared_key.get_data(),
       
   622         m_wpa_preshared_key.get_data_length()));
       
   623 
   591 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   624 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   592 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
   625 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
   593 }
   626 }
   594 
   627 
   595 //--------------------------------------------------
   628 //--------------------------------------------------
   670 		 (m_is_client == true) ? "client": "server",
   703 		 (m_is_client == true) ? "client": "server",
   671 		 this,
   704 		 this,
   672 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
   705 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
   673 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::get_wlan_configuration()");
   706 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::get_wlan_configuration()");
   674 
   707 
       
   708 	// Normally here is HASH of WPA pre-shared key, but when connection is Wi-fi Protected setup here is PIN or push button (00000000) key.
   675 	eap_status_e status = wpa_preshared_key_hash->set_copy_of_buffer(&m_wpa_preshared_key_hash);
   709 	eap_status_e status = wpa_preshared_key_hash->set_copy_of_buffer(&m_wpa_preshared_key_hash);
   676 
   710 
   677 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   711 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   678 	return EAP_STATUS_RETURN(m_am_tools, status);
   712 	return EAP_STATUS_RETURN(m_am_tools, status);
   679 }
   713 }