Commit graph

141 commits

Author SHA1 Message Date
Bill Meier
93fe4d53e2 Remove trailing whitespace.
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6
Reviewed-on: https://code.wireshark.org/review/372
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 16:36:38 +00:00
David Tapuska
48d421ec99 Enable DTLS "Decrypting" of all the NULL cipher suites. Previously
it only did the RSA MD5/SHA1 ones.

Change-Id: I7b16c7245dd1646f68479095540a8bef191d5fb2
Reviewed-on: https://code.wireshark.org/review/160
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-10 21:40:33 +00:00
Gilbert Ramirez
4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Anders Broman
f0fb43a621 From alexeyv:
Add decryption for resumed TLS sessions with a session ticket.

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

svn path=/trunk/; revision=54860
2014-01-20 20:26:04 +00:00
Evan Huus
0ea5c80e1a Replace an ep-stack with a wmem stack. Running epan_init() no longer uses
any ephemeral memory.

svn path=/trunk/; revision=54434
2013-12-24 01:38:26 +00:00
Alexis La Goutte
d5672481ea From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9498
dtls: use generic ssl dissect code for TLS extensions

This makes the DTLS dissector use the now common TLS extensions
dissector from packet-ssl-utils.c instead of its own.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

svn path=/trunk/; revision=54419
2013-12-23 20:42:43 +00:00
Jakub Zawadzki
deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Alexis La Goutte
719cc1ea30 From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9499
DLTS: add cipher version for OpenSSL pre 0.9.8f

OpenSSL pre 0.9.8f uses the TLS version 0x0100 and is not completely
compatible with DTLS 1.0 or 1.2. One difference is that the encrypted
pre master from TLS 1.0 does not have an own length, which is needed by
TLS and DTLS 1.0, this makes decrypting impossible. This patch makes it
possible for the code to distinguish between this OpenSSL version and
real DTLS 1.0, because they are not using the same code any more. This
is needed to fix the snakeoil-dtls test.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

svn path=/trunk/; revision=54043
2013-12-13 14:06:18 +00:00
Michael Mann
0f05597ab1 DTLS decryption enhancements. Bug 9499 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9499)
From Hauke Mehrtens

1. dtls: set ssl_set_server() in DTLS dissector so wireshark knows if this is client or server
2. SSL: add decrypt support for CCM and CCM_8 Ciphers per rfc 6655
3. dtls: add psk decrypt support

svn path=/trunk/; revision=53836
2013-12-08 00:58:06 +00:00
Michael Mann
20c163d070 DTLS server key exchange misses sig and hash algorithm for TLS 1.2. Bug 9208 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9208)
1. Fix ECDH server key exchange for DTLS 1.2
2. Fix RSA server key exchange for DTLS 1.2

From Hauke Mehrtens

svn path=/trunk/; revision=52595
2013-10-14 02:34:06 +00:00
Bill Meier
2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Pascal Quantin
074349264e Convert some dissectors to wmem (leaving uat-like memory with emem for now)
svn path=/trunk/; revision=52031
2013-09-14 10:53:29 +00:00
Michael Mann
9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Pascal Quantin
d89a3bab77 fragment_length has already been retrieved from TVB
svn path=/trunk/; revision=51590
2013-08-30 09:36:10 +00:00
Pascal Quantin
3eb4d24c23 From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9081 :
DTLS: fix detection of encrypted handshake messages in case of fragment

svn path=/trunk/; revision=51589
2013-08-30 09:18:21 +00:00
Pascal Quantin
aa99a6c17b From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9081 :
DTLS: improve detection of encrypted handshake messages

svn path=/trunk/; revision=51578
2013-08-29 20:23:43 +00:00
Michael Mann
951e0101a3 From Hauke Mehrtens:
Break out Signature Hash Algorithm into hash and signature values

From me:
Cleanup all "saved" trees throughout the dissector as well as removing a few unnecessary NULL tree checks.
Removed most of the tvb_ensure_bytes_exist checks because the line that follows will through an exception anyway if there isn't enough bytes in the tvb.




svn path=/trunk/; revision=51574
2013-08-29 14:25:38 +00:00
Jakub Zawadzki
a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Pascal Quantin
458dcb7ea2 Add ability to export decrypted SSL/DTLS PDUs
svn path=/trunk/; revision=50001
2013-06-18 01:13:07 +00:00
Martin Kaiser
7e9d283c15 no need for check_col()
svn path=/trunk/; revision=49906
2013-06-12 15:15:26 +00:00
Michael Mann
93be0fb393 Batch of filterable expert infos with some minor cleanup I noticed while doing the filter conversions.
svn path=/trunk/; revision=49893
2013-06-12 03:33:44 +00:00
Anders Broman
5bc74bdeaf From: Hauke Mehrtens
DTLS 1.2 adds a supported_signature_algorithms attribute to the CertificateRequest which was not parsed in DTLS.

This code was copied from the ssl code.

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

svn path=/trunk/; revision=49878
2013-06-11 05:11:42 +00:00
Michael Mann
2d37ec3cb0 Batch of filterable expert infos.
svn path=/trunk/; revision=49853
2013-06-09 03:28:05 +00:00
Evan Huus
81ecf094f6 From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8567
[PATCH 7/8]
Dissect DTLS server key exchange

[PATCH 8/8]
Dissect DTLS client key exchange

[From me]
Clean up some field display names


svn path=/trunk/; revision=49175
2013-05-05 14:19:59 +00:00
Evan Huus
79b3d4e32f From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8567
[PATCH 1/8]
Add a subtree for the random DTLS elements. This is what TLS already does, and
it makes more sense than prefixing their display names.

[PATCH 2/8]
Show the actual hex content of the cookie by just using proto_tree_add_item.
The cookie length has its own field, so there's no need to display it twice.

[From me]
Fix an @ in the AUTHORS file


svn path=/trunk/; revision=49172
2013-05-05 13:49:49 +00:00
Guy Harris
d89d6c8314 Report bogus handshake length values with expert info. This includes
trying to handle reassembly of packets with *differing* handshake length
values a bit better.

Make coding style a little more consistent.

svn path=/trunk/; revision=48916
2013-04-18 19:19:38 +00:00
Evan Huus
37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Guy Harris
f3e5fa224c Put items into the protocol tree as we extract them, so that the header
fields that were captured show up even if the packet was cut short by a
snapshot length.  Advance the offset variable as we do so.

Be a little clearer in some comments.

svn path=/trunk/; revision=48537
2013-03-24 18:51:27 +00:00
Guy Harris
a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Anders Broman
81e80f2c0b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48355
2013-03-17 16:48:47 +00:00
Anders Broman
263a9d0683 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48341
2013-03-16 16:25:41 +00:00
Evan Huus
105dbc4027 Pass the same offset to tvb_ensure_bytes_exist and fragment_add.
One minor part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8380

svn path=/trunk/; revision=48010
2013-03-02 16:23:21 +00:00
Chris Maynard
3520b5dfac Trivial: Fix some typos.
svn path=/trunk/; revision=47831
2013-02-23 01:57:15 +00:00
Bill Meier
c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Martin Kaiser
30fdbd6da6 revert r46739
call fragment_add() before fragment_set_tot_len()
(the latter has no effect if no fragments are present, so we don't set
 the total length correctly when it's in the first fragment)

svn path=/trunk/; revision=47000
2013-01-08 22:24:42 +00:00
Martin Kaiser
13a5f0b5da set the dtls record length for reassembly _before_ adding a fragment
this is a workaround for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8111
it does not fully fix the underlying issue

svn path=/trunk/; revision=46739
2012-12-25 18:44:14 +00:00
Anders Broman
ac50d3b316 From Dirk:
print decrypted SSL application data as hexdump in ssl debug file.

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

svn path=/trunk/; revision=46040
2012-11-16 11:35:01 +00:00
Evan Huus
69905db57c Move potential dereference until *after* the null-check.
Caught by cppcheck.

svn path=/trunk/; revision=45081
2012-09-23 21:02:32 +00:00
Jeff Morriss
2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki
9f92dc93c5 Add data parameter to call_dissector_only.
svn path=/trunk/; revision=44872
2012-09-11 08:28:07 +00:00
Jakub Zawadzki
dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +00:00
Jakub Zawadzki
5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jeff Morriss
aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Michael Tüxen
91f65904c2 Recommit:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44502
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44511
and do some whitespace cleanups while there.

svn path=/trunk/; revision=44522
2012-08-15 16:02:01 +00:00
Michael Mann
3082032be6 convert GStrings to more "ephemeral friendly" use.
svn path=/trunk/; revision=44515
2012-08-15 13:56:59 +00:00
Michael Tüxen
54e5d13d4b Move registration to a better place.
svn path=/trunk/; revision=44511
2012-08-15 06:14:10 +00:00
Michael Tüxen
08280810b7 Register DIAMETER/DTLS/SCTP.
svn path=/trunk/; revision=44502
2012-08-14 20:53:39 +00:00
Bill Meier
638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Guy Harris
659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki
b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00