aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crypt/airpdcap_system.h
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-26 21:54:59 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-26 21:54:59 +0000
commitbefcc3de22b3edba0d102c6fc3aa8afffc75eced (patch)
tree17aecf4b298c3e16c08653dc8bbf38d51b3f2e5f /epan/crypt/airpdcap_system.h
parent3cb87ddc0a79b17047331f91097e489469aff280 (diff)
Add support for "wildcard" WPA keys in the form "wpa:passphrase" (note
the lack of SSID). Wildcarding combines the passphrase with the last seen SSID and attempts decryption. The last-seen stack is only one element tall, which means it may get clobbered on busy and diverse networks. We can expand it if needed. Make internal functions static in airpdcap.c. Rearrange the AIRPDCAP_KEY_ITEM struct so that the passphrase and SSID don't get clobbered when we set our PSK. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20572 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/crypt/airpdcap_system.h')
-rw-r--r--epan/crypt/airpdcap_system.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/epan/crypt/airpdcap_system.h b/epan/crypt/airpdcap_system.h
index 00092be02e..96c0a46f99 100644
--- a/epan/crypt/airpdcap_system.h
+++ b/epan/crypt/airpdcap_system.h
@@ -148,6 +148,9 @@ typedef struct _AIRPDCAP_CONTEXT {
AIRPDCAP_KEY_ITEM keys[AIRPDCAP_MAX_KEYS_NR];
size_t keys_nr;
+ CHAR pkt_ssid[AIRPDCAP_WPA_SSID_MAX_LEN];
+ size_t pkt_ssid_len;
+
INT index;
INT first_free_index;
INT last_stored_index;
@@ -293,6 +296,25 @@ INT AirPDcapGetKeys(
AIRPDCAP_KEY_ITEM keys[],
const size_t keys_nr)
;
+
+/**
+ * Sets the "last seen" SSID. This allows us to pick up previous
+ * SSIDs and use them when "wildcard" passphrases are specified
+ * in the preferences.
+ * @param ctx [IN|OUT] pointer to a preallocated context structure
+ * @param pkt_ssid [IN] pointer to the packet's SSID
+ * @param pkt_ssid_len [IN] length of the packet's SSID
+ * @return
+ * AIRPDCAP_RET_SUCCESS: The key has been set.
+ * AIRPDCAP_RET_UNSUCCESS: The has not been set, e.g. the length was
+ * too long.
+ */
+INT AirPDcapSetLastSSID(
+ PAIRPDCAP_CONTEXT ctx,
+ CHAR *pkt_ssid,
+ size_t pkt_ssid_len)
+ ;
+
/**
* Initialize a context used to manage decryption and keys collection.
* @param ctx [IN|OUT] pointer to a preallocated context structure