Commit Graph

50 Commits

Author SHA1 Message Date
Guy Harris 877db595ff Don't assume byte pointers can be safely cast to more aligned pointers;
the compiler now warns of that.

svn path=/trunk/; revision=21530
2007-04-23 17:33:29 +00:00
Guy Harris 552fff182e Don't assume a pointer to UCHAR is necessarily aligned; that now
generates a warning.

svn path=/trunk/; revision=21528
2007-04-23 16:41:31 +00:00
Guy Harris 065be642f4 Get rid of some const warnings.
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.

svn path=/trunk/; revision=21507
2007-04-22 18:26:45 +00:00
Guy Harris 6327554e6c Check the GLib version number, not the GTK+ version number; it's GLib we
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.

svn path=/trunk/; revision=21506
2007-04-22 18:04:52 +00:00
Ronnie Sahlberg 7a97135752 GString.len has changed signednedd between gtk1 and gtk2
this will hopefully again compile under both gtk1 and 2


svn path=/trunk/; revision=21499
2007-04-22 15:22:53 +00:00
Jörg Mayer 7b20d35047 Fix a signedness warning.
svn path=/trunk/; revision=21497
2007-04-22 11:51:36 +00:00
Ronnie Sahlberg 99bc488535 fix the sign of a variable to prevent a singed/unsigned warning during
compiling


svn path=/trunk/; revision=21494
2007-04-22 09:58:12 +00:00
Sebastien Tandel 84e1cfee7f delete Td4 as it is used only in rijndaelDecrypt and rijndaelDecryptRound not
present in the wireshark code

svn path=/trunk/; revision=21429
2007-04-14 11:55:19 +00:00
Jörg Mayer cee590823d - Add Makefile.common to EXTRA_DIST (spotted by Christopher Maynard)
- Replaced spaces at beginning of line by tab

svn path=/trunk/; revision=21267
2007-03-29 07:41:54 +00:00
Jeff Morriss 13942d6fa3 Don't #define bzero and bcopy to be memset and memcpy on Windows, just use memset and memcpy instead.
svn path=/trunk/; revision=21201
2007-03-26 03:59:09 +00:00
Stephen Fisher 62f88a4a04 From Sebastien Tandel:
(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 ;)


svn path=/trunk/; revision=21153
2007-03-23 17:49:59 +00:00
Stephen Fisher 84c5becd89 Add -Werror for gcc to a few more directories and fix a few warnings
svn path=/trunk/; revision=21129
2007-03-22 23:24:13 +00:00
Ulf Lamping dcb1e1bdfd add "treat warnings as errors" flag(s)
svn path=/trunk/; revision=21125
2007-03-22 22:54:00 +00:00
Luis Ontanon 69e27560c2 From: Sebastien Tandel
And here is the patch to change guint -> guint32 in the hmac function.


svn path=/trunk/; revision=21037
2007-03-16 21:22:35 +00:00
Guy Harris 2b75ac83af Eliminate __inline - not all compilers support it.
svn path=/trunk/; revision=20932
2007-02-25 23:25:23 +00:00
Guy Harris 3496de0ff1 ANSI C defines size_t; if we don't have that defined, we have bigger
problems, and there's no guarantee that _SIZE_T is defined on all ANSI C
platforms, so you might end up with a redefinition and a compile failure.

svn path=/trunk/; revision=20931
2007-02-25 22:46:54 +00:00
Gerald Combs 183cbf95cc WEP decryption is destructive -- pass a fresh copy of our data buffer
instead of the actual buffer.  Add an entry to the release notes, and
clear out leftovers from the 0.99.5 release.

svn path=/trunk/; revision=20875
2007-02-20 18:44:22 +00:00
Bill Meier 547a03b25b Fix some C++ style comments
svn path=/trunk/; revision=20865
2007-02-19 21:45:27 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Jeff Morriss 0c17bfd3a8 From Eric Hall to fix bug 1289:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1289

Rename 'svnversion' to 'wireshark_svnversion' to resolve a symbol conflict with
GTK 2.10.6 (hmm, shouldn't GTK not be exporting that symbol or at least naming
it so as to prevent such collisions? Well, so should we, so...)

From Andreas Fink: change #ifdef for size_t in airdcap_interop.h to fix
compile on MacOS X.


svn path=/trunk/; revision=20726
2007-02-06 02:27:59 +00:00
Gerald Combs 6132c5b323 Fix saving WPA key preferences from the decryption key management dialog,
which was broken by r20388.

svn path=/trunk/; revision=20573
2007-01-26 23:28:22 +00:00
Gerald Combs f9e2736d7c 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.

svn path=/trunk/; revision=20572
2007-01-26 21:54:59 +00:00
Gerald Combs 2664012ca6 Fix a key preference crash bug. Improve WPA passphrase and SSID length
handling.  Free a byte array.  Squelch a compiler warning.  Fix a URI
string parsing bug.

svn path=/trunk/; revision=20549
2007-01-25 01:24:14 +00:00
Stephen Fisher a5b223382f From Gisle Vanem: Add the final ) to a g_strdup_printf call
svn path=/trunk/; revision=20457
2007-01-16 21:16:45 +00:00
Gerald Combs ba4a327704 Add copyright attributions and licenses. License each derived work
according to its pedigree.

svn path=/trunk/; revision=20401
2007-01-12 00:54:13 +00:00
Gerald Combs f67fdf4865 Move sha1.[ch] to epan/crypt/crypt-sha1.[ch]. Remove duplicate code.
svn path=/trunk/; revision=20399
2007-01-12 00:33:32 +00:00
Gerald Combs def1f435fc Fix compilation problems under Windows. In the GTK code, convert SSIDs
to GByteArrays.  Add format_uri() to strutil, which formats a byte string
with percent-escapes.  Fixup whitespace and indentation.

svn path=/trunk/; revision=20397
2007-01-11 22:12:33 +00:00
Gerald Combs 983f496f69 Add uri_str_to_bytes(), byte_array_dup(), and byte_array_equal()
functions to strutil.  Use GByteArrays to store SSIDs for decryption,
and let the user specify arbitrary byte strings using percent-encoded
strings.  We should probably add percent encoding for pass phrases as
well, so you can escape the ":" character.

Move the key struct key conversion utilities to airpdcap.c, and remove
duplicate code from packet-ieee80211.c.  Fix a lot of indentation.

svn path=/trunk/; revision=20388
2007-01-11 02:42:34 +00:00
Jaap Keuter 6b97952ede Trying to get buildbot Ubuntu-5.10-x86 distcheck to build again
svn path=/trunk/; revision=20376
2007-01-10 14:37:24 +00:00
Ulf Lamping 2dbb754dc2 vastly simplify the Makefile by using Makefile.common - as this is what this file is intended to be - to be common for UNIX and Windows builds ;-)
svn path=/trunk/; revision=20374
2007-01-10 09:54:31 +00:00
Tomas Kukosa b3df178624 add missing object files into epan/crypt/Makefile.nmake
svn path=/trunk/; revision=20371
2007-01-10 07:06:16 +00:00
Luis Ontanon ae2ca85c92 remove now useless hmac.[ch] files
svn path=/trunk/; revision=20365
2007-01-10 01:14:16 +00:00
Luis Ontanon 0bd2e20098 Have the code working on BIG ENDIAN machines
svn path=/trunk/; revision=20364
2007-01-10 01:13:10 +00:00
Gerald Combs 9d5858f635 Move cryptography code to epan/crypt.
svn path=/trunk/; revision=20359
2007-01-09 22:14:07 +00:00
Luis Ontanon b68e1cf4e4 Win32 has neither bcopy nor bzero
svn path=/trunk/; revision=20357
2007-01-09 20:43:25 +00:00
Luis Ontanon f7a79f43e7 SNMPv3 USM decryption/authentication phase 1
svn path=/trunk/; revision=20353
2007-01-09 18:38:55 +00:00
Luis Ontanon e4e3c189f2 * replaced MD5 with one that that works on my Big Endian Mac. ( taken from www.pjsip.org, which BTW took it from some other place)
* externalize SHA1 functions and data types


svn path=/trunk/; revision=20351
2007-01-09 15:50:55 +00:00
Ulf Lamping 992d68cbca airpdcap_wep.h was removed
svn path=/trunk/; revision=20350
2007-01-08 22:50:49 +00:00
Gerald Combs 2a033f3350 Remove duplicate crc32 code.
svn path=/trunk/; revision=20347
2007-01-08 21:19:46 +00:00
Ulf Lamping dc7ac69d7b an attempt to fix the distcheck
svn path=/trunk/; revision=20287
2007-01-03 04:18:55 +00:00
Ulf Lamping 7cba4b4987 fix windows build
maybe the definitions from Makefile.common should better be used - the current Makefile.nmake looks a bit strange compared to others ;-)

svn path=/trunk/; revision=20281
2007-01-03 00:23:22 +00:00
Gerald Combs ed7b244446 Remove empty files (which should have been removed with r20231).
svn path=/trunk/; revision=20279
2007-01-03 00:07:07 +00:00
Gerald Combs 53689800e6 Move epan/crypt-md5.[ch] to epan/crypt. Remove
epan/crypt/airpdcap_md5.[ch].  Fix up whitespace.

svn path=/trunk/; revision=20277
2007-01-02 22:49:57 +00:00
Gerald Combs 3d0d45cac5 From Gisle Vanem:
Here are some patches needed to build using HAVE_AIRPCAP
on MingW:

* airpcap.h needs 'WEP_KEY_MAX_SIZE' from <epan/crypt/wep-wpadefs.h>.

* airpcap_loader.h needs <epan/crypt/airpdcap_user.h> and definition of
 'decryption_key_t'.

* epan/crypt/airpdcap_interop.h defines 'ntohs()' before <winsock2.h>
 gets included. Thus creating a parse error later on.

svn path=/trunk/; revision=20274
2007-01-02 19:56:59 +00:00
Gerald Combs 20fe5ab1a3 Fix a compiler warning. Surround an MSVC-specific #pragma with an
#ifdef, and add a link to a -dev mailing list thread pointing out that
it may not be necessary.  Fixup whitespace and comments.

svn path=/trunk/; revision=20256
2007-01-01 20:07:23 +00:00
Guy Harris 84792dd971 Make the crypt library the same way other sublibraries of libwireshark
are made, so that if libwireshark is shared, the crypt library is built
appropriately.  (This squelches a build warning, at least in OS X, that
linking a shared library with a static library is non-portable; it
should also arrange that the crypt library is built as
position-independent code if necessary.)

DISTCLEANFILES subsumes CLEANFILES, so it doesn't need to list files
already in CLEANFILES.

svn path=/trunk/; revision=20237
2006-12-29 22:53:44 +00:00
Guy Harris 1f349f16e1 Add some parentheses, as the suggestion of Mr. GCC.
svn path=/trunk/; revision=20236
2006-12-29 22:48:52 +00:00
Gerald Combs 32837914e6 Add clean targets to wslua. Fix the config.nmake include in crypt.
svn path=/trunk/; revision=20232
2006-12-28 17:28:29 +00:00
Gerald Combs bd282b4114 Move the contents of airpdcap to epan/crypt. Try to fix the current
distcheck failure.  Move the nmake build targets for airpdcap from 
epan/dissectors to epan.  This will probably break the Windows build.

svn path=/trunk/; revision=20231
2006-12-28 17:22:12 +00:00
Gerald Combs 92125fc18c Add missing files.
svn path=/trunk/; revision=20228
2006-12-27 23:19:45 +00:00