Commit Graph

236 Commits

Author SHA1 Message Date
Alexis La Goutte 91b972ae5e From Jakub via http://www.wireshark.org/lists/wireshark-dev/201311/msg00153.html
Wrong offset incrementation in r53416 (Add status_request_v2 TLS extension dissection (RFC6961))

From me
Fix encoding args

svn path=/trunk/; revision=53444
2013-11-20 18:38:48 +00:00
Guy Harris 418a98cd8b It's incremented, so not a const.
Clean up indentation while we're at it.

svn path=/trunk/; revision=53418
2013-11-18 21:42:43 +00:00
Alexis La Goutte e069d1c9ea From Peter Wu
Add RFC6066 CertificateUrl TLS extension

This is not supported by OpenSSL or NSS, the extension itself seems
unsafe, but some implementations seem to support it[1].

Untested, no capture available.

 [1]: http://www.ietf.org/mail-archive/web/tls/current/msg02535.html

svn path=/trunk/; revision=53417
2013-11-18 20:27:04 +00:00
Alexis La Goutte 123e3d9203 From Peter Wu
Add status_request_v2 TLS extension dissection (RFC6961)

Besides adding status_request_v2 support, this patch moves the
Certificate Status Type from the OCSP Status subtree to its parent
(the extension tree). This is needed because this type applies to all
OCSPResponse fields.

The check for "tree != NULL" seems unnecessary here, it was not
clarified in the original patch so I removed it.

From me
Fix typo
Remove unneeded tvb_ensure_bytes_exist
Use proto_tree_add_item

svn path=/trunk/; revision=53416
2013-11-18 20:26:55 +00:00
Alexis La Goutte 954584d31b From Peter Wu
Add TLS StatusRequest (RFC6066) ClientHello extension recognition

Only empty Responder ID lists and empty Request Extensions are
implemented. I could not really find existing clients or servers that
populate these.

This status_request extension has a different signature for a
ClientHello and ServerHello, in the latter the extension_data field
must be empty. Therefore an additional parameter is added to
dissect_ssl3_hnd_hello_ext.

From me :
Fix typo

svn path=/trunk/; revision=53415
2013-11-18 20:26:46 +00:00
Alexis La Goutte 22f57a900b From Peter Wu
Support for EncryptedExtensions handshake type (a.k.a. NextProtocol)

Based on https://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04

From me
Fix warning found by fix-encoding-args

svn path=/trunk/; revision=53414
2013-11-18 20:26:37 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Evan Huus 95f484a91e Add a very small hack to make the UAT update callback error string freeable, and
convert all existing UAT update callbacks to use glib memory instead of
ephemeral memory for that string.

UAT code paths are entirely distinct from packet dissection, so using ephemeral
memory was the wrong choice, because there was no guarantees about when it would
be freed.

The move away from emem still needs to be propogated deeper into the UAT code
itself at some point.

Net effect: remove another bunch of emem calls from dissectors, where replacing
with wmem would have caused assertions.

svn path=/trunk/; revision=52854
2013-10-25 22:14:25 +00:00
Michael Mann 7be4187b39 TLS 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 TLS 1.2
2. Fix RSA server key exchange for TLS 1.2

From Hauke Mehrtens

svn path=/trunk/; revision=52596
2013-10-14 03:07:32 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Alexis La Goutte f7c8ee465e From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9216 ssl: Support PSK larger than 16 octets
PSK allows up to 2^16-1 octets as key according to RFC 4279 (PSK for
TLS). Therefore remove the restriction of 16 octets. While at it, skip
testing for negative size as this is unnecessary.

Reported at:
http://ask.wireshark.org/questions/25157/can-not-decrypt-ssl-psk-traffic

svn path=/trunk/; revision=52335
2013-10-02 17:56:27 +00:00
Pascal Quantin da8240ef60 emem -> wmem (except uat or init routines)
svn path=/trunk/; revision=52087
2013-09-15 21:36:37 +00:00
Jörg Mayer f737cea032 emem -> wmem
svn path=/trunk/; revision=52038
2013-09-14 14:33:04 +00:00
Martin Kaiser eee252d372 proto_tree -> proto_item
svn path=/trunk/; revision=51936
2013-09-10 17:55:31 +00:00
Martin Kaiser 4b0a906f78 remove unnecessary if (tree)
no need for tvb_ensure_bytes_exist()
replace += 1;; with ++;

svn path=/trunk/; revision=51929
2013-09-10 15:01:52 +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
Martin Kaiser bda2a2ad05 clean up dissect_ssl3_hnd_cert_req()
- proper indentation
- remove unnecessary subtree checks
- no need for tvb_ensure_bytes_exist()

svn path=/trunk/; revision=51636
2013-09-02 10:57:16 +00:00
Martin Kaiser 1a92451350 use dissect_ssl_hash_alg_list() for TLS1.2 certificate request
svn path=/trunk/; revision=51635
2013-09-02 10:55:21 +00:00
Martin Kaiser e249c25f11 From Michael Reschly
dissect TLS/signature_algorithms extension

from me
separate function for dissecting the algorithm list
remove some unnecessary checks and variables

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

svn path=/trunk/; revision=51634
2013-09-02 08:16:44 +00:00
Alexis La Goutte 37e43e58eb Enhance TLS ALPN dissection (Add length of ALPN)
svn path=/trunk/; revision=51549
2013-08-27 21:12:42 +00:00
Martin Kaiser ac73f00086 From Michael Reschly
Support dissection of TLS Application Layer Protocol Negotiation

from me:
fix indentation, add check for minimum ext_len, encoding for string hf

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

svn path=/trunk/; revision=51458
2013-08-21 20:24:39 +00:00
Evan Huus 960a461c8a Convert SSL and TCP dissectors to wmem (with the exception of UAT).
svn path=/trunk/; revision=51043
2013-07-31 01:26:05 +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
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Jakub Zawadzki c766e78cfa Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^)

svn path=/trunk/; revision=50580
2013-07-14 14:42:05 +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
Michael Mann b0090fd046 Batch of filterable expert infos
svn path=/trunk/; revision=49600
2013-05-27 23:21:11 +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 ad3c91fb81 From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8567
[PATCH 5/8]
Dissect client key exchange for PSK

[PATCH 6/8]
Dissect client key exchange for RSA-PSK


svn path=/trunk/; revision=49174
2013-05-05 14:10:09 +00:00
Evan Huus 39abf7ca0a From Hauke Mehrtens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8567
[PATCH 3/8]
Detect PSK and RSA_PSK key exchange

[PATCH 4/8]
Dissect the identity hint for PSK and RSA_PSK key exchanges

[From me]
Using proto_tree_add_item instead of proto_tree_add_uint in one place

svn path=/trunk/; revision=49173
2013-05-05 14:01:11 +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 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
Pascal Quantin aec6d0a755 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from ssl and ssh files

svn path=/trunk/; revision=48174
2013-03-07 18:37:58 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Michael Mann 0a135e8eb0 Bugfix data combined via ssl_desegment_app_data not visible via "Follow SSL Stream"
From Joe McEachern, bug 6434 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6434)

svn path=/trunk/; revision=47725
2013-02-18 00:58:21 +00:00
Bill Meier 1c7c18b725 Fix a typo in a comment;
Do some minor whitespace & etc cleanup.

svn path=/trunk/; revision=47216
2013-01-22 20:55:54 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Pascal Quantin a7f5c35d1e From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8092 :
Add SSL segment data and SSL reassmebled data fields and improve readability of the hex/ASCII data blocks written to the SSL debug log

svn path=/trunk/; revision=46572
2012-12-16 20:30:42 +00:00
Evan Huus 48c653481a Use the complete fragment length to reassembly SSL frames. The old method
of picking them up one at a time failed on jumbo frames.

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

svn path=/trunk/; revision=46510
2012-12-12 00:02:34 +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
Pascal Quantin 748f35f1e1 From Erik Tews via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7967 :
Fix dissection of Server Name Indication extension in SSL/TLS traffic

From me:
Fix a few errors found by checkhf.pl and fix-encoding-args.pl

svn path=/trunk/; revision=46005
2012-11-11 23:17:09 +00:00
Anders Broman 4d83f6f557 packet-ssl.c add a cast to build on Win64
pccket-lldp.c #if 0 out not used variables.

svn path=/trunk/; revision=45870
2012-11-02 10:04:38 +00:00
Anders Broman ecbf47ff3a From Dirk:
This patch will print the information if an
invalid string was entered. It would be better to have a button to click on in
the UAT dialog to show valid values, but I don't know how I could do that with
the UAT system. So I'm simply printing it now in the error dialog, which should
be good enough.

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

svn path=/trunk/; revision=45866
2012-11-02 08:48:13 +00:00
Bill Meier e7ccdde01e Minor cleanup:
- revert incorrect replacement of FALSE by ENC_BIG_ENDIAN
  done a while back (10 instances);
  [The incorrect use of ENC_BIG_ENDIAN was benign since
   ENC_BIG_ENDIAN is currently defined as 0x0000000];
- Remove unneeded #includes;
- whitespace (e.g., use consistent indentation).

svn path=/trunk/; revision=45641
2012-10-18 19:05:45 +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 dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +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 Mann 3082032be6 convert GStrings to more "ephemeral friendly" use.
svn path=/trunk/; revision=44515
2012-08-15 13:56:59 +00:00
Michael Mann 5dd7371960 more ephemeral memory cleanup
svn path=/trunk/; revision=44496
2012-08-14 17:58:41 +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