Commit Graph

142 Commits

Author SHA1 Message Date
Jeff Morriss cc6fc23812 From Didier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3055 :
Apply rev 25869 to most of the rest of the TCP-desegmenting dissectors.
(The SSL dissector was already updated in one of two spots with bug 4535/rev
32456.)

A couple of the patches had to be manually applied.

From me: Fix the comments to match the change (including in the TCP and SSL
dissectors.)

svn path=/trunk/; revision=36332
2011-03-25 19:02:18 +00:00
Jeff Morriss 8c73d0c6f4 If we've already seen a segment which starts a multi-segment pdu (i.e., it's
a retransmission), don't add it to the list (tree) of multi-segment pdus.

Otherwise, if we'd already seen the rest of the pdu and the other segments
were not retransmitted, the retransmission would break dissection of the pdu
because lookups for the segment would find the retransmission (to which the
other segments were not attached).

Since we know this segment is a retransmission, don't bother handing it off
to the subdissector either.

Use PINFO_FD_VISITED().
Add some white space in the desegmentation routine to improve readability.

Apply the same changes to the SSL dissector.

svn path=/trunk/; revision=36304
2011-03-24 02:10:04 +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
Anders Broman c4fe9a28ca From Kaspar Brand:
SSL/TLS dissector: add support for "Certificate Status" messages (aka OCSP stapling)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5503

svn path=/trunk/; revision=35655
2011-01-26 08:49:06 +00:00
Jeff Morriss 8d32d2066a There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or
tvb_get_const_stringz().

Use tvb_memeql() & tvb_memcmp().

svn path=/trunk/; revision=35558
2011-01-16 20:51:21 +00:00
Sake Blok c16ac675d9 Add support for the TLSv1.2 format of the CertificateRequest handshake message.
(see: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5485 )


svn path=/trunk/; revision=35216
2010-12-18 01:16:11 +00:00
Stephen Fisher e4a02e802c Rename "Secure Socket Layer" to "Secure Sockets Layer" (plural) and update
protocol reference URLs.


svn path=/trunk/; revision=35186
2010-12-14 17:02:00 +00:00
Bill Meier 62e44e3f66 Minor cleanup:
- Initialize a few static global variables;
- Remove two unnecessary calls to g_hash_table_foreach_remove;
- Do whitespace cleanup and use consistent indentation;
- Fix a few typos and fix up several comments.

svn path=/trunk/; revision=35183
2010-12-14 01:50:31 +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 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Anders Broman 1b390de1dc Try to fix the build.
svn path=/trunk/; revision=33310
2010-06-24 06:37:31 +00:00
Anders Broman 8396802773 From "wiresharkbugzilla@jdkbx.cjb.net":
Support for RFC4279 Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4853

svn path=/trunk/; revision=33309
2010-06-24 06:01:11 +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
Sake Blok d323dd81ec Fix for bug 4544 - Decrypted data for STARTLS session is not shown in packet list when using "starttls" SSL decryption preference
- make sure the SSL dissector knows how to reach the original dissector for the decrypted data
- make sure the SMTP dissector does not call the SSL dissector again with the decrypted data


svn path=/trunk/; revision=32921
2010-05-23 22:23:33 +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
Bill Meier d03f69e2df From Yaniv Kaul: Fix errors found by clang static code analyzer and add some consts.
svn path=/trunk/; revision=32760
2010-05-11 20:14:37 +00:00
Sake Blok 810861bcd0 Fix for bug 4535: The SSL dissector can not correctly resemple SSL records when the record header is spit between packets
svn path=/trunk/; revision=32456
2010-04-13 19:37:44 +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 47e732e29e Changed "reassembled_length" -> "reassembled.length".
svn path=/trunk/; revision=31776
2010-02-03 08:47:15 +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
Jaap Keuter ef44e06208 From Jens Weibler:
Just a small patch to add information about elliptic curves for SSL-connections.

svn path=/trunk/; revision=31744
2010-01-31 19:57:01 +00:00
Stig Bjørlykke 941cfd993e Only add a delimiter to COL_INFO when actually adding something more.
(remaining data can be TCP segment data)

Removed calls to col_check().

svn path=/trunk/; revision=31332
2009-12-21 00:34:41 +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
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +00:00
Jaap Keuter 01e559bb2f Fix for bug 4008:
Crash on TLSv1.2 packets, caused by ssl_short_name array overrun.

svn path=/trunk/; revision=29906
2009-09-14 21:24:24 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Tomas Kukosa ebc78f0a07 Fix SSL decryption failure if client and server have the same TCP port
svn path=/trunk/; revision=29400
2009-08-13 09:07:03 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Guy Harris 54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Sake Blok 3219e30599 When a frame contains the remainder of a previous PDU and a new PDU, the
protocol tree would show two "Secure Socket Layer" branches and the INFO
column would fail to show the content type of the second PDU. Don't give
control back to TCP for the second PDU by just fetching the remaining bytes
of the first PDU, but ask for a whole new segment so that all processing
will be done within the SSL dissector itself.


svn path=/trunk/; revision=28088
2009-04-19 20:28:18 +00:00
Tomas Kukosa 7cfcaa8a6e - detect TLS 1.2
- ciphersuite list updated
- list of alerts and extensions updated

svn path=/trunk/; revision=27421
2009-02-11 07:03:51 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Bill Meier 8afa208ffb Windows build: #include winsock2.h only when needed.
#include winsock2.h pulls in about 90 distinct .h files
and about 140 total .h files. 
Currently winsock2.h is (mostly unnecessarily) included
for each dissector via packet.h/wtap.h.
This patch removes #include winsock2.h from wtap.h and 
then includes winsock2.h (or windows.h) in the 
few specific places required. 
With this patch, my Windows Wireshark build takes 
about 30% less time.


svn path=/trunk/; revision=26535
2008-10-24 00:42:09 +00:00
Guy Harris e1d2a36b02 Clean up indetation.
If we're running in TShark, there's never a GUI; clean up comments.

Merge a couple of if statements together, as the "true" branch of the
second statement is executed only if the "true" branch of the first
statement is executed.

svn path=/trunk/; revision=26158
2008-09-07 03:13:10 +00:00
Jaap Keuter 445e2212b7 Move the registration for SSL sockets to the protocol dissectors themselves.
svn path=/trunk/; revision=25721
2008-07-12 14:42:14 +00:00
Jaap Keuter b29e8aed10 From Paolo Abeni:
- the StringInfo allocator may fail when a 0 data length is requested
- many wrong values into the cipher_suites table
- duplicated code for ssl session state checking before each
  ssl_generate_keyring_material() call
- missing initialization of 'server_data_for_iv.data_len' and
  'client_data_for_iv.data_len' in ssl_session_init()

From Jaap Keuter:
- Some code rationalisation
- Gammatical/factual corrections in output and comments
- Whitespace cleanup

svn path=/trunk/; revision=25684
2008-07-09 07:24:13 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Anders Broman bf9ccab9cb Change depreciated function g_tree_traverse -> g_tree_foreach
svn path=/trunk/; revision=25239
2008-05-05 20:03:15 +00:00
Tomas Kukosa becca40aa7 SSL debug outputs for better detection of reassembling problems
svn path=/trunk/; revision=24695
2008-03-19 08:26:45 +00:00
Bill Meier b25aa005c1 A few minor pedantic fixes ....
svn path=/trunk/; revision=24301
2008-02-11 17:04:51 +00:00
Stig Bjørlykke c6af1bfdd4 Removed some "statement not reached" warnings.
svn path=/trunk/; revision=24282
2008-02-07 12:14:40 +00:00
Graeme Lunt 2f97f065ff Remove "LDAP over SSL" registration as now handled by the LDAP dissector.
svn path=/trunk/; revision=24196
2008-01-26 10:14:26 +00:00