/* MS-GPEF section 2.2.1.2.2 EfsKey*/ static int dissect_gpef_efskey(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree) { proto_item *item = NULL; proto_tree *tree = NULL; int old_offset = offset; guint32 length1, sid_offset; guint32 cert_length, cert_offset; tvbuff_t *next_tvb; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if (parent_tree) { item = proto_tree_add_item(parent_tree, hf_gpef_efskey, tvb, -1, -1, ENC_NA); tree = proto_item_add_subtree(item, ett_gpef_efskey); } /* length 1 */ length1 = tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_gpef_efskey_length1, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* length 2 */ proto_tree_add_item(tree, hf_gpef_efskey_length2, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* sid offset */ sid_offset = tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_gpef_efskey_sid_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* reserved */ offset += 4; /* cert length */ cert_length = tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_gpef_efskey_cert_length, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* cert offset */ cert_offset = tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_gpef_efskey_cert_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* reserved, must be 0x20 0x00 0x00 0x00 */ offset += 4; /* sid */ dissect_nt_sid(tvb, old_offset+4+sid_offset, tree, "sid", NULL, -1); /* certificate */ next_tvb = tvb_new_subset(tvb, old_offset+4+cert_offset, cert_length, cert_length); (void)dissect_x509af_Certificate(FALSE, next_tvb, 0, &asn1_ctx, tree, hf_gpef_efskey_certificate); offset = old_offset + length1; proto_item_set_len(item, offset-old_offset); return offset; }
static void dissect_X509Certificate_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if((offset = strip_octet_string(tvb)) > 0) dissect_x509af_Certificate(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkcs12_X509Certificate_PDU); else proto_tree_add_text(tree, tvb, 0, 1, "BER Error: OCTET STRING expected"); }
static int hf_pkix1explicit_addressFamily_afn = -1; static int hf_pkix1explicit_addressFamily_safi = -1; static int ett_pkix1explicit_addressFamily = -1; #include "packet-pkix1explicit-hf.c" /* Initialize the subtree pointers */ #include "packet-pkix1explicit-ett.c" static const char *object_identifier_id; int dissect_pkix1explicit_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) { offset = dissect_x509af_Certificate(implicit_tag, tvb, offset, actx, tree, hf_index); return offset; } int dissect_pkix1explicit_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) { offset = dissect_x509af_CertificateList(implicit_tag, tvb, offset, actx, tree, hf_index); return offset; } int dissect_pkix1explicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) { offset = dissect_x509ce_GeneralName(implicit_tag, tvb, offset, actx, tree, hf_index); return offset; }