[PATCH 0/4] Handle gsupplicant invalid key/passphrase

patrik.flykt at nokia.com patrik.flykt at nokia.com
Mon Jan 24 04:20:54 PST 2011

From: Patrik Flykt <patrik.flykt at nokia.com>


This patch set adds invalid key/passphrase detection in gsupplicant
AddNetwork and SelectNetwork D-Bus method call return handling. The patches
check for wpa_supplicant sending a D-Bus error in response to invalid
formatting of WPA-PSK and WEP keys.

If the error string is set in either of these calls, error result is set
for the given callback. Currently only invalid keys are explicitely
detected, other errors are indicated with -ECANCELED.

Errors for invalid keys are defined for service and network structures.

The wifi plugin checks against -ENOKEY, and sets the network struct error
accordingly. The network error is then forwarded to the corresponding service
struct, whereby the current key is unset and service marked as having

(A failed service will be reported normally through the Agent API, but this
functionality exists already).



Patrik Flykt (4):
  gsupplicant: Report AddNetwork and SelectNetwork errors to caller
  service: Add CONNMAN_SERVICE_ERROR_INVALID_KEY to service error enum
  network: Add CONNMAN_NETWORK_ERROR_INVALID_KEY for a network
  wifi: Check invalid key/passphrase in gsupplicant connect callback

 gsupplicant/supplicant.c |   33 +++++++++++++++++++++++++++++++++
 include/network.h        |    1 +
 include/service.h        |    1 +
 plugins/wifi.c           |   14 ++++++++++++--
 src/network.c            |   13 +++++++++++++
 src/service.c            |    7 +++++++
 6 files changed, 67 insertions(+), 2 deletions(-)


More information about the connman mailing list