diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-06-21 17:49:03 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-06-21 17:49:03 +0000 |
commit | 249a747c51efab55250ab6b57f1d8bad1584522c (patch) | |
tree | 9315d25ee4e7c5a3e64b516a88b984d90e270b06 /epan/crypt/airpdcap_user.h | |
parent | 1b8fccbc9df66a8d51ace0251bd00ab1463d4fe2 (diff) |
Be less restrictive about WEP key preferences. Use hex_str_to_bytes to
process WEP keys. Allow the "wep:" prefix for WEP keys even when
HAVE_AIRPDCAP isn't defined. Add a NULL pointer check to
hex_str_to_bytes(). Fixes bug 1584.
Fixup indentation.
svn path=/trunk/; revision=22151
Diffstat (limited to 'epan/crypt/airpdcap_user.h')
-rw-r--r-- | epan/crypt/airpdcap_user.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/epan/crypt/airpdcap_user.h b/epan/crypt/airpdcap_user.h index 0dccb8c975..04d90a4003 100644 --- a/epan/crypt/airpdcap_user.h +++ b/epan/crypt/airpdcap_user.h @@ -193,15 +193,31 @@ typedef struct _AIRPDCAP_KEYS_COLLECTION { /******************************************************************************/ /* Function prototype declarations */ -/* +/** * Returns the decryption_key_t struct given a string describing the key. - * Returns NULL if the key_string cannot be parsed. + * @param key_string [IN] Key string in one of the following formats: + * - 0102030405 (40/64-bit WEP) + * - 01:02:03:04:05 (40/64-bit WEP) + * - 0102030405060708090a0b0c0d (104/128-bit WEP) + * - 01:02:03:04:05:06:07:08:09:0a:0b:0c:0d (104/128-bit WEP) + * - wep:01020304... (WEP) + * - wep:01:02:03:04... (WEP) + * - wpa-pwd:MyPassword (WPA + plaintext password + "wildcard" SSID) + * - wpa-pwd:MyPassword:MySSID (WPA + plaintext password + specific SSID) + * - wpa-psk:01020304... (WPA + 256-bit raw key) + * @return A pointer to a freshly-g_malloc()ed decryption_key_t struct on + * success, or NULL on failure. + * @see get_key_string() */ decryption_key_t* parse_key_string(gchar* key_string); -/* - * Returns a newly allocated string representing the given decryption_key_t struct +/** + * Returns a newly allocated string representing the given decryption_key_t + * struct. + * @param dk [IN] Pointer to the key to be converted + * @return A g_malloc()ed string representation of the key + * @see parse_key_string() */ gchar* get_key_string(decryption_key_t* dk); |