change the signature for the functions to decrypt data for the
dcerpc_auth_subdissector_fns structure. the SignAndSeal decryption (which works really well) needs this. svn path=/trunk/; revision=13688
This commit is contained in:
parent
420323a212
commit
0180d280fe
|
@ -603,7 +603,8 @@ static void dissect_auth_verf(tvbuff_t *auth_tvb, packet_info *pinfo,
|
|||
|
||||
/* Hand off payload data to a registered dissector */
|
||||
|
||||
static tvbuff_t *decode_encrypted_data(tvbuff_t *enc_tvb,
|
||||
static tvbuff_t *decode_encrypted_data(tvbuff_t *data_tvb,
|
||||
tvbuff_t *auth_tvb,
|
||||
packet_info *pinfo,
|
||||
dcerpc_auth_subdissector_fns *auth_fns,
|
||||
gboolean is_request,
|
||||
|
@ -617,7 +618,7 @@ static tvbuff_t *decode_encrypted_data(tvbuff_t *enc_tvb,
|
|||
fn = auth_fns->resp_data_fn;
|
||||
|
||||
if (fn)
|
||||
return fn(enc_tvb, 0, pinfo, auth_info);
|
||||
return fn(data_tvb, auth_tvb, 0, pinfo, auth_info);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2890,7 +2891,7 @@ dissect_dcerpc_cn_stub (tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
tvbuff_t *result;
|
||||
|
||||
result = decode_encrypted_data(
|
||||
payload_tvb, pinfo, auth_fns,
|
||||
payload_tvb, NULL, pinfo, auth_fns,
|
||||
hdr->ptype == PDU_REQ, auth_info);
|
||||
|
||||
if (result) {
|
||||
|
|
|
@ -304,7 +304,9 @@ typedef struct _dcerpc_uuid_value {
|
|||
|
||||
/* Authenticated pipe registration functions and miscellanea */
|
||||
|
||||
typedef tvbuff_t *(dcerpc_decode_data_fnct_t)(tvbuff_t *tvb, int offset,
|
||||
typedef tvbuff_t *(dcerpc_decode_data_fnct_t)(tvbuff_t *data_tvb,
|
||||
tvbuff_t *auth_tvb,
|
||||
int offset,
|
||||
packet_info *pinfo,
|
||||
dcerpc_auth_info *auth_info);
|
||||
|
||||
|
|
|
@ -1411,7 +1411,9 @@ dissect_ntlmssp_verf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
static tvbuff_t *
|
||||
dissect_ntlmssp_encrypted_payload(tvbuff_t *tvb, int offset,
|
||||
dissect_ntlmssp_encrypted_payload(tvbuff_t *data_tvb,
|
||||
tvbuff_t *auth_tvb _U_,
|
||||
int offset,
|
||||
packet_info *pinfo,
|
||||
dcerpc_auth_info *auth_info _U_)
|
||||
{
|
||||
|
@ -1424,7 +1426,7 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *tvb, int offset,
|
|||
ntlmssp_info *conv_ntlmssp_info = NULL;
|
||||
ntlmssp_packet_info *packet_ntlmssp_info = NULL;
|
||||
|
||||
encrypted_block_length = tvb_length_remaining (tvb, offset);
|
||||
encrypted_block_length = tvb_length_remaining (data_tvb, offset);
|
||||
|
||||
/* Check to see if we already have state for this packet */
|
||||
packet_ntlmssp_info = p_get_proto_data(pinfo->fd, proto_ntlmssp);
|
||||
|
@ -1470,7 +1472,7 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *tvb, int offset,
|
|||
|
||||
/* Store the decrypted contents in the packet state struct
|
||||
(of course at this point, they aren't decrypted yet) */
|
||||
packet_ntlmssp_info->decrypted_payload = tvb_memdup(tvb, offset,
|
||||
packet_ntlmssp_info->decrypted_payload = tvb_memdup(data_tvb, offset,
|
||||
encrypted_block_length);
|
||||
decrypted_payloads = g_slist_prepend(decrypted_payloads,
|
||||
packet_ntlmssp_info->decrypted_payload);
|
||||
|
@ -1495,7 +1497,7 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *tvb, int offset,
|
|||
encrypted_block_length,
|
||||
encrypted_block_length);
|
||||
|
||||
tvb_set_child_real_data_tvbuff(tvb, decr_tvb);
|
||||
tvb_set_child_real_data_tvbuff(data_tvb, decr_tvb);
|
||||
|
||||
offset += encrypted_block_length;
|
||||
|
||||
|
|
Loading…
Reference in New Issue