Hi all,

This set of patch adds some sanity check about the passphrase and WPS PIN.
The first patch interprets the "invalid message format" from wpa_s as an 
invalid key,
by this way we do not try several times a wrong passphrase.

The second patch checks the passphrase validity.
- a WPA Raw key will be accepted if it contains 64 hexdigit.
- a WPA Passphrase will be accepted if the length is between 8 and 63
- a WEP-KEY will be accepted if it contains 10 or 26 hexdigit.
- a "WEP Passphrase" will be accepted if it contains 5 or 13 characters.

In case of errors -ENOKEY will be returned.

The third patch avoids the connection attempt with invalid parameters, and 
replies immediatly an error to the agent.

The patch 4 adds the WPS arguments to the request_input_cb of service.c, the 
patch 5 introduces a function to set a WPS PIN if it contains 8 digits, in case 
of errors -ENOKEY will be returned as well. The patch 6 moves the code to set 
the WPS inputs from agent to request_input_cb. The patch number 7 removes the 
old way to set the WPS PIN.


Julien Massot (7):
  gsupplicant: Interpret "invalid message format" as invalid-key error
  service: Check the passphrase validity
  network: Avoids connection to a network with invalid key
  service: request_input_cb handle wps setting
  network: Add function to set the WPS PIN and check its validity
  service: Move setting of WPS input from agent to service.
  network: Do not set the WPS pin with connman_network_set_string

 gsupplicant/supplicant.c |   11 ++++-
 include/network.h        |    3 +-
 src/agent.c              |   45 ++++++++-------------
 src/connman.h            |   21 ++++++---
 src/network.c            |   38 +++++++++++++++--
 src/service.c            |  102 ++++++++++++++++++++++++++++++++++++++-------
 6 files changed, 160 insertions(+), 60 deletions(-)

--
1.7.5.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to