more packet-kerberos...
authorStefan Metzmacher <metze@samba.org>
Sat, 28 Feb 2015 09:31:40 +0000 (10:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 20 Jan 2019 22:14:58 +0000 (23:14 +0100)
Change-Id: I2287260e005cc5740eef58305d15528ccd2a6438

epan/dissectors/asn1/kerberos/k5.asn
epan/dissectors/asn1/kerberos/kerberos.cnf
epan/dissectors/asn1/kerberos/packet-kerberos-template.c

index ecfeec86051cf7ca89a7c1ed3314d5854639e5ae..7f93cb89858019adb31a91e3f83949ba4dfa67e8 100644 (file)
@@ -837,13 +837,6 @@ PA-ServerReferralData ::= SEQUENCE {
        referral-valid-until     [3] KerberosTime OPTIONAL,
        ...
 }
--- WS put extensions found elsewere here
--- http://msdn.microsoft.com/en-us/library/cc206948.aspx
---
-KERB-PA-PAC-REQUEST ::= SEQUENCE { 
-include-pac[0] BOOLEAN --If TRUE, and no pac present, include PAC. 
-                       --If FALSE, and PAC present, remove PAC 
-} 
 
 PAC-OptionFlags ::= BIT STRING {
        claims(0),
@@ -864,8 +857,6 @@ KERB-AD-RESTRICTION-ENTRY ::= [UNIVERSAL 16] SEQUENCE {
        restriction             [1] OCTET STRING -- LSAP_TOKEN_INFO_INTEGRITY structure
 }
 
-PA-PW-SALT ::= KerberosString
-
 END
 
 -- etags -r '/\([A-Za-z][-A-Za-z0-9]*\).*::=/\1/' k5.asn1
index d37a30624e58addcc15205ace4259c52fc378fcc..c1eb4857c3ab696cd589cffeb70f4d2047f7d823 100644 (file)
@@ -46,7 +46,6 @@ Krb5uint32
 PA-ClientCanonicalized
 PA-ClientCanonicalizedNames
 PA-ENC-SAM-RESPONSE-ENC
-PA-PAC-REQUEST
 PA-SAM-CHALLENGE-2
 PA-SAM-CHALLENGE-2-BODY
 PA-SAM-REDIRECT
@@ -160,10 +159,10 @@ guint32 msgtype;
        case KRB5_ET_KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET:
        case KRB5_ET_KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS:
                offset=dissect_ber_octet_string_wcb(FALSE, actx, tree, tvb, offset, hf_kerberos_e_data, dissect_kerberos_SEQUENCE_OF_PA_DATA);
-
                break;
        default:
                offset=dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_kerberos_e_data, NULL);
+               break;
        }
 
 
@@ -196,7 +195,7 @@ guint32 msgtype;
                offset=dissect_ber_octet_string_wcb(FALSE, actx, sub_tree, tvb, offset,hf_index, dissect_pkinit_PaPkAsRep);
                break;
        case KERBEROS_PA_PAC_REQUEST:
-               offset=dissect_ber_octet_string_wcb(FALSE, actx, sub_tree, tvb, offset,hf_index, dissect_kerberos_KERB_PA_PAC_REQUEST);
+               offset=dissect_ber_octet_string_wcb(FALSE, actx, sub_tree, tvb, offset,hf_index, dissect_kerberos_PA_PAC_REQUEST);
                break;
        case KERBEROS_PA_FOR_USER: /* S4U2SELF */
                offset=dissect_ber_octet_string_wcb(FALSE, actx, sub_tree, tvb, offset,hf_index, dissect_kerberos_PA_S4U2Self);
@@ -253,6 +252,7 @@ guint32 msgtype;
                break;
        default:
                offset=dissect_ber_octet_string_wcb(FALSE, actx, sub_tree, tvb, offset,hf_index, NULL);
+               break;
        }
 
 #.FN_BODY HostAddress/address
@@ -291,6 +291,7 @@ guint32 msgtype;
        default:
                proto_tree_add_expert(tree, actx->pinfo, &ei_kerberos_address, tvb, offset, len);
                address_str = NULL;
+               break;
        }
 
        /* push it up two levels in the decode pane */
@@ -382,6 +383,7 @@ guint32 msgtype;
                break;
        default:
                offset=dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, NULL);
+               break;
        }
        return offset;
 
@@ -466,6 +468,7 @@ guint32 msgtype;
                break;
        default:
                offset=dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
+               break;
        }
 
 #.FN_BODY S4UUserID/subject-certificate
@@ -593,6 +596,7 @@ guint32 msgtype;
                break;
        default:
                offset=dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
+               break;
        }
 
 #.FN_BODY KrbFastResponse/strengthen-key
index 84af7db3e8ee6d2d7c005adaa005fc37f73a9cad..9920bcbdedb99bd05a22cec6699f831474916a26 100644 (file)
@@ -128,10 +128,9 @@ static dissector_handle_t kerberos_handle_udp;
 static int dissect_kerberos_Applications(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_PA_ENC_TIMESTAMP(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_PA_ENC_TS_ENC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
-static int dissect_kerberos_KERB_PA_PAC_REQUEST(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+static int dissect_kerberos_PA_PAC_REQUEST(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_PA_S4U2Self(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_PA_S4U_X509_USER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
-static int dissect_kerberos_PA_PW_SALT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_ETYPE_INFO(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_ETYPE_INFO2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 static int dissect_kerberos_AD_IF_RELEVANT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
@@ -1805,6 +1804,7 @@ static int
 dissect_krb5_PW_SALT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_)
 {
        kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
+       gint remaining = tvb_reported_length_remaining(tvb, offset);
        guint32 nt_status = 0;
        guint32 val_0 = 0;
        guint32 val_1 = 0;
@@ -1817,7 +1817,7 @@ dissect_krb5_PW_SALT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
                goto no_error;
        }
 
-       if (tvb_reported_length_remaining(tvb, offset) != 12) {
+       if (remaining != 12) {
                goto no_error;
        }
 
@@ -1856,8 +1856,7 @@ dissect_krb5_PW_SALT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
        return offset;
 
  no_error:
-       return dissect_kerberos_PA_PW_SALT(implicit_tag, tvb, offset,
-                                          actx, tree, hf_index);
+       return offset + remaining;
 }
 
 static int