diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-27 10:59:09 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-28 09:20:27 +0000 |
commit | 44d98dafd49f7133569f0d982ddf0746c230322f (patch) | |
tree | 6d7cd14756c95c8a7fa246cd8df1cb36dad6edca /epan/dissectors/packet-gssapi.c | |
parent | 05121be1b4ea35257bfcd8ed38d2312b1519f370 (diff) |
Remove the GSSAPI specific members out of packet_info structure.
The last piece was the NTLMSSP dissector and that is now handled by passing a pointer to a tvbuff* as dissector data for the NTLMSSP dissector to (possibly) "return" a tvbuff* with decrypted data.
Change-Id: I2606172e4d0ebb5fc6353921d5b5f41a4792f9e5
Reviewed-on: https://code.wireshark.org/review/12232
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gssapi.c')
-rw-r--r-- | epan/dissectors/packet-gssapi.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c index ec0c54e8f9..1f556af7d1 100644 --- a/epan/dissectors/packet-gssapi.c +++ b/epan/dissectors/packet-gssapi.c @@ -336,9 +336,9 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo, subtree); } else if( encrypt_info->gssapi_encrypted_tvb ) { - return_offset = call_dissector(ntlmssp_data_only_handle, + return_offset = call_dissector_with_data(ntlmssp_data_only_handle, tvb_new_subset_remaining(encrypt_info->gssapi_encrypted_tvb, 0), - pinfo, subtree); + pinfo, subtree, &encrypt_info->gssapi_decrypted_tvb); encrypt_info->gssapi_data_encrypted = TRUE; } goto done; @@ -521,49 +521,29 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, return return_offset; } -/* XXX - This should be TEMPORARY until these members in are removed from packet_info */ -static void packet_info_to_gssapi_encrypt(packet_info *pinfo, gssapi_encrypt_info_t* encrypt_info) -{ - encrypt_info->decrypt_gssapi_tvb = pinfo->decrypt_gssapi_tvb; - encrypt_info->gssapi_wrap_tvb = pinfo->gssapi_wrap_tvb; - encrypt_info->gssapi_encrypted_tvb = pinfo->gssapi_encrypted_tvb; - encrypt_info->gssapi_decrypted_tvb = pinfo->gssapi_decrypted_tvb; - encrypt_info->gssapi_data_encrypted = pinfo->gssapi_data_encrypted; -} - static int dissect_gssapi_work_wrapper(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gssapi_encrypt_info_t* encrypt_info, gboolean is_verifier) { int ret; gssapi_encrypt_info_t pass_encrypt_info; - /* XXX - This is setup to hopefully remove the need for these members in packet_info - * Setup the dissector to take them as arguments and for now, convert to - * packet_info - */ + /* Ensure a non-null encryption structure */ if (encrypt_info != NULL) { pass_encrypt_info = *encrypt_info; } else { - packet_info_to_gssapi_encrypt(pinfo, &pass_encrypt_info); + memset(&pass_encrypt_info, 0, sizeof(pass_encrypt_info)); } ret = dissect_gssapi_work(tvb, pinfo, tree, is_verifier, &pass_encrypt_info); + /* Restore any changes to provided encryption structure */ if (encrypt_info != NULL) { *encrypt_info = pass_encrypt_info; } - else - { - /* Just clean up */ - pinfo->decrypt_gssapi_tvb=0; - pinfo->gssapi_wrap_tvb=NULL; - pinfo->gssapi_encrypted_tvb=NULL; - pinfo->gssapi_decrypted_tvb=NULL; - } return ret; } |