Commit Graph

88 Commits

Author SHA1 Message Date
Michael Mann 6c5a93d7d1 Fix invalid read and correct PSK upper bound. Bug 9512 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9512)
From Peter Wu.

svn path=/trunk/; revision=53843
2013-12-08 02:12:48 +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
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
Alexis La Goutte 23f9100542 From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144 [PATCH] Update TLS Ciphers
Really add support for AEAD ciphers (GCM)

GCM uses counter mode with authentication tags (the latter is currently
not supported). As for the key material, there is no MAC (because the
auth tag is supposed to verify the authenticity).

Finally, correct the GCM cipher suite definitions: IV block size of
4 bytes and GCM instead of CBC mode.

svn path=/trunk/; revision=52150
2013-09-19 20:27:12 +00:00
Alexis La Goutte a87da76132 From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144 [PATCH] Update TLS Ciphers
Use IV from record for CBC mode, add padding/IV length check

Add summary of RFCs to make it more obvious why certain parts (IV, MAC,
padding) are used. Merge DTLS and TLS blocks for extracting IV. This
saves an unnecessary memmove() because the input pointer is, well, just
a local variable and can therefore be incremented.

Validate padding and IV lengths before using it. A crash could occur
if the explicit IV is missing (this would make memmove write before its
buffer). The missing padding check had as implication that a misleading
error is returning with a negative length (not exploitable).

Use IV from record for CBC mode, previously it decrypted the first block
incorrectly and then threw this "decrypted" IV away. Now it extracts the
IV and uses this for decrypting the first fragment block. (remember that
CBC xor's the output of the block cipher with the previous ciphertext
(or IV for the first block)).

This is a preparation for GCM which does not have a MAC. The skip_mac
branch is necessary to make the compiler happy in this patch, 'mac'
could otherwise be uninitialised.

svn path=/trunk/; revision=52149
2013-09-19 20:27:05 +00:00
Alexis La Goutte f4a4271320 From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144 [PATCH] Update TLS Ciphers
Drop export_cipher and dig_len, cleaner digest access

Removed dig_len as this magic number is dependent on dig. The digests
variable is converted from a string to a structure holding the digest
name and length because of its close dependency.

Introduce another struct+function to get rid of the magic number 0x40
(DIG_MD5).

Removed export_cipher bit as this is dependent on eff_bits < bits.
Verified with:
grep ,KEX_ packet-ssl-utils.c | awk -F, '{bits=$6!=$7;ex=$9;
if ((bits && !ex) || (!bits && ex))print $6, $7, $8, "###", $0}'.

Removed space before SIG_RSA for cipher 51 for consistency with others.

svn path=/trunk/; revision=52147
2013-09-19 20:26:50 +00:00
Alexis La Goutte 219d17145f From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144 [PATCH] Update TLS Ciphers
Add more TLS cipher suites (SEED, AES-GCM, ECC)

- cipher suites from `RFC 5246 - TLS 1.2`
- cipher suites 150-155 are taken from: RFC 4162 - SEED for TLS
- cipher suites 156-167 are taken from: RFC 5288 - AES-GCM Cipher suites
- cipher suites 49153-49177 are taken from: RFC 4492 - ECC for TLS
- cipher suites 49195-49202 are taken from RFC 5289 - ECC with SHA256/384 and AES GCM

svn path=/trunk/; revision=52049
2013-09-15 06:59:07 +00:00
Alexis La Goutte 9ac2566d0a From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144 [PATCH] Update TLS Ciphers
Add support for Camellia ciphers

svn path=/trunk/; revision=52048
2013-09-15 06:58:54 +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
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
Alexis La Goutte 32e5c9f8bf Fix (-W)documentation error found by Clang
./packet-ssl-utils.h:463:16: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 @param comp_str
 ~~~~~~~~~~~~~~^

svn path=/trunk/; revision=51265
2013-08-10 21:29:33 +00:00
Evan Huus 0e90cd8f80 As noticed by Anders: move a wmem include outside of the #ifdef, we want it
regardless of whether or not we have GnuTLS.

svn path=/trunk/; revision=51067
2013-07-31 15:32:42 +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
Anders Broman c1f144e9aa From Dirk:
improve PKCS12 SSL certificate load.

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

svn path=/trunk/; revision=49327
2013-05-16 05:36:13 +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 1b13606b6f Now that the test suite is done and most of the common functions are
implemented, start replacing emem with wmem in dissectors.

Also remove emem.h include from a few files that didn't actually need it.

More to come once in hopefully large batches once I figure out the
appropriate regexes.

svn path=/trunk/; revision=49009
2013-04-24 00:01:45 +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
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Martin Kaiser 38a73a32f3 include the wsutil/wsgcrypt.h instead of including gcrypt.h directly
svn path=/trunk/; revision=47802
2013-02-21 18:23:29 +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
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 9adf66b3fb From Adam Langley:
Decrypt resumed, SSL sessions from keylog file-
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7396

svn path=/trunk/; revision=43458
2012-06-24 15:24:59 +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
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
Anders Broman afa29e0070 From Yaniv Kaul:
Enhance the SSL dissector to dissect some Hello extensions.

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

svn path=/trunk/; revision=41736
2012-03-22 08:58:19 +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 cde63b2001 From Michael:
Enhance SSL Key Exchange dissection.

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

svn path=/trunk/; revision=40748
2012-01-28 15:50:59 +00:00
Anders Broman 678711f488 From Naoyoshi Ueda:
Enable decryption of TLS 1.2.

 Add some cipher suites from RFC5246 and RFC5289.

Fixed a bug in the handling of stream cipher.
(The explicit IV field in the application record doesn't exist when stream ciphers are used. But the original code handles it as if one-byte IV exists.)

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

svn path=/trunk/; revision=40273
2011-12-22 07:03:42 +00:00
Guy Harris dad8d4ca55 Note why we need <stdio.h>.
svn path=/trunk/; revision=40223
2011-12-16 00:54:45 +00:00
Bill Meier 49e38170c5 Oops: #include <stdio.h> is really needed.
svn path=/trunk/; revision=40222
2011-12-16 00:50:47 +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
Bill Meier 4c46725c2c Fix vi "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39074
2011-09-21 16:28:53 +00:00
Bill Meier 37e7fec6cd Explicit #include <epan/value_string.h> not required.
svn path=/trunk/; revision=39073
2011-09-21 16:14:18 +00:00
Anders Broman 1a768b36b4 - Added new SignatureIdentity values.
From Marc Petit-Huguenin:
- Removed directResponseForwarding.
- The certificate_type enum is now defined as RFC 6091's CertificateType
  so moved the definition to packet-ssl-utils.[ch].
- Fixed invalid values for CERTIFICATE_BY_NODE and CERTIFICATE_BY_USER
  Kinds.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5967

svn path=/trunk/; revision=37452
2011-05-29 06:16:19 +00:00
Gerald Combs 767e73c3d5 From Adam Langley via bug 4349:
This patch adds support for getting the pre-master secret of a TLS
connection from a log file. Currently Wireshark can decrypt and TLS
connection only if it has the server's private key.

I commonly have a use case where I control the TLS client, but not the
server.  In order to decrypt in this case, I've added support to NSS
(used by Chrome and Firefox) to log the keys to a file on disk:

https://bugzilla.mozilla.org/show_bug.cgi?id=536474

Given this file, Wireshark can then decrypt the resulting TLS connections.

The format is such that Wireshark opens and linearly scans the file each
time it sees a ClientKeyExchange. If the key log grows too large, this
is pretty inefficient. However, it's simple and the number of
interesting TLS connections when debugging is usually very small.

svn path=/trunk/; revision=36876
2011-04-26 22:51:35 +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
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
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
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
Anders Broman 1c2b3b0eb9 Fix a number of doxygen directives.
svn path=/trunk/; revision=33930
2010-08-26 15:24:49 +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
Bill Meier f3710b8d26 Needs #include <stdio.h>.
svn path=/trunk/; revision=32369
2010-04-04 02:25:32 +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
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 9092486f58 Changed from using own defined GNUC_FORMAT_CHECK to G_GNUC_PRINTF
defined in GLib.  Removed epan/gnuc_format_check.h.

svn path=/trunk/; revision=31657
2010-01-25 13:20:53 +00:00
Sake Blok 6a87ff2569 Fix a spelling error : entrypted -> encrypted
(found by Adam Langley in bug 4349)



svn path=/trunk/; revision=31628
2010-01-22 23:09:19 +00:00