aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crypt
AgeCommit message (Collapse)AuthorFilesLines
2009-04-03Make some lengths size_t's.gerald2-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27942 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-11More Win64 fixes.gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27707 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-16Removed a "statement not reached" warning.stig1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26478 f5534014-38df-0310-8fa8-9805f1628bb7
2008-09-02Fetch the key length using pntohs. Initialize and check its length.gerald1-5/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26115 f5534014-38df-0310-8fa8-9805f1628bb7
2008-09-02Fix a few Emacs "file variables" to have "safe" values.wmeier1-1/+1
That is: indent-tabs-mode: tabs --> indent-tabs-mode: t Also: fix a typo: set-tabs-mode --> indent-tabs-mode git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26113 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-25Add another buffer length check to group key decryption.gerald1-0/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26071 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-25Fix a couple of crashes in WPA group key decryption.gerald2-0/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26070 f5534014-38df-0310-8fa8-9805f1628bb7
2008-07-30Add WPA group key decryption from Brian Stormont, via bug 1420:gerald6-24/+757
Although this patch successfully recognizes group keys and decrypts packets properly using the group key, there is a limitation. If an AP is using key rotation, clicking on individual packets in a trace may not properly decrypt a packet encrypted with a group key. This is because the current structure used in Wireshark only supports one active unicast and one active group key. If a new key has been seen, but you are looking at a packet encrypted with an older key, it will not decrypt. The summary lines, however, do show the packets properly decrypted. I've written up a much longer and more detailed explanation in a comment in the code, along with a proposed idea for a solution, plus a clunky work-around in the GUI when using the current code. I also suspect there might still be a problem with decrypting TKIP groups keys that are sent using WPA2 authentication. In the most common operation, if you are using WPA2, you'll also be using AES keys. It's not a common AP configuration to use WPA2 with TKIP. In fact, most APs don't seem to support it. Since it is an uncommon setup, I haven't put aside the time to test this patch against such an AP. I do have access to an AP that supports this, so when I have the time I'll test it and if needed, will submit another patch to handle that odd-ball condition. From me: Remove the decrypt element of s_rijndael_ctx (which was unused, as indicated in the comments). Preserve the GPL licensing text in several files (which the patch shouldn't have removed). Remove changes that added whitespace. Convert C++-style comments to C-style. Update to include recent SVN changes (e.g. renaming variables named "index"). Remove extraneous printf's. Define DEBUG_DUMP in airpdcap_debug.h. Comment out some instances of DEBUG_DUMP. Change malloc/free to g_malloc/g_free. Use g_memdup instead of allocating and copying. Use gint16 instead of INT16 in airpdcap_rijndael.c. Add Brian to AUTHORS. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25879 f5534014-38df-0310-8fa8-9805f1628bb7
2008-07-02Add Makefile.common files for epan/dfilter and epan/ftypes.guy1-0/+4
Add checkapi rules to Makefile.am files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25656 f5534014-38df-0310-8fa8-9805f1628bb7
2008-07-01Put printf into a separate "termoutput" API group. For most files,guy1-1/+1
check for it - but not for TShark plugins, as they are expected to print to the standard output. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25653 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-24Fix another variable named "index".guy1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25581 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-23Rename a local variable in a macro to avoid collisions with regularguy1-4/+4
variables. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25553 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-23Rename a variable to avoid collisions with the old V7 index() function,guy1-4/+4
still declared by <string.h> on some platforms (at least the way we compile, with all sorts of non-ANSI C/non-POSIX stuff added). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25551 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-23Fix some of the Errors/warnings detected by checkapi.etxrab2-1/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25368 f5534014-38df-0310-8fa8-9805f1628bb7
2008-04-09Remove:etxrab1-3/+0
#ifdef NEED_G_ASCII_STRCASECMP_H #include "g_ascii_strcasecmp.h" #endif git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24859 f5534014-38df-0310-8fa8-9805f1628bb7
2008-04-07- Remove GLIB1 codesfisher1-1/+0
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION - Remove ws_strsplit files because we no longer need to borrow GLIB2's g_strsplit code for the no longer supported GLIB1 builds git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24829 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-11If we haven't found a handshake packet, say so.gerald1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24605 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-10Change the BSD-licensed written by CACE to BSD+GPL.gerald9-0/+36
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24599 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-05Move the contents of AirPDcapCleanKeys() into AirPDcapInitContext()gerald2-38/+14
and call AirPDcapInitContext() where we were previously calling AirPDcapCleanKeys(). If we're resetting our keys, we should reset our SA list and other associated data as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24562 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-28we must include config.h or else NEED_G_ASCII_STRCASECMP_H will never be sahlberg1-1/+5
defined we must also include g_ascii_strcasecmp.h from the parent directory git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23634 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-27strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delendaguy1-3/+7
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our own versions if they're missing from GLib (as is the case with GLib 1.x). In the code to build the list of named fields for Diameter, don't use g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping in the hash function and use g_ascii_strcasecmp() in the compare function. We do this because there is no guarantee that toupper(), tolower(), and functions that use them will, for example, map between "I" and "i" in all locales; in Turkish locales, for example, there are, in both upper case and lower case, versions of "i" with and without a dot, and the upper-case version of "i" is "I"-with-a-dot and the lower-case version of "I" is "i"-without-a-dot. This causes strings that should match not to match. This finishes fixing bug 2010 - an earlier checkin prevented the crash (as there are other ways to produce the same crash, e.g. a bogus dictionary.xml file), but didn't fix the case-insensitive string matching. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23623 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-31From Christopher McKenzie: Zero out our SAs before we use them.gerald2-22/+8
Remove an unneeded for loop in AirPDcapCleanKeys(), and make it static. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23314 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-16From tmiller@hcjbtech.org : Spelling error on GDS DB protocol dissector: ↵sake3-3/+3
"Buffer lenght:" (recursively grepped through the source and corrected all occurences, even the ones just in comments) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23211 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-27Make the WPA passphrase a percent-escaped string. Constify and GLib-izegerald1-9/+16
some variables. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22210 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-23A recent checkin broke wpa-psk keys; fix it.gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22169 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-21In packet-ieee802.11.c, fix a serious preference bug introduced in thegerald1-2/+5
last checkin. In airpcap.c, appease the toolbar code by returning a lower-case, non-separated WEP key. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22152 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-21Be less restrictive about WEP key preferences. Use hex_str_to_bytes togerald2-254/+148
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22151 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-18Be a little less picky about EAPOL packet lengths. Someone sent in agerald1-2/+2
capture that has extra data in the 4th handshake message. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22138 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-14The 802.11 dissector calculates the header size, so pass that value togerald4-117/+71
the WEP/WPA decryption code instead of re-calculating it. Fixes bug 1639. Remove fcsPresent, radiotapPresent, and associated code from airpdcap.c since they were always FALSE. Glib-ize some data types. Fixup white space. Update the release notes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22104 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-03(Minor) Use _WIN32 (instead of WIN32) like the rest of Wireshark wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22030 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-20The fix for ad-hoc WEP decryption in r21814 broke WPA. Replace it withgerald3-1157/+1185
a better fix. Clean up whitespace while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21847 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-17Try WEP decryption before WPA. This keeps us from returninggerald1-113/+110
prematurely if we have an IBSS frame. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21814 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Need to include <epan/pint.h> to get pletohl() defined.guy1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21544 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23byteReverse assumes its argument is aligned on a 32-bit boundary; makeguy1-10/+9
it a pointer to a guint32. Also, use pletohl() to fetch a 32-bit little-endian quantity. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21542 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23The "in" array in an MD5 context is expected to be aligned on a 4-byteguy1-1/+1
boundary; make it an array of 16 guint32's rather than 64 guint8's, to ensure that, and add now-necessary casts and remove now-unnecessary casts. (Missed on the previous checkin.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21541 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23The "in" array in an MD5 context is expected to be aligned on a 4-byteguy1-11/+11
boundary; make it an array of 16 guint32's rather than 64 guint8's, to ensure that, and add now-necessary casts and remove now-unnecessary casts. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21540 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Get rid of no-longer-needed, and warning-generated, casts.guy1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21536 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Make Mk16_le() work on both big-endian and little-endian processors andguy1-3/+2
on processors that don't support unaligned loads - just use pletohs(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21534 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Don't assume byte pointers can be safely cast to more aligned pointers;guy1-9/+6
the compiler now warns of that. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21530 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Don't assume a pointer to UCHAR is necessarily aligned; that nowguy1-2/+2
generates a warning. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21528 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22Get rid of some const warnings.guy1-14/+15
Use the "pnto" macros to fetch 16-bit quantities from a buffer - not only do they have the right casts to avoid const warnings, they also work even on platforms (such as SPARC) where you can't dereference unaligned pointers without a trap. Similarly, compare a possibly-unaligned (we make no alignment guarantees in Wireshark) 16-bit quantity against 0 a byte at a time. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21507 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22Check the GLib version number, not the GTK+ version number; it's GLib weguy1-1/+1
care about, and this code doesn't use GTK+, so it doesn't include any GTK+ headers and therefore doesn't get the GTK+ version number defined. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21506 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22GString.len has changed signednedd between gtk1 and gtk2sahlberg1-2/+5
this will hopefully again compile under both gtk1 and 2 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21499 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22Fix a signedness warning.jmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21497 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22fix the sign of a variable to prevent a singed/unsigned warning during sahlberg1-1/+1
compiling git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21494 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-14delete Td4 as it is used only in rijndaelDecrypt and rijndaelDecryptRound notstandel1-67/+0
present in the wireshark code git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21429 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-29- Add Makefile.common to EXTRA_DIST (spotted by Christopher Maynard)jmayer1-2/+3
- Replaced spaces at beginning of line by tab git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21267 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-26Don't #define bzero and bcopy to be memset and memcpy on Windows, just use ↵morriss1-9/+4
memset and memcpy instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21201 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-23From Sebastien Tandel:sfisher1-1/+1
(Temporarily disable the warnings as errors default on Unix to get to get the buildbots and people with gcc40 going again until those additional warnings gcc40 generates can be fixed-I'm working on it ASAP) Patch for configure.in which disables by default the treatment of warnings as errors. It can be enabled with './configure --with-warnings-as-errors'. The macro will test first if GCC is present. If it's the case, HAVE_WARNINGS_AS_ERRORS is defined. All the USING_GCC have been replaced by HAVE_WARNINGS_AS_ERRORS. With this switch, people won't suffer from unexpected warnings when downloading svn sources during the transition time ;) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21153 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-22Add -Werror for gcc to a few more directories and fix a few warningssfisher2-28/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21129 f5534014-38df-0310-8fa8-9805f1628bb7