Commit Graph

89 Commits

Author SHA1 Message Date
Chris Maynard 3445d93bf2 Fix Coverity CID 700201: Dereference after null check, by ensuring "decoder" is not NULL before passing it to ssl_decrypt_record().
svn path=/trunk/; revision=42842
2012-05-25 00:54:49 +00:00
pascal 126c94d8c8 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6906 :
Restore dissection without private key when RSA-NULL-MD5 or RSA-NULL-SHA cipher is used 

svn path=/trunk/; revision=42441
2012-05-05 17:35:35 +00:00
pascal 95eb2e7288 From Martin Kaiser:
Fix some 'intermediate pointers must be const qualified' warnings
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7215

svn path=/trunk/; revision=42355
2012-04-30 19:14:14 +00:00
Bill Meier f0c3ee5c4a Whitespace cleanup: Indentation, trailing, ...
svn path=/trunk/; revision=42266
2012-04-26 16:05:05 +00:00
Michael Tüxen 7e112bec91 From Robin Seggelmann:
Support DTLS 1.2
Fix a bug in option handling.


svn path=/trunk/; revision=41816
2012-03-28 09:31:04 +00:00
Michael Tüxen 9765ee1bea From Robin Seggelmann: Add support for the New Session Ticket
message according to RFC 5077.

svn path=/trunk/; revision=41427
2012-03-08 09:25:13 +00:00
Michael Tüxen e929fdfdee From Robin Seggelmann: Add support for RFC 6520.
From me: Some cleanup
Initial work was done by Denis Jaeger and
Lukas Scharlau, but the code got rewritten by Robin.

svn path=/trunk/; revision=41189
2012-02-26 13:50:52 +00:00
Anders Broman 245fb95f47 From Naoyoshi Ueda:
Patch to fix DTLS decryption.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6847

svn path=/trunk/; revision=41036
2012-02-16 05:21:09 +00:00
Jeff Morriss d45ad837b2 Fix via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6817 :
r40200 made ssl_parse()/dtls_parse() post-update-callbacks for those
dissector's UATs so that the dissector would be updated when the user changed
the UAT.  (This allows SSL/DTLS keys to be taken into account without requiring
Wireshark to be restarted.)

But, those functions also update the UAT themselves if the old-style keys_list
preference is used, creating an infinite recursion.

Fix this by splitting the *_parse() functions into two: one for the UAT and one
for the old-style keys list.

svn path=/trunk/; revision=40952
2012-02-10 23:08:46 +00:00
Alexis La Goutte d2e40e2d4a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40902
2012-02-06 22:14:30 +00:00
Chris Maynard cb8805e543 Fix some duplicate display filter names.
svn path=/trunk/; revision=40590
2012-01-19 20:19:28 +00:00
Bill Meier dddb66178b AFAIKT sys/stat.h, sys/types.h, sys/socket.h, winsock2.h, inet_v6_defs.h #includes aren't needed.
also: Add #include <epan/packet.h>  (altho included by one of the other includes).

svn path=/trunk/; revision=40329
2011-12-29 21:08:53 +00:00
Bill Meier 9beae6eb86 AFAIKT sys/types.h, sys/socket.h, winsock2.h, inet_v6_defs.h #includes aren't needed.
svn path=/trunk/; revision=40328
2011-12-29 20:44:19 +00:00
Bill Meier ab5ead6bb0 Do whitespace cleanup; Reformat long lines;
Move proto_register...() to be near the end of the file.

svn path=/trunk/; revision=40327
2011-12-29 20:23:18 +00:00
Bill Meier 799be66d9f Add (what I think are) missing add_new_data_source() calls;
svn path=/trunk/; revision=40231
2011-12-16 19:15:17 +00:00
Bill Meier 8ea30b478a Fix tvb memory leak; Add missing call to add_new_data_source();
Also: remove unneeded #includes.

svn path=/trunk/; revision=40221
2011-12-16 00:33:03 +00:00
Sake Blok 418863f88d Fix for bug 6032:
After changing the ssl_keys UAT, reparse the list and reload the keys.


svn path=/trunk/; revision=40200
2011-12-14 18:24:41 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier e98b54c098 Use intended proto_tree_add_uint() instead of proto_tree_add_item() to fix benign bugs (Replaces SVN #39348).
svn path=/trunk/; revision=39359
2011-10-11 14:58:54 +00:00
Bill Meier 29e823dfba Fix benign bugs in some proto_tree_add_item() 'encoding' args;
svn path=/trunk/; revision=39348
2011-10-10 21:53:15 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 799578fb29 Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item with types in hf[] of:
FT_NONE
    FT_BYTES
    FT_IPV6
    FT_IPXNET
    FT_OID

svn path=/trunk/; revision=39261
2011-10-05 00:25:09 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Stig Bjørlykke 0554530407 From Dirk via bug 6361:
Use File/Directory Dialog as a field type for UAT preferences.

svn path=/trunk/; revision=39059
2011-09-20 10:15:09 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Chris Maynard 4541cfe5d8 From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5983:
Use offset instead of fragment_offset for boundary check. 

svn path=/trunk/; revision=37524
2011-06-02 17:12:13 +00:00
Chris Maynard a02b8fb247 From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863, with some additional enhancements by me: Add dtls heuristics.
svn path=/trunk/; revision=37511
2011-06-01 18:34:41 +00:00
Jeff Morriss f3f9f2697f Make TVBs opaque for most users.
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.

svn path=/trunk/; revision=37422
2011-05-27 03:06:50 +00:00
Jeff Morriss 8058ba646a From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :
1. Reload framing protocol no longer encapsulates the Reload message, instead
the latter is in its own tree following Reload framing, much like IP, UDP, etc.

2. Similarly, DTLS no longer encapsulates its data payload if the payload can
be dissected. The recognized payload is in its own tree following the DTLS,
much like IP, UDP, etc.

4. DTLS now has its own heuristic table for dissecting its payload, and
reload-framing is added to this DTLS heuristic table.

6. DTLS will try to dissect its payload if the agreed upon cipher is
RSA-NULL-MD5 (0x0001) or RSA-NULL-SHA (0x0002), even when DTLS is not
configured with the client/server private keys.


Still to do: make DTLS a heuristic dissector on top of UDP (item 3 in the bug).

svn path=/trunk/; revision=37110
2011-05-13 02:48:08 +00:00
Guy Harris c97679e264 If HAVE_LIBGNUTLS isn't defined, don't build functions that are used
only if HAVE_LIBGNUTLS is defined.

svn path=/trunk/; revision=36877
2011-04-26 22:56:22 +00:00
Gerald Combs c6fecb57b0 From Ivan Sy via bug 3343:
- Support for DTLS and SSL RSA keys list using User Accessible Table
- Support for IPv6 SSL as posted by bug#3343 comment#1
- 'any' and 'anyipv4' for IPv4 wildcard
- 'anyipv6' for IPv6 wildcard
- UAT fields validation.


From me:

- Update paramaters to match UAT API changes.
- Change the UAT filename.
- Fix buffer overflow for IPv6 addresses.
- Allow the use of hostnames along with numeric addresses.
- Don't convert strings to addresses twice.
- Don't use the same variable name for different data types.
- Make "any" mean "any IPv4 or any IPv6".
- Bend the concept of obsolete preferences slightly so that we can convert
  and old-style key list to a UAT.
- Clean up whitespace.
- Don't point to a User's Guide section for now; it may make more sense to
  keep using the wiki page.
  
SSL dissector changes have been tested. DTLS dissector changes have not.

svn path=/trunk/; revision=36875
2011-04-26 21:59:11 +00:00
Stig Bjørlykke 27344a90fe Removed some unneeded assignments.
Found by clang.

svn path=/trunk/; revision=36698
2011-04-18 15:29:25 +00:00
Jeff Morriss 50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.

Replace a bunch of:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])

with:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Bill Meier 28402479cc Use value_string_ext fcns to access two value-string arrays;
Reorder value-string arrays slightly so they are in ascending order.

svn path=/trunk/; revision=34699
2010-10-29 22:18:44 +00:00
Jeff Morriss 4a120508d6 Fix the reassembly assertion reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3881 :
Ensure the fragment bytes exist before passing them to the reassembly code.

svn path=/trunk/; revision=34662
2010-10-27 18:26:54 +00:00
Jeff Morriss cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Guy Harris b706db2b01 packet-ssl-utils.h now includes <stdio.h> itself.
svn path=/trunk/; revision=32371
2010-04-04 03:06:25 +00:00
Guy Harris f588599e6d packet-ssl-utils.h uses "FILE *"; at least on Solaris, we need to
include <stdio.h> to get "FILE *" declared.

svn path=/trunk/; revision=32368
2010-04-04 00:48:17 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Jaap Keuter 4ab14bc71e Ditch the last direct indexed character array.
And some minor formatting updates.

svn path=/trunk/; revision=31921
2010-02-19 07:43:26 +00:00
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Stig Bjørlykke d577ca0fa7 Guard #include <sys/types.h> with HAVE_SYS_TYPES_H.
svn path=/trunk/; revision=31053
2009-11-23 18:47:52 +00:00
Bill Meier 81a03aca75 Another Oops: #include <stdio.h> *is* required .....
svn path=/trunk/; revision=30584
2009-10-16 22:12:40 +00:00