Commit graph

178 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
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
Martin Mathieson
9416835735 Revert part of previous change
svn path=/trunk/; revision=54979
2014-01-27 12:54:34 +00:00
Martin Mathieson
f903141d65 Send news of SecurityModeFailure to PDCP dissector, which will attempt to roll back to previous setting
svn path=/trunk/; revision=54978
2014-01-27 12:06:46 +00:00
Martin Mathieson
62249477b6 Remove #include and make the situation with snow3g clearer in a comment. May need further removal, depending upon concensus on wireshark-dev
svn path=/trunk/; revision=54827
2014-01-16 12:02:30 +00:00
Alexis La Goutte
85ab202c08 Fix -Wsometimes-uninitialized found by Clang
packet-pdcp-lte.c:1397:9: error: variable 'decrypted_data' is used uninitialized whenever 'if' condition is false
packet-pdcp-lte.c:1469:50: note: uninitialized use occurs here
    decrypted_tvb = tvb_new_child_real_data(tvb, decrypted_data, payload_length, payload_length);
packet-pdcp-lte.c:1353:27: note: initialize the variable 'decrypted_data' to silence this warning

packet-pdcp-lte.c:1397:9: error: variable 'payload_length' is used uninitialized whenever 'if' condition is false
packet-pdcp-lte.c:1469:66: note: uninitialized use occurs here
    decrypted_tvb = tvb_new_child_real_data(tvb, decrypted_data, payload_length, payload_length);
packet-pdcp-lte.c:1354:24: note: initialize the variable 'payload_length' to silence this warning

svn path=/trunk/; revision=54791
2014-01-14 17:44:21 +00:00
Pascal Quantin
330654baf8 SNOW3G is not available on default Wireshark
svn path=/trunk/; revision=54788
2014-01-14 16:48:43 +00:00
Martin Mathieson
293f8ca247 Make sure we allocate bytes for snow3g at least rounded up to next 4 byte boundary
svn path=/trunk/; revision=54786
2014-01-14 16:22:44 +00:00
Martin Mathieson
b948c75dfe Update a comment
svn path=/trunk/; revision=54785
2014-01-14 15:11:35 +00:00
Martin Mathieson
58e8800136 Add snow3g integrity (not quite working for me), but rework how integrity and ciphering functions and conditional compilation is done
svn path=/trunk/; revision=54784
2014-01-14 15:07:20 +00:00
Martin Mathieson
b01a99c385 Provide hook for calling EEA1 implementation (Snow3G). Implementation not supplied due to licensing conditions. TODO: EIA1.
svn path=/trunk/; revision=54782
2014-01-14 11:09:47 +00:00
Guy Harris
547efd4dc9 Cast away constness.
svn path=/trunk/; revision=54763
2014-01-14 05:17:06 +00:00
Martin Mathieson
830509b7dc Update a comment and fix some indentation
svn path=/trunk/; revision=54692
2014-01-10 17:56:55 +00:00
Martin Mathieson
f026d8a807 Call deciphering and integrity checking appropriately for
SecurityModeCommand and SecurityModeResponse.

Also show when integrity has been checked and found to be correct.

svn path=/trunk/; revision=54620
2014-01-06 18:18:04 +00:00
Martin Mathieson
f6bf6285ef Do EEA2 deciphering in-place, from Pascal
svn path=/trunk/; revision=54615
2014-01-06 11:28:20 +00:00
Pascal Quantin
3fb89feca6 EIA2 is now functional
svn path=/trunk/; revision=54579
2014-01-03 12:21:26 +00:00
Martin Mathieson
2719103661 Zero security struct to avoid reading garbage value, and remove a redundant test
svn path=/trunk/; revision=54506
2013-12-31 00:46:53 +00:00
Guy Harris
189debcadb Code that uses that parameter is #if 0'ed out, so _U_ it for now.
svn path=/trunk/; revision=54452
2013-12-25 09:23:33 +00:00
Martin Mathieson
21f8c1fb7b Show ciphering and integrity keys separately. Correct inputs to integrity calculation (result still not right with gcrypt 1.6 yet)
svn path=/trunk/; revision=54451
2013-12-25 08:44:43 +00:00
Martin Kaiser
7708c2a19f dirty hack to make things compile without libgcrypt
would it make sense to check global_pdcp_check_integrity inside
calculate_digest()?

svn path=/trunk/; revision=54438
2013-12-24 13:38:32 +00:00
Martin Mathieson
8cbcfcf6a4 Lop off last 4 bytes of payload to use for digest calculation. Still doesn't get expected result.
svn path=/trunk/; revision=54437
2013-12-24 07:24:39 +00:00
Martin Mathieson
57c6542aaf Still not quite working, but using MAC API with gcrypt 1.6 now for digest
svn path=/trunk/; revision=54427
2013-12-24 00:09:41 +00:00
Guy Harris
b71b269a23 Fix setup of new expert info item.
svn path=/trunk/; revision=54426
2013-12-23 22:05:23 +00:00
Alexis La Goutte
21eb60df17 Fix compilation after last change in packet-pdcp-lte (about unused parameter)
svn path=/trunk/; revision=54398
2013-12-23 18:12:16 +00:00
Martin Mathieson
7479af52e5 Add #if 0'd code to calculate CMAC digest, which isn't supported in windows build of libgcrypt currently getched by 'setup'.
svn path=/trunk/; revision=54388
2013-12-23 15:56:40 +00:00
Martin Mathieson
5b8f078f4b Remove printf() call
svn path=/trunk/; revision=54382
2013-12-23 13:53:56 +00:00
Martin Mathieson
9d688a9fde Call function and compare result with parsed mac-i. Now just need to do EIA2(AES) calculation
svn path=/trunk/; revision=54380
2013-12-23 13:43:13 +00:00
Martin Mathieson
27409e8f2e Use preference variable that wasn't used yet to pacify buildbot
svn path=/trunk/; revision=54378
2013-12-23 11:38:38 +00:00
Martin Mathieson
2f2b05aee2 Starting to get ready for integrity checking
svn path=/trunk/; revision=54377
2013-12-23 10:56:51 +00:00
Martin Mathieson
4509ef242d Change types and add cast to try to please buildbot
svn path=/trunk/; revision=54256
2013-12-19 17:48:32 +00:00
Martin Mathieson
62393a672e Cope with spaces or dashes in security keys
svn path=/trunk/; revision=54251
2013-12-19 17:21:36 +00:00
Martin Mathieson
ae50f1d21e Fix a test to allow deciphering to happen on the first pass, and close the gcrypt handles after use.
svn path=/trunk/; revision=54216
2013-12-18 13:08:57 +00:00
Martin Mathieson
d536d5fb7d Remove unused variables to try to unbreak MAC buildbots
svn path=/trunk/; revision=54213
2013-12-18 12:19:42 +00:00
Martin Mathieson
17e31af34f Only convert string key once, during update uat callback
svn path=/trunk/; revision=54212
2013-12-18 12:05:11 +00:00
Jeff Morriss
189a80048a Fix compilation when we don't HAVE_GCRYPT.
svn path=/trunk/; revision=54207
2013-12-18 02:16:42 +00:00
Anders Broman
e6d09c1634 Make local functions static. Include *.h when needed.
svn path=/trunk/; revision=54201
2013-12-17 22:07:32 +00:00
Alexis La Goutte
f1a440b539 Remove trailing whitespace and add modelines
svn path=/trunk/; revision=54187
2013-12-17 18:43:24 +00:00
Martin Mathieson
1b4ea6bb68 Preferences to control whether deciphering should be done for signalling and user plane
svn path=/trunk/; revision=54182
2013-12-17 16:40:42 +00:00
Martin Mathieson
e79de9873d First working version of deciphering with AES (EEA2). Lots of improvements still to make
svn path=/trunk/; revision=54180
2013-12-17 14:49:21 +00:00
Martin Mathieson
f9abd6f9e0 Fix compilation for when HAVE_LIBGCRYPT is not defined
svn path=/trunk/; revision=54162
2013-12-16 23:21:31 +00:00
Guy Harris
7851e21345 Fix compiler warnings.
svn path=/trunk/; revision=54161
2013-12-16 23:08:09 +00:00
Martin Mathieson
94b225a3ab Now calling function that will decipher payloads, if possible, and return a new tvb. Actual deciphering still to come...
svn path=/trunk/; revision=54149
2013-12-16 18:53:14 +00:00
Martin Mathieson
c1a20e5300 Reorganise main dissection function to that sequence analysis is done before signalling data payload
svn path=/trunk/; revision=54143
2013-12-16 15:03:41 +00:00
Martin Mathieson
e78173d830 Look up key (now by UEId, not RNTI) and display in security tree where known.
svn path=/trunk/; revision=54142
2013-12-16 11:47:04 +00:00
Martin Mathieson
74d627dfae Add configuration of UE keys (by RNTI). Still to show and use this info...
svn path=/trunk/; revision=54141
2013-12-16 11:18:53 +00:00
Jakub Zawadzki
1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Martin Mathieson
25cc056590 Missing from last commit - copy hfn into stored result for PDU
svn path=/trunk/; revision=53960
2013-12-12 13:23:28 +00:00
Martin Mathieson
9a6d3cf358 Show other security inputs (apart from keys)
svn path=/trunk/; revision=53959
2013-12-12 11:07:53 +00:00
Michael Mann
9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Martin Mathieson
65e3e91208 Tweak filter names for expert items, mostly to consistently use - rather than _
svn path=/trunk/; revision=53514
2013-11-22 17:18:11 +00:00