Kerberos: fix decryption of DCERPC with Kerberos encryption
Bug: 10538 Change-Id: I4e6feaf218da7f977f6c63d8bc204635f387672c Reviewed-on: https://code.wireshark.org/review/4566 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
7690afbc54
commit
112c90a04b
|
@ -305,14 +305,15 @@ guint32 msgtype;
|
|||
&gbl_keytype);
|
||||
private_data->key.keytype = gbl_keytype;
|
||||
|
||||
#.FN_BODY EncryptionKey/keyvalue
|
||||
#.FN_BODY EncryptionKey/keyvalue VAL_PTR=&out_tvb
|
||||
tvbuff_t *out_tvb;
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
private_data->key.keylength = tvb_length_remaining(tvb, offset);
|
||||
private_data->key.keyvalue = tvb_get_ptr(tvb, offset, private_data->key.keylength);
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
private_data->key.keylength = tvb_reported_length(out_tvb);
|
||||
private_data->key.keyvalue = tvb_get_ptr(out_tvb, 0, private_data->key.keylength);
|
||||
|
||||
#.FN_BODY EncryptionKey
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
|
|
|
@ -2229,15 +2229,16 @@ dissect_kerberos_T_keytype(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
|
|||
static int
|
||||
dissect_kerberos_T_keyvalue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 309 "../../asn1/kerberos/kerberos.cnf"
|
||||
tvbuff_t *out_tvb;
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
private_data->key.keylength = tvb_length_remaining(tvb, offset);
|
||||
private_data->key.keyvalue = tvb_get_ptr(tvb, offset, private_data->key.keylength);
|
||||
|
||||
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
NULL);
|
||||
&out_tvb);
|
||||
|
||||
|
||||
private_data->key.keylength = tvb_reported_length(out_tvb);
|
||||
private_data->key.keyvalue = tvb_get_ptr(out_tvb, 0, private_data->key.keylength);
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -2252,7 +2253,7 @@ static const ber_sequence_t EncryptionKey_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_kerberos_EncryptionKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 317 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 318 "../../asn1/kerberos/kerberos.cnf"
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
|
||||
|
@ -2274,7 +2275,7 @@ dissect_kerberos_EncryptionKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
|
||||
static int
|
||||
dissect_kerberos_T_ad_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 328 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 329 "../../asn1/kerberos/kerberos.cnf"
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
&(private_data->ad_type));
|
||||
|
@ -2288,7 +2289,7 @@ dissect_kerberos_T_ad_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
|
|||
|
||||
static int
|
||||
dissect_kerberos_T_ad_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 333 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 334 "../../asn1/kerberos/kerberos.cnf"
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
switch(private_data->ad_type){
|
||||
|
@ -2434,7 +2435,7 @@ static const value_string kerberos_ADDR_TYPE_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_kerberos_ADDR_TYPE(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 344 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 345 "../../asn1/kerberos/kerberos.cnf"
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
&(private_data->addr_type));
|
||||
|
@ -2865,7 +2866,7 @@ static const ber_sequence_t KDC_REQ_BODY_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_kerberos_KDC_REQ_BODY(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 348 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 349 "../../asn1/kerberos/kerberos.cnf"
|
||||
conversation_t *conversation;
|
||||
|
||||
/*
|
||||
|
@ -3117,7 +3118,7 @@ dissect_kerberos_AP_REP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
|
||||
static int
|
||||
dissect_kerberos_T_kRB_SAFE_BODY_user_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 371 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 372 "../../asn1/kerberos/kerberos.cnf"
|
||||
tvbuff_t *new_tvb;
|
||||
offset=dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &new_tvb);
|
||||
if (new_tvb) {
|
||||
|
@ -3439,7 +3440,7 @@ dissect_kerberos_EncAPRepPart(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
|
||||
static int
|
||||
dissect_kerberos_T_encKrbPrivPart_user_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 378 "../../asn1/kerberos/kerberos.cnf"
|
||||
#line 379 "../../asn1/kerberos/kerberos.cnf"
|
||||
tvbuff_t *new_tvb;
|
||||
offset=dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &new_tvb);
|
||||
if (new_tvb) {
|
||||
|
|
Loading…
Reference in New Issue