wireshark/epan
Peter Wu e22d3c9b74 ssl: fix ClientKeyExchange, fix TLSv1.2 SKE for DH
Since DTLS and TLS do not differ in handling ClientKeyExchange and
ServerKeyExchange, its dissection got moved to ssl-utils. The code is
based on the SSL dissector, with header field names adjusted to the
DTLS ones (those got capitalized). Besides a version difference (for
signatures), the header field and function names, the DTLS and SSL code
are equal (this is verified).

This patch refactors the dissectors for DHE_RSA and ECDHE to make use of
a common function to dissect the signed_params field. All offset
tracking is also removed in favor of exception handling by the
proto_tree_add_item function. Occurrences of proto_tree_add_uint are
also replaced by proto_tree_add_item for simplicity.

After those changes, the SKE dissector for DH key exchanges is updated
to handle the mandatory signature field in TLSv1.2, using the newly
added function. (bug 9208)

Another bug occurred after the length check removal, pre-TLS and
OpenSSL's old DTLS implemenation do not include a vector length in
the CKE. This is now also fixed. (bug 10222)

Other minor changes: comments added/corrected, renamed
keyex_dh -> keyex_dhe (includes DHE_RSA and DHE_DSS).

Bug: 9208
Bug: 10222
Change-Id: I76e835d56a65c91facce46840d79c1c48ce8d5dd
Reviewed-on: https://code.wireshark.org/review/2542
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 23:31:40 +00:00
..
crypt Support out-of-source checkapi 2014-04-25 04:23:46 +00:00
dfilter Support out-of-source checkapi 2014-04-25 04:23:46 +00:00
dissectors ssl: fix ClientKeyExchange, fix TLSv1.2 SKE for DH 2014-06-23 23:31:40 +00:00
ftypes Convert more time_to_str functions to wmem 2014-06-16 19:10:59 +00:00
wmem Add Modelines and use tabs and fix typo 2014-05-28 23:43:46 +00:00
wslua Remove svn $Id$ keyword in Lua scripts 2014-06-18 23:51:34 +00:00
CMakeLists.txt Revert "Optimize sip_is_known_sip_header()" 2014-06-23 16:22:30 +00:00
Makefile.am kill unmaintained python bindings 2014-06-16 20:44:08 +00:00
Makefile.common Move the definitions of OUI value_strings to epan/oui.c. 2014-05-31 22:07:56 +00:00
Makefile.nmake Get rid of obsolete references to nettle 2014-06-18 18:03:43 +00:00
addr_and_mask.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
addr_and_mask.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
addr_resolv.c Simplify IPv4 address hashing 2014-05-11 15:50:46 +00:00
addr_resolv.h More name changes. 2014-04-19 19:30:17 +00:00
address.h Fix the SET_ADDRESS_HF() macro. 2014-05-20 19:18:47 +00:00
address_to_str.c Get rid of some uses of tvb_get_ptr(). 2014-05-15 03:16:15 +00:00
afn.c Add MAC address family numbers (RFC 7042) 2014-05-21 12:04:54 +00:00
afn.h Add MAC address family numbers (RFC 7042) 2014-05-21 12:04:54 +00:00
aftypes.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
aftypes.h Add all AF_ types for Windows that are in WinSock.h or WinSock2.h 2014-06-23 16:48:16 +00:00
app_mem_usage.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
app_mem_usage.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
arcnet_pids.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
arptypes.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
asm_utils.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
asm_utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
asm_utils_win32_x86.asm Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
asn1.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
asn1.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
atalk-utils.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
atalk-utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ax25_pids.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
bridged_pids.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
charsets.c Use 4-space indentation consistently in epan/charsets.c. 2014-04-25 09:36:11 +00:00
charsets.h Add a get_ebcdic_string() routine, similar to other get_XXX_string() routines. 2014-04-25 09:30:14 +00:00
chdlctypes.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
circuit.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
circuit.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
column-info.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
column-utils.c Add col_append_lstr(), speedup column generation for TCP. 2014-06-23 03:33:59 +00:00
column-utils.h Add col_append_lstr(), speedup column generation for TCP. 2014-06-23 03:33:59 +00:00
column.c (Pedantic): set editor modelines tab-width & etc to 8; Also: fix some indentation in packet-sip.c 2014-04-03 15:31:56 +00:00
column.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
conv_id.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
conversation.c Add debug printing functions for conversations, sip, sdp, rtp 2014-03-21 05:15:57 +00:00
conversation.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
conversation_debug.h Fix missing license in conversation_debug.h 2014-03-21 13:35:48 +00:00
crc8-tvb.c Add CRC-8 calculator for EPON 2014-04-17 20:38:44 +00:00
crc8-tvb.h Add CRC-8 calculator for EPON 2014-04-17 20:38:44 +00:00
crc16-tvb.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
crc16-tvb.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
crc32-tvb.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
crc32-tvb.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
decode_as.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
decode_as.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
diam_dict.h Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
diam_dict.l Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
disabled_protos.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
disabled_protos.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dissector_filters.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dissector_filters.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
doxygen.cfg.in Continue to remove $Id$ from top of file 2014-03-31 18:48:06 +00:00
dtd.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dtd_grammar.lemon Continue to remove $Id$ from top of file 2014-03-31 18:30:52 +00:00
dtd_parse.h Continue to remove $Id$ from top of file 2014-03-31 18:30:52 +00:00
dtd_parse.l Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
dtd_preparse.l Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
dvb_chartbl.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dvb_chartbl.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dwarf.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
dwarf.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
eap.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
eapol_keydes_types.h Add a dissector table for EAPOL Key Descriptor types. 2014-03-23 19:18:51 +00:00
emem.c remove more unused code 2014-06-16 19:11:03 +00:00
emem.h remove more unused code 2014-06-16 19:11:03 +00:00
enterprise-numbers [Automatic manuf, services and enterprise-numbers update for 2014-06-22] 2014-06-22 15:04:41 +00:00
epan-int.h Revert "Allow pcapng interface options to be available to dissectors." 2014-03-20 12:25:21 +00:00
epan.c Have individual programs get libpcap and libz version info. 2014-06-23 21:56:42 +00:00
epan.h Add support for dissecting non-packet records. 2014-05-25 00:05:07 +00:00
epan_dissect.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
etypes.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ex-opt.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ex-opt.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
except.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
except.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
exceptions.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
exntest.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
expert.c Add filterable expert info for Lua 2014-03-26 05:20:17 +00:00
expert.h Add filterable expert info for Lua 2014-03-26 05:20:17 +00:00
exported_pdu.c Add the ability to dynamically add a new protocol to export PDU dialog box 2014-06-19 06:48:32 +00:00
exported_pdu.h Add the ability to dynamically add a new protocol to export PDU dialog box 2014-06-19 06:48:32 +00:00
filter_expressions.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
filter_expressions.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
follow.c Fix tshark -z follow,tcp stats regression when TCP stream index is > 0 2014-05-12 05:20:45 +00:00
follow.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
frame_data.c Make socpe a local variable, can be used if we change the g_slist to a 2014-06-05 11:26:33 +00:00
frame_data.h Add WS_DLL_PUBLIC for p_remove_proto_data and tvb_child_uncompres function 2014-04-07 04:09:10 +00:00
frame_data_sequence.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
frame_data_sequence.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
frequency-utils.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
frequency-utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
funnel.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
funnel.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
garrayfix.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
gcp.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
gcp.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
geoip_db.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
geoip_db.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
golay.c Fix indent (use 4 spaces) and add modelines 2014-06-19 19:56:33 +00:00
golay.h Fix indent (use 4 spaces) and add modelines 2014-06-19 19:56:33 +00:00
greproto.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
guid-utils.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
guid-utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
h225-persistentdata.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
h225-persistentdata.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
iana_snap_pid.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
iax2_codec_type.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
in_cksum.c Fix warnings introduced in g2965913 2014-03-04 16:39:02 +00:00
in_cksum.h Fix warnings introduced in g2965913 2014-03-04 16:39:02 +00:00
ip_opts.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ipproto.c IP Protocol : Update description of IP Protocol 2014-05-16 14:18:02 +00:00
ipproto.h Add modelines info 2014-05-16 14:16:59 +00:00
ipv4.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ipv4.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ipv6-utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
lapd_sapi.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
llcsaps.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
next_tvb.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
next_tvb.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
nlpid.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
oids.c Fix unused variable warnings found by clang. 2014-04-11 01:32:13 +00:00
oids.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
oids_test.c Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
osi-utils.c Put the system ID in the top-level items for neighbors. 2014-04-14 22:43:25 +00:00
osi-utils.h Put the system ID in the top-level items for neighbors. 2014-04-14 22:43:25 +00:00
oui.c Just have one value_string table for OUIs. 2014-06-01 09:19:40 +00:00
oui.h Just have one value_string table for OUIs. 2014-06-01 09:19:40 +00:00
packet-range.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
packet-range.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
packet.c Rename dissector_add_handle() to dissector_add_for_decode_as(). 2014-06-20 16:43:56 +00:00
packet.h Rename dissector_add_handle() to dissector_add_for_decode_as(). 2014-06-20 16:43:56 +00:00
packet_info.h Add support for dissecting non-packet records. 2014-05-25 00:05:07 +00:00
params.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ppptypes.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
prefs-int.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
prefs.c [WIP] qt: Add support for Polish language 2014-06-23 19:10:21 +00:00
prefs.h Capture Interfaces Dialog: 2014-06-12 05:54:59 +00:00
print.c Add a routine to return a version string including VCS information. 2014-06-22 01:06:25 +00:00
print.h Use g_ alloced memory (instead of emem) when printing fields. emem shouldn't be used for GUI functions anyway. 2014-05-19 01:46:55 +00:00
print.ps
proto.c Add proto_tree_add_subtree and proto_tree_add_subtree_format 2014-06-20 06:58:12 +00:00
proto.h fix printf argument index 2014-06-20 07:13:35 +00:00
ps.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
ptvcursor.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
radius_dict.l Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
range.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
range.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
reassemble.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
reassemble.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
reassemble_test.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
reedsolomon.c Remove trailing whitespace 2014-02-25 20:46:49 +00:00
reedsolomon.h Add correct license headers for reedsolomon code. 2014-02-12 01:47:48 +00:00
req_resp_hdrs.c - Replace tvb_length_remaining -> tvb_captured_length_remaining, 2014-05-14 10:50:22 +00:00
req_resp_hdrs.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
rtp_pt.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
sctpppids.h Add the PPID for 3GPP Pua. Move the (unregistered) M2TP PPID into that dissector. 2014-03-01 21:16:59 +00:00
show_exception.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
show_exception.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
sigcomp-udvm.c sigcomp: Add buffer check to STATE-ACCESS 2014-05-06 14:03:12 +00:00
sigcomp-udvm.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
sigcomp_state_hdlr.c sigcomp: Add buffer check to STATE-ACCESS 2014-05-06 14:03:12 +00:00
sigcomp_state_hdlr.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
slow_protocol_subtypes.h Add a copyright/idempotency wrapper. 2014-05-31 06:08:45 +00:00
sminmpec.c [Automatic manuf, services and enterprise-numbers update for 2014-06-22] 2014-06-22 15:04:41 +00:00
sminmpec.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
sna-utils.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
sna-utils.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stat_cmd_args.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stat_cmd_args.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stats_tree.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stats_tree.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stats_tree_priv.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stream.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
stream.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
strutil.c Add tvb_get and proto_tree_add for string-encoded byte arrays 2014-04-17 14:04:19 +00:00
strutil.h Add tvb_get and proto_tree_add for string-encoded byte arrays 2014-04-17 14:04:19 +00:00
t35.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
t35.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tap-voip.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tap.c Increase tap limit to 5000 2014-04-14 06:29:55 +00:00
tap.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tfs.c packet-q931.c: proto_tree_add_text -> something filterable. 2014-06-04 04:21:29 +00:00
tfs.h packet-q931.c: proto_tree_add_text -> something filterable. 2014-06-04 04:21:29 +00:00
time_fmt.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
timestamp.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
timestamp.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
timestats.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
timestats.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
to_str-int.h Document to_str-int.h functions. 2014-04-30 22:08:36 +00:00
to_str.c Convert more time_to_str functions to wmem 2014-06-16 19:10:59 +00:00
to_str.h Convert more time_to_str functions to wmem 2014-06-16 19:10:59 +00:00
tpg.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tpg.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbparse.c Fix compilation warning 2014-06-18 07:23:38 +00:00
tvbparse.h Continue to remove $Id$ from top of file 2014-03-31 18:30:52 +00:00
tvbtest.c Fix warnings in test binaries 2014-06-19 18:24:09 +00:00
tvbuff-int.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbuff.c Try to fix the builds. 2014-06-09 15:31:45 +00:00
tvbuff.h Revert "Don't throw for offset at end of TVB with len -1." 2014-05-14 17:12:12 +00:00
tvbuff_base64.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbuff_composite.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbuff_real.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbuff_subset.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
tvbuff_zlib.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
uat-int.h Continue to remove $Id$ from top of file 2014-03-31 15:59:51 +00:00
uat.c Remove now-unused functions. 2014-06-16 15:19:48 +00:00
uat.h Remove now-unused functions. 2014-06-16 15:19:48 +00:00
uat_load.l Removed SVN Id from epan dir. 2014-06-19 19:46:22 +00:00
value_string.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
value_string.h Add a hack to _VS_ENUM_XXX to prevent gcc "warning: comma at end of enumerator list [-pedantic]" 2014-04-18 03:20:52 +00:00
x264_prt_id.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
xdlc.c Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00
xdlc.h Remove all $Id$ from top of file 2014-03-04 14:27:33 +00:00