]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Remove unused 802.1X attribute parsing and processing
authorJouni Malinen <j@w1.fi>
Sun, 2 Feb 2014 21:41:47 +0000 (23:41 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 4 Feb 2014 11:23:35 +0000 (13:23 +0200)
This is not really used in practice and there is no need to maintain
unsed code that would only print debug log entries.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/wps/wps_attr_parse.c
src/wps/wps_attr_parse.h
src/wps/wps_attr_process.c

index f4e2e3853914393a253e8b0452f10926f424a417..b04c222194c905129fa122e18616e2a6341928a5 100644 (file)
@@ -413,22 +413,6 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type,
                }
                attr->mac_addr = pos;
                break;
-       case ATTR_KEY_PROVIDED_AUTO:
-               if (len != 1) {
-                       wpa_printf(MSG_DEBUG, "WPS: Invalid Key Provided "
-                                  "Automatically length %u", len);
-                       return -1;
-               }
-               attr->key_prov_auto = pos;
-               break;
-       case ATTR_802_1X_ENABLED:
-               if (len != 1) {
-                       wpa_printf(MSG_DEBUG, "WPS: Invalid 802.1X Enabled "
-                                  "length %u", len);
-                       return -1;
-               }
-               attr->dot1x_enabled = pos;
-               break;
        case ATTR_SELECTED_REGISTRAR:
                if (len != 1) {
                        wpa_printf(MSG_DEBUG, "WPS: Invalid Selected Registrar"
@@ -500,14 +484,6 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type,
                attr->network_key = pos;
                attr->network_key_len = len;
                break;
-       case ATTR_EAP_TYPE:
-               attr->eap_type = pos;
-               attr->eap_type_len = len;
-               break;
-       case ATTR_EAP_IDENTITY:
-               attr->eap_identity = pos;
-               attr->eap_identity_len = len;
-               break;
        case ATTR_AP_SETUP_LOCKED:
                if (len != 1) {
                        wpa_printf(MSG_DEBUG, "WPS: Invalid AP Setup Locked "
index 88e51a4494455d1018b4e1bb1612690cccb0833f..eeb08d12d9a6f44d6cfcb7c668c92542333dda84 100644 (file)
@@ -47,8 +47,6 @@ struct wps_parse_attr {
        const u8 *network_idx; /* 1 octet */
        const u8 *network_key_idx; /* 1 octet */
        const u8 *mac_addr; /* ETH_ALEN (6) octets */
-       const u8 *key_prov_auto; /* 1 octet (Bool) */
-       const u8 *dot1x_enabled; /* 1 octet (Bool) */
        const u8 *selected_registrar; /* 1 octet (Bool) */
        const u8 *request_type; /* 1 octet */
        const u8 *response_type; /* 1 octet */
@@ -77,10 +75,6 @@ struct wps_parse_attr {
        size_t ssid_len;
        const u8 *network_key; /* <= 64 octets */
        size_t network_key_len;
-       const u8 *eap_type; /* <= 8 octets */
-       size_t eap_type_len;
-       const u8 *eap_identity; /* <= 64 octets */
-       size_t eap_identity_len;
        const u8 *authorized_macs; /* <= 30 octets */
        size_t authorized_macs_len;
        const u8 *sec_dev_type_list; /* <= 128 octets */
index b81f106e7710d2afed8bf5aca1c4dc5dbe9008f7..81cbc32e0ffccd6688a847a4229434f6bbe72adc 100644 (file)
@@ -207,57 +207,6 @@ static int wps_process_cred_mac_addr(struct wps_credential *cred,
 }
 
 
-static int wps_process_cred_eap_type(struct wps_credential *cred,
-                                    const u8 *eap_type, size_t eap_type_len)
-{
-       if (eap_type == NULL)
-               return 0; /* optional attribute */
-
-       wpa_hexdump(MSG_DEBUG, "WPS: EAP Type", eap_type, eap_type_len);
-
-       return 0;
-}
-
-
-static int wps_process_cred_eap_identity(struct wps_credential *cred,
-                                        const u8 *identity,
-                                        size_t identity_len)
-{
-       if (identity == NULL)
-               return 0; /* optional attribute */
-
-       wpa_hexdump_ascii(MSG_DEBUG, "WPS: EAP Identity",
-                         identity, identity_len);
-
-       return 0;
-}
-
-
-static int wps_process_cred_key_prov_auto(struct wps_credential *cred,
-                                         const u8 *key_prov_auto)
-{
-       if (key_prov_auto == NULL)
-               return 0; /* optional attribute */
-
-       wpa_printf(MSG_DEBUG, "WPS: Key Provided Automatically: %d",
-                  *key_prov_auto);
-
-       return 0;
-}
-
-
-static int wps_process_cred_802_1x_enabled(struct wps_credential *cred,
-                                          const u8 *dot1x_enabled)
-{
-       if (dot1x_enabled == NULL)
-               return 0; /* optional attribute */
-
-       wpa_printf(MSG_DEBUG, "WPS: 802.1X Enabled: %d", *dot1x_enabled);
-
-       return 0;
-}
-
-
 static int wps_process_cred_ap_channel(struct wps_credential *cred,
                                       const u8 *ap_channel)
 {
@@ -311,12 +260,6 @@ int wps_process_cred(struct wps_parse_attr *attr,
            wps_process_cred_network_key(cred, attr->network_key,
                                         attr->network_key_len) ||
            wps_process_cred_mac_addr(cred, attr->mac_addr) ||
-           wps_process_cred_eap_type(cred, attr->eap_type,
-                                     attr->eap_type_len) ||
-           wps_process_cred_eap_identity(cred, attr->eap_identity,
-                                         attr->eap_identity_len) ||
-           wps_process_cred_key_prov_auto(cred, attr->key_prov_auto) ||
-           wps_process_cred_802_1x_enabled(cred, attr->dot1x_enabled) ||
            wps_process_cred_ap_channel(cred, attr->ap_channel))
                return -1;