forked from osmocom/wireshark
In packet-ieee802.11.c, fix a serious preference bug introduced in the
last checkin. In airpcap.c, appease the toolbar code by returning a lower-case, non-separated WEP key. svn path=/trunk/; revision=22152
This commit is contained in:
parent
249a747c51
commit
7efcc33a1e
|
@ -1353,13 +1353,16 @@ parse_key_string(gchar* input_string)
|
|||
key_ba = g_byte_array_new();
|
||||
res = hex_str_to_bytes(first_nibble, key_ba, FALSE);
|
||||
|
||||
if (res) {
|
||||
if (res && key_ba->len > 0) {
|
||||
/* Key is correct! It was probably an 'old style' WEP key */
|
||||
/* Create the decryption_key_t structure, fill it and return it*/
|
||||
dk = g_malloc(sizeof(decryption_key_t));
|
||||
|
||||
dk->type = AIRPDCAP_KEY_TYPE_WEP;
|
||||
dk->key = g_string_new(input_string);
|
||||
/* XXX - The current key handling code in the GUI requires
|
||||
* no separators and lower case */
|
||||
dk->key = g_string_new(bytes_to_str(key_ba->data, key_ba->len));
|
||||
g_string_down(dk->key);
|
||||
dk->bits = key_ba->len * 8;
|
||||
dk->ssid = NULL;
|
||||
|
||||
|
|
|
@ -10092,17 +10092,17 @@ proto_register_ieee80211 (void)
|
|||
g_string_sprintf(key_title, "Key #%d", i + 1);
|
||||
/* Davide Schiera (2006-11-26): modified keys input tooltip */
|
||||
g_string_sprintf(key_desc,
|
||||
"Key #%d string can be:\n"
|
||||
" <wep hexadecimal key>;\n"
|
||||
" wep:<wep hexadecimal key>;\n"
|
||||
" wpa-pwd:<passphrase>[:<ssid>];\n"
|
||||
"Key #%d string can be:"
|
||||
" <wep hexadecimal key>;"
|
||||
" wep:<wep hexadecimal key>;"
|
||||
" wpa-pwd:<passphrase>[:<ssid>];"
|
||||
" wpa-psk:<wpa hexadecimal key>", i + 1);
|
||||
#else
|
||||
g_string_sprintf(key_name, "wep_key%d", i + 1);
|
||||
g_string_sprintf(key_title, "WEP key #%d", i + 1);
|
||||
g_string_sprintf(key_desc, "WEP key #%d can be:\n"
|
||||
" <wep hexadecimal key>;\n"
|
||||
" wep:<wep hexadecimal key>\n", i + 1);
|
||||
g_string_sprintf(key_desc, "WEP key #%d can be:"
|
||||
" <wep hexadecimal key>;"
|
||||
" wep:<wep hexadecimal key>", i + 1);
|
||||
#endif
|
||||
|
||||
prefs_register_string_preference(wlan_module, key_name->str,
|
||||
|
|
Loading…
Reference in New Issue