From 08612ccb23bd3efd266e0c17d098fc250c6860b5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 3 Jun 2010 01:41:39 -0700 Subject: Add support for ASCII based WEP keys --- plugins/supplicant.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins/supplicant.c') diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 7323c94a..90a6c42f 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -1021,6 +1021,17 @@ static int set_network(struct supplicant_task *task, "wep_key0", DBUS_TYPE_BYTE, &key, size / 2); free(key); + } else if (size == 5 || size == 13) { + unsigned char *key = malloc(13); + int i; + if (key == NULL) + size = 0; + for (i = 0; i < size; i++) + key[i] = (unsigned char) passphrase[i]; + connman_dbus_dict_append_fixed_array(&dict, + "wep_key0", DBUS_TYPE_BYTE, + &key, size); + free(key); } else connman_dbus_dict_append_basic(&dict, "wep_key0", DBUS_TYPE_STRING, -- cgit v1.2.3