summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-06-03 01:41:39 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-06-03 01:41:39 -0700
commit08612ccb23bd3efd266e0c17d098fc250c6860b5 (patch)
treef7a111172c1694047500ffbb657136e1e5569d04 /plugins
parentf01ac17ed1493bc7011d95294b87c64f19339ed2 (diff)
downloadconnman-08612ccb23bd3efd266e0c17d098fc250c6860b5.tar.gz
connman-08612ccb23bd3efd266e0c17d098fc250c6860b5.tar.bz2
connman-08612ccb23bd3efd266e0c17d098fc250c6860b5.zip
Add support for ASCII based WEP keys
Diffstat (limited to 'plugins')
-rw-r--r--plugins/supplicant.c11
1 files changed, 11 insertions, 0 deletions
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,