Revision: 201029 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 11:40:48 +0300
branchRCL_3
changeset 16 5fb7af913dfd
parent 14 13838cf40350
child 17 a828660c511c
Revision: 201029 Kit: 201033
wlan_bearer/wlandbif_cd/src/wdbifwlansettings.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_types.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_iap_data.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_roam.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools_parser.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/genscanlist.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp
--- a/wlan_bearer/wlandbif_cd/src/wdbifwlansettings.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlandbif_cd/src/wdbifwlansettings.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.1.1 %
+* %version: 14 %
 */
 
 //  INCLUDE FILES
@@ -167,7 +167,13 @@
         ReadWepKeysL(aSettings);           
         TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL, Wep keys succesfully read")));
         }
-    else if( aSettings.SecurityMode > Wep)
+    else if( aSettings.SecurityMode == Wlan8021x )
+        {
+        aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength));
+        TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WPAKeyLength: %d"),
+            aSettings.WPAKeyLength));
+        }
+    else if( aSettings.SecurityMode > Wlan8021x )
         {
         aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength));
         TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WPAKeyLength: %d"),
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_types.h	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_types.h	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 99 %
+* %version: 100 %
 */
 
 #ifndef CORE_TYPES_H
@@ -189,7 +189,9 @@
     /** Use Wi-Fi Protected Setup, keys are negotiated by EAPOL. */
     core_security_mode_protected_setup,
     /** Use WAPI, keys are negotiated by EAPOL. */
-    core_security_mode_wapi
+    core_security_mode_wapi,
+    /** Use EAP authentication without encryption. */
+    core_security_mode_802dot1x_unencrypted
     } core_security_mode_e;
 
 /**
@@ -2024,7 +2026,8 @@
     wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam,
     wlan_eapol_if_eapol_key_authentication_type_wfa_sc,
     wlan_eapol_if_eapol_key_authentication_type_wapi_psk,
-    wlan_eapol_if_eapol_key_authentication_type_wapi
+    wlan_eapol_if_eapol_key_authentication_type_wapi,
+    wlan_eapol_if_eapol_key_authentication_type_802_1x_unencrypted
     } wlan_eapol_if_eapol_key_authentication_type_e;
 
 typedef enum _wlan_eapol_if_eapol_key_type_e
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_iap_data.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_iap_data.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14.1.1 %
+* %version: 16 %
 */
 
 #include "core_iap_data.h"
@@ -193,7 +193,8 @@
     if ( iap_data_m.security_mode == core_security_mode_802dot1x ||
         iap_data_m.security_mode == core_security_mode_wpa ||
         iap_data_m.security_mode == core_security_mode_wpa2only ||
-        iap_data_m.security_mode == core_security_mode_protected_setup )
+        iap_data_m.security_mode == core_security_mode_protected_setup ||
+        iap_data_m.security_mode == core_security_mode_802dot1x_unencrypted )
         {
         return true_t;
         }
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_roam.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_roam.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 76.1.5 %
+* %version: 78 %
 */
 
 #include "core_operation_roam.h"
@@ -855,7 +855,9 @@
         case core_security_mode_allow_unsecure:
             {
             break;
-            }            
+            }   
+        case core_security_mode_802dot1x_unencrypted:
+            /** Falls through on purpose. */
         case core_security_mode_802dot1x:
             {
             if ( request_status == core_error_eapol_total_failure ||
@@ -1020,7 +1022,8 @@
         eap_error );
  
     core_connect_status_e status( core_connect_wpa_eap_failure );
-    if ( security_mode == core_security_mode_802dot1x )
+    if ( security_mode == core_security_mode_802dot1x ||
+         security_mode == core_security_mode_802dot1x_unencrypted )
         {
         status = core_connect_802_1x_failure;
         }
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59 %
+* %version: 61.1.1 %
 */
 
 #include "core_sub_operation_wpa_connect.h"
@@ -311,6 +311,14 @@
                     encryption_mode = core_encryption_mode_wpi;
                     break;                    
                     }
+                case wlan_eapol_if_eapol_key_authentication_type_802_1x_unencrypted:
+                    {
+                    DEBUG( "core_sub_operation_wpa_connect_c::next_state() - using key management core_key_management_none" );
+                    DEBUG( "core_sub_operation_wpa_connect_c::next_state() - using encryption mode core_encryption_mode_disabled" );
+                    key_management = core_key_management_none;
+                    encryption_mode = core_encryption_mode_disabled;
+                    break;                    
+                    }
                 default:
                     {
                     DEBUG( "core_sub_operation_wpa_connect_c::next_state() - unknown authentication type" );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -484,8 +484,8 @@
         DEBUG( "core_tools_c::eap_authentication_type() - wlan_eapol_if_eapol_key_authentication_type_802_1x" );
         return wlan_eapol_if_eapol_key_authentication_type_802_1x;
         }
-    else if( mode == core_security_mode_802dot1x &&
-             ap_data.key_management_suites() & core_key_management_wpx_fast_roam )
+    else if( (mode == core_security_mode_802dot1x || core_security_mode_802dot1x_unencrypted) &&
+            (ap_data.key_management_suites() & core_key_management_wpx_fast_roam) )
         {
         DEBUG( "core_tools_c::eap_authentication_type() - wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam" );
         return wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam;
@@ -495,6 +495,21 @@
         DEBUG( "core_tools_c::eap_authentication_type() - wlan_eapol_if_eapol_key_authentication_type_wfa_sc" );
         return wlan_eapol_if_eapol_key_authentication_type_wfa_sc;
         }
+    if( mode == core_security_mode_802dot1x_unencrypted &&
+         !ap_data.is_rsn_ie_present() &&
+         !ap_data.is_wpa_ie_present() )
+        {
+        if( !ap_data.is_privacy_enabled() )
+            {
+            DEBUG( "core_tools_c::eap_authentication_type() - wlan_eapol_if_eapol_key_authentication_type_802_1x_unencrypted" );
+            return wlan_eapol_if_eapol_key_authentication_type_802_1x_unencrypted;
+            }
+        else
+            {
+            DEBUG( "core_tools_c::eap_authentication_type() - wlan_eapol_if_eapol_key_authentication_type_802_1x" );
+            return wlan_eapol_if_eapol_key_authentication_type_802_1x;                
+            }
+        }
     else if( iap_data.is_eap_used() )
         {
         if( ap_data.is_rsn_ie_present() )
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools_parser.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_tools_parser.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 35 %
+* %version: 37 %
 */
 
 #include "core_tools_parser.h"
@@ -146,6 +146,8 @@
                 }
 
             break;
+        case core_security_mode_802dot1x_unencrypted:
+            /** Falls through on purpose. */
         case core_security_mode_802dot1x:
             /**
              * Check WPX requirements.
@@ -373,6 +375,7 @@
 
             break;
             }
+
         }
 
     DEBUG( "core_tools_parser_c::is_ap_compatible_with_iap() - OK" );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/genscanlist.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/genscanlist.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -28,11 +28,15 @@
 const u8_t IE_OFFSET_LENGTH = 1;
 /** The number of mandatory IEs. */
 const u8_t MANDATORY_IE_LIST_SIZE = 3;
-/** Array element IDs of mandatory IEs. */
-const u8_t MANDATORY_IE_LIST[] =
-    { 0,     // SSID
-      1,     // Supported Rates
-      3 };   // DS
+/** Array of mandatory IEs and their minimum and maximum lengths. */
+const u8_t MANDATORY_IE_LIST[][3] =
+    { { 0, 0, 32 },     // SSID
+      { 1, 1, 255 },    // Supported Rates
+      { 3, 1, 255 } };  // DS
+/** Indexes for the IE array. */
+const u8_t MANDATORY_IE_ID = 0;
+const u8_t MANDATORY_IE_MIN_LENGTH = 1;
+const u8_t MANDATORY_IE_MAX_LENGTH = 2;
 
 /** Defining this enables memory allocation related traces. */
 //#define SCANLIST_DEEP_DEBUG 1
@@ -246,13 +250,18 @@
             {
             if ( current_ie < data + size )
                 { /** Still searching... */
-                if ( current_ie[IE_OFFSET_ELEMENT_ID] == MANDATORY_IE_LIST[i] )
+                if ( current_ie[IE_OFFSET_ELEMENT_ID] == MANDATORY_IE_LIST[i][MANDATORY_IE_ID] &&
+                    current_ie[IE_OFFSET_LENGTH] >= MANDATORY_IE_LIST[i][MANDATORY_IE_MIN_LENGTH] &&
+                    current_ie[IE_OFFSET_LENGTH] <= MANDATORY_IE_LIST[i][MANDATORY_IE_MAX_LENGTH] )
                     { /** We have a match! Lets find out the next one. */
                     is_found = true_t;
                     }
                 }
             else
                 { /** The IE was not found. */
+                DEBUG1( "ScanList::CheckData() - Element ID %u not found, ignoring frame",
+                    MANDATORY_IE_LIST[i][MANDATORY_IE_ID] );
+
                 return false_t;
                 }
             }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp	Mon Jun 21 17:43:00 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp	Thu Aug 19 11:40:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86.1.1 %
+* %version: 86.1.2 %
 */
 
 #include <in_sock.h>
@@ -770,7 +770,14 @@
             aCoreSettings.security_mode = core_security_mode_wep;
             break;
         case Wlan8021x:
-            aCoreSettings.security_mode = core_security_mode_802dot1x;
+            if( aAmSettings.WPAKeyLength == 1 )
+                {
+                aCoreSettings.security_mode = core_security_mode_802dot1x_unencrypted;
+                }
+            else
+                {
+                aCoreSettings.security_mode = core_security_mode_802dot1x;
+                }
             break;
         case Wpa:
             aCoreSettings.security_mode = core_security_mode_wpa;