TODO: KERBEROS_AD_TARGET_PRINCIPAL (144) TODO ask Microsoft...
authorStefan Metzmacher <metze@samba.org>
Thu, 19 Oct 2017 11:23:36 +0000 (13:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2018 14:09:07 +0000 (16:09 +0200)
Change-Id: Ie7017fe31125edc0315653c13831373ac3e67be8

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

index a4914d400c7f52d30ce2438de02ee9e2f433d33b..050fc728dc8557c2aec7c17caccc01ec6c472197 100644 (file)
@@ -135,6 +135,7 @@ AUTHDATA-TYPE ::= INTEGER {
        aD-TOKEN-RESTRICTIONS(141),             -- [MS-KILE]
        aD-LOCAL(142),                  -- [MS-KILE]
        aD-AP-OPTIONS(143),                     -- [MS-KILE]
+       aD-TARGET-PRINCIPAL(144),                       -- ??? [MS-KILE] ???
        aD-SIGNTICKET-OLDER(-17),
        -- aD-SIGNTICKET-OLD(142),
        aD-SIGNTICKET(512)
index 71982a4f4b89f02c275bc1dcb81d570516f677b9..e96a3cb48ca38028dc782de0c8d33ec75acabf2d 100644 (file)
@@ -473,6 +473,9 @@ guint32 msgtype;
        case KERBEROS_AD_AP_OPTIONS:
                offset=dissect_ber_octet_string_wcb(implicit_tag, actx, tree, tvb, offset, hf_index, dissect_kerberos_AD_AP_OPTIONS);
                break;
+       case KERBEROS_AD_TARGET_PRINCIPAL:
+               offset=dissect_ber_octet_string_wcb(implicit_tag, actx, tree, tvb, offset, hf_index, dissect_kerberos_AD_TARGET_PRINCIPAL);
+               break;
        case KERBEROS_AD_AUTHENTICATION_STRENGTH:
                offset=dissect_ber_octet_string_wcb(implicit_tag, actx, tree, tvb, offset, hf_index, dissect_kerberos_PA_AUTHENTICATION_SET);
                break;
index 446b66d55c0c7558d78552fb67f975ed04db7870..0103aac2ef2dd7b2efed9ce4c63a288f7d26f25f 100644 (file)
@@ -145,6 +145,7 @@ static int dissect_kerberos_PA_PAC_OPTIONS(gboolean implicit_tag _U_, tvbuff_t *
 static int dissect_kerberos_KERB_AD_RESTRICTION_ENTRY(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_SEQUENCE_OF_ENCTYPE(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_AP_OPTIONS(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_TARGET_PRINCIPAL(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_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
 
 /* Desegment Kerberos over TCP messages */
@@ -217,6 +218,7 @@ static gint hf_krb_pa_supported_enctypes_claims_supported = -1;
 static gint hf_krb_pa_supported_enctypes_resource_sid_compression_disabled = -1;
 static gint hf_krb_ad_ap_options = -1;
 static gint hf_krb_ad_ap_options_cbt = -1;
+static gint hf_krb_ad_target_principal = -1;
 #include "packet-kerberos-hf.c"
 
 /* Initialize the subtree pointers */
@@ -1898,6 +1900,25 @@ dissect_kerberos_AD_AP_OPTIONS(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
 
        return offset;
 }
+
+static int
+dissect_kerberos_AD_TARGET_PRINCIPAL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
+                                    int offset _U_, asn1_ctx_t *actx _U_,
+                                    proto_tree *tree _U_, int hf_index _U_)
+{
+       int tp_offset, tp_len;
+       const char *tp;
+       guint16 bc;
+
+       bc = tvb_reported_length_remaining(tvb, offset);
+       tp_offset = offset;
+       tp_len = bc;
+       tp = get_unicode_or_ascii_string(tvb, &offset, TRUE, &tp_len, TRUE, TRUE, &bc);
+       proto_tree_add_string(tree, hf_krb_ad_target_principal, tvb, tp_offset, tp_len, tp);
+
+       return offset;
+}
+
 /* Dissect a GSSAPI checksum as per RFC1964. This is NOT ASN.1 encoded.
  */
 static int
@@ -2858,6 +2879,9 @@ void proto_register_kerberos(void) {
        { &hf_krb_ad_ap_options_cbt,
          { "ChannelBindings", "kerberos.ad_ap_options.cbt",
            FT_BOOLEAN, 32, TFS(&set_tfs), 0x00004000, NULL, HFILL }},
+       { &hf_krb_ad_target_principal, {
+               "Target Principal", "kerberos.ad_target_principal", FT_STRING, BASE_NONE,
+               NULL, 0, NULL, HFILL }},
 
 #include "packet-kerberos-hfarr.c"
        };