Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ess.c
blobbd561c5175556bb96a75c122da2c1a987cf9b428
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-ess.c */
4 /* asn2wrs.py -b -k -C -q -L -p ess -c ./ess.cnf -s ./packet-ess-template -D . -O ../.. ExtendedSecurityServices.asn */
6 /* packet-ess.c
7 * Routines for RFC 2634 and RFC 5035 Extended Security Services packet
8 * dissection
9 * Ronnie Sahlberg 2004
10 * Stig Bjorlykke 2010
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * SPDX-License-Identifier: GPL-2.0-or-later
19 #include "config.h"
21 #include <epan/packet.h>
22 #include <epan/asn1.h>
23 #include <epan/prefs.h>
24 #include <epan/uat.h>
25 #include <wsutil/array.h>
27 #include "packet-ber.h"
28 #include "packet-ess.h"
29 #include "packet-cms.h"
30 #include "packet-x509ce.h"
31 #include "packet-x509af.h"
33 #define PNAME "Extended Security Services"
34 #define PSNAME "ESS"
35 #define PFNAME "ess"
37 void proto_register_ess(void);
38 void proto_reg_handoff_ess(void);
40 typedef struct _ess_category_attributes_t {
41 char *oid;
42 unsigned lacv;
43 char *name;
44 } ess_category_attributes_t;
46 static ess_category_attributes_t *ess_category_attributes;
47 static unsigned num_ess_category_attributes;
49 /* Initialize the protocol and registered fields */
50 static int proto_ess;
51 static int hf_ess_SecurityCategory_type_OID;
52 static int hf_ess_Category_attribute;
54 static int ett_Category_attributes;
56 static int hf_ess_ReceiptRequest_PDU; /* ReceiptRequest */
57 static int hf_ess_ContentIdentifier_PDU; /* ContentIdentifier */
58 static int hf_ess_Receipt_PDU; /* Receipt */
59 static int hf_ess_ContentHints_PDU; /* ContentHints */
60 static int hf_ess_MsgSigDigest_PDU; /* MsgSigDigest */
61 static int hf_ess_ContentReference_PDU; /* ContentReference */
62 static int hf_ess_ess_ESSSecurityLabel_PDU; /* ESSSecurityLabel */
63 static int hf_ess_RestrictiveTag_PDU; /* RestrictiveTag */
64 static int hf_ess_EnumeratedTag_PDU; /* EnumeratedTag */
65 static int hf_ess_PermissiveTag_PDU; /* PermissiveTag */
66 static int hf_ess_InformativeTag_PDU; /* InformativeTag */
67 static int hf_ess_EquivalentLabels_PDU; /* EquivalentLabels */
68 static int hf_ess_MLExpansionHistory_PDU; /* MLExpansionHistory */
69 static int hf_ess_SigningCertificate_PDU; /* SigningCertificate */
70 static int hf_ess_SigningCertificateV2_PDU; /* SigningCertificateV2 */
71 static int hf_ess_signedContentIdentifier; /* ContentIdentifier */
72 static int hf_ess_receiptsFrom; /* ReceiptsFrom */
73 static int hf_ess_receiptsTo; /* SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames */
74 static int hf_ess_receiptsTo_item; /* GeneralNames */
75 static int hf_ess_allOrFirstTier; /* AllOrFirstTier */
76 static int hf_ess_receiptList; /* SEQUENCE_OF_GeneralNames */
77 static int hf_ess_receiptList_item; /* GeneralNames */
78 static int hf_ess_version; /* ESSVersion */
79 static int hf_ess_contentType; /* ContentType */
80 static int hf_ess_originatorSignatureValue; /* OCTET_STRING */
81 static int hf_ess_contentDescription; /* UTF8String_SIZE_1_MAX */
82 static int hf_ess_security_policy_identifier; /* SecurityPolicyIdentifier */
83 static int hf_ess_security_classification; /* SecurityClassification */
84 static int hf_ess_privacy_mark; /* ESSPrivacyMark */
85 static int hf_ess_security_categories; /* SecurityCategories */
86 static int hf_ess_pString; /* PrintableString_SIZE_1_ub_privacy_mark_length */
87 static int hf_ess_utf8String; /* UTF8String_SIZE_1_MAX */
88 static int hf_ess_SecurityCategories_item; /* SecurityCategory */
89 static int hf_ess_type; /* T_type */
90 static int hf_ess_value; /* T_value */
91 static int hf_ess_restrictiveTagName; /* T_restrictiveTagName */
92 static int hf_ess_restrictiveAttributeFlags; /* T_restrictiveAttributeFlags */
93 static int hf_ess_tagName; /* T_tagName */
94 static int hf_ess_attributeList; /* SET_OF_SecurityAttribute */
95 static int hf_ess_attributeList_item; /* SecurityAttribute */
96 static int hf_ess_permissiveTagName; /* T_permissiveTagName */
97 static int hf_ess_permissiveAttributeFlags; /* T_permissiveAttributeFlags */
98 static int hf_ess_informativeTagName; /* T_informativeTagName */
99 static int hf_ess_attributes; /* FreeFormField */
100 static int hf_ess_informativeAttributeFlags; /* T_informativeAttributeFlags */
101 static int hf_ess_securityAttributes; /* SET_OF_SecurityAttribute */
102 static int hf_ess_securityAttributes_item; /* SecurityAttribute */
103 static int hf_ess_EquivalentLabels_item; /* ESSSecurityLabel */
104 static int hf_ess_MLExpansionHistory_item; /* MLData */
105 static int hf_ess_mailListIdentifier; /* EntityIdentifier */
106 static int hf_ess_expansionTime; /* GeneralizedTime */
107 static int hf_ess_mlReceiptPolicy; /* MLReceiptPolicy */
108 static int hf_ess_issuerAndSerialNumber; /* IssuerAndSerialNumber */
109 static int hf_ess_subjectKeyIdentifier; /* SubjectKeyIdentifier */
110 static int hf_ess_none; /* NULL */
111 static int hf_ess_insteadOf; /* SEQUENCE_SIZE_1_MAX_OF_GeneralNames */
112 static int hf_ess_insteadOf_item; /* GeneralNames */
113 static int hf_ess_inAdditionTo; /* SEQUENCE_SIZE_1_MAX_OF_GeneralNames */
114 static int hf_ess_inAdditionTo_item; /* GeneralNames */
115 static int hf_ess_certs; /* SEQUENCE_OF_ESSCertID */
116 static int hf_ess_certs_item; /* ESSCertID */
117 static int hf_ess_policies; /* SEQUENCE_OF_PolicyInformation */
118 static int hf_ess_policies_item; /* PolicyInformation */
119 static int hf_ess_certsV2; /* SEQUENCE_OF_ESSCertIDv2 */
120 static int hf_ess_certsV2_item; /* ESSCertIDv2 */
121 static int hf_ess_hashAlgorithm; /* AlgorithmIdentifier */
122 static int hf_ess_certHash; /* Hash */
123 static int hf_ess_issuerSerial; /* IssuerSerial */
124 static int hf_ess_issuer; /* GeneralNames */
125 static int hf_ess_serialNumber; /* CertificateSerialNumber */
127 #define ub_receiptsTo 16
128 #define id_aa_receiptRequest "1.2.840.113549.1.9.16.2.1"
129 #define id_aa_contentIdentifier "1.2.840.113549.1.9.16.2.7"
130 #define id_ct_receipt "1.2.840.113549.1.9.16.1.1"
131 #define id_aa_contentHint "1.2.840.113549.1.9.16.2.4"
132 #define id_aa_msgSigDigest "1.2.840.113549.1.9.16.2.5"
133 #define id_aa_contentReference "1.2.840.113549.1.9.16.2.10"
134 #define id_aa_securityLabel "1.2.840.113549.1.9.16.2.2"
135 #define ub_integer_options 256
136 #define ub_privacy_mark_length 128
137 #define ub_security_categories 64
138 #define id_aa_equivalentLabels "1.2.840.113549.1.9.16.2.9"
139 #define id_aa_mlExpandHistory "1.2.840.113549.1.9.16.2.3"
140 #define ub_ml_expansion_history 64
141 #define id_aa_signingCertificate "1.2.840.113549.1.9.16.2.12"
142 #define id_aa_signingCertificateV2 "1.2.840.113549.1.9.16.2.47"
143 #define id_sha256 "2.16.840.1.101.3.4.2.1"
145 /* Initialize the subtree pointers */
146 static int ett_ess_ReceiptRequest;
147 static int ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames;
148 static int ett_ess_ReceiptsFrom;
149 static int ett_ess_SEQUENCE_OF_GeneralNames;
150 static int ett_ess_Receipt;
151 static int ett_ess_ContentHints;
152 static int ett_ess_ContentReference;
153 static int ett_ess_ESSSecurityLabel;
154 static int ett_ess_ESSPrivacyMark;
155 static int ett_ess_SecurityCategories;
156 static int ett_ess_SecurityCategory;
157 static int ett_ess_RestrictiveTag;
158 static int ett_ess_EnumeratedTag;
159 static int ett_ess_SET_OF_SecurityAttribute;
160 static int ett_ess_PermissiveTag;
161 static int ett_ess_InformativeTag;
162 static int ett_ess_FreeFormField;
163 static int ett_ess_EquivalentLabels;
164 static int ett_ess_MLExpansionHistory;
165 static int ett_ess_MLData;
166 static int ett_ess_EntityIdentifier;
167 static int ett_ess_MLReceiptPolicy;
168 static int ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames;
169 static int ett_ess_SigningCertificate;
170 static int ett_ess_SEQUENCE_OF_ESSCertID;
171 static int ett_ess_SEQUENCE_OF_PolicyInformation;
172 static int ett_ess_SigningCertificateV2;
173 static int ett_ess_SEQUENCE_OF_ESSCertIDv2;
174 static int ett_ess_ESSCertIDv2;
175 static int ett_ess_ESSCertID;
176 static int ett_ess_IssuerSerial;
178 static const char *object_identifier_id;
180 UAT_CSTRING_CB_DEF(ess_category_attributes, oid, ess_category_attributes_t)
181 UAT_DEC_CB_DEF(ess_category_attributes, lacv, ess_category_attributes_t)
182 UAT_CSTRING_CB_DEF(ess_category_attributes, name, ess_category_attributes_t)
184 static void *
185 ess_copy_cb(void *dest, const void *orig, size_t len _U_)
187 ess_category_attributes_t *u = (ess_category_attributes_t *)dest;
188 const ess_category_attributes_t *o = (const ess_category_attributes_t *)orig;
190 u->oid = g_strdup(o->oid);
191 u->lacv = o->lacv;
192 u->name = g_strdup(o->name);
194 return dest;
197 static void
198 ess_free_cb(void *r)
200 ess_category_attributes_t *u = (ess_category_attributes_t *)r;
202 g_free(u->oid);
203 g_free(u->name);
206 static void
207 ess_dissect_attribute (uint32_t value, asn1_ctx_t *actx)
209 unsigned i;
211 for (i = 0; i < num_ess_category_attributes; i++) {
212 ess_category_attributes_t *u = &(ess_category_attributes[i]);
214 if ((strcmp (u->oid, object_identifier_id) == 0) &&
215 (u->lacv == value))
217 proto_item_append_text (actx->created_item, " (%s)", u->name);
218 break;
223 static void
224 ess_dissect_attribute_flags (tvbuff_t *tvb, asn1_ctx_t *actx)
226 proto_tree *tree;
227 uint8_t *value;
228 unsigned i;
230 tree = proto_item_add_subtree (actx->created_item, ett_Category_attributes);
231 value = (uint8_t *)tvb_memdup (actx->pinfo->pool, tvb, 0, tvb_captured_length (tvb));
233 for (i = 0; i < num_ess_category_attributes; i++) {
234 ess_category_attributes_t *u = &(ess_category_attributes[i]);
236 if ((strcmp (u->oid, object_identifier_id) == 0) &&
237 ((u->lacv / 8) < tvb_captured_length (tvb)) &&
238 (value[u->lacv / 8] & (1U << (7 - (u->lacv % 8)))))
240 proto_tree_add_string_format (tree, hf_ess_Category_attribute, tvb,
241 u->lacv / 8, 1, u->name,
242 "%s (%d)", u->name, u->lacv);
249 static int
250 dissect_ess_ContentIdentifier(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
251 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
252 NULL);
254 return offset;
258 static const value_string ess_AllOrFirstTier_vals[] = {
259 { 0, "allReceipts" },
260 { 1, "firstTierRecipients" },
261 { 0, NULL }
265 static int
266 dissect_ess_AllOrFirstTier(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
267 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
268 NULL);
270 return offset;
274 static const ber_sequence_t SEQUENCE_OF_GeneralNames_sequence_of[1] = {
275 { &hf_ess_receiptList_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
278 static int
279 dissect_ess_SEQUENCE_OF_GeneralNames(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
280 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
281 SEQUENCE_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_OF_GeneralNames);
283 return offset;
287 static const value_string ess_ReceiptsFrom_vals[] = {
288 { 0, "allOrFirstTier" },
289 { 1, "receiptList" },
290 { 0, NULL }
293 static const ber_choice_t ReceiptsFrom_choice[] = {
294 { 0, &hf_ess_allOrFirstTier , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_AllOrFirstTier },
295 { 1, &hf_ess_receiptList , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_OF_GeneralNames },
296 { 0, NULL, 0, 0, 0, NULL }
299 static int
300 dissect_ess_ReceiptsFrom(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
301 offset = dissect_ber_choice(actx, tree, tvb, offset,
302 ReceiptsFrom_choice, hf_index, ett_ess_ReceiptsFrom,
303 NULL);
305 return offset;
309 static const ber_sequence_t SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames_sequence_of[1] = {
310 { &hf_ess_receiptsTo_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
313 static int
314 dissect_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
315 offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
316 1, ub_receiptsTo, SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames);
318 return offset;
322 static const ber_sequence_t ReceiptRequest_sequence[] = {
323 { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
324 { &hf_ess_receiptsFrom , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_ReceiptsFrom },
325 { &hf_ess_receiptsTo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames },
326 { NULL, 0, 0, 0, NULL }
329 static int
330 dissect_ess_ReceiptRequest(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
331 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
332 ReceiptRequest_sequence, hf_index, ett_ess_ReceiptRequest);
334 return offset;
338 static const value_string ess_ESSVersion_vals[] = {
339 { 1, "v1" },
340 { 0, NULL }
344 static int
345 dissect_ess_ESSVersion(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
346 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
347 NULL);
349 return offset;
354 static int
355 dissect_ess_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
356 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
357 NULL);
359 return offset;
363 static const ber_sequence_t Receipt_sequence[] = {
364 { &hf_ess_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_ess_ESSVersion },
365 { &hf_ess_contentType , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
366 { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
367 { &hf_ess_originatorSignatureValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_OCTET_STRING },
368 { NULL, 0, 0, 0, NULL }
371 static int
372 dissect_ess_Receipt(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
373 col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, "ESS");
374 col_set_str(actx->pinfo->cinfo, COL_INFO, "Signed Receipt");
375 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
376 Receipt_sequence, hf_index, ett_ess_Receipt);
380 return offset;
385 static int
386 dissect_ess_UTF8String_SIZE_1_MAX(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
387 offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
388 actx, tree, tvb, offset,
389 1, NO_BOUND, hf_index, NULL);
391 return offset;
395 static const ber_sequence_t ContentHints_sequence[] = {
396 { &hf_ess_contentDescription, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_UTF8String_SIZE_1_MAX },
397 { &hf_ess_contentType , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
398 { NULL, 0, 0, 0, NULL }
401 static int
402 dissect_ess_ContentHints(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
403 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
404 ContentHints_sequence, hf_index, ett_ess_ContentHints);
406 return offset;
411 static int
412 dissect_ess_MsgSigDigest(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
413 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
414 NULL);
416 return offset;
420 static const ber_sequence_t ContentReference_sequence[] = {
421 { &hf_ess_contentType , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
422 { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
423 { &hf_ess_originatorSignatureValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_OCTET_STRING },
424 { NULL, 0, 0, 0, NULL }
427 static int
428 dissect_ess_ContentReference(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
429 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
430 ContentReference_sequence, hf_index, ett_ess_ContentReference);
432 return offset;
437 static int
438 dissect_ess_SecurityPolicyIdentifier(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
439 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
441 return offset;
445 static const value_string ess_SecurityClassification_vals[] = {
446 { 0, "unmarked" },
447 { 1, "unclassified" },
448 { 2, "restricted" },
449 { 3, "confidential" },
450 { 4, "secret" },
451 { 5, "top-secret" },
452 { 0, NULL }
456 static int
457 dissect_ess_SecurityClassification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
458 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
459 0U, ub_integer_options, hf_index, NULL);
461 return offset;
466 static int
467 dissect_ess_PrintableString_SIZE_1_ub_privacy_mark_length(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
468 offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
469 actx, tree, tvb, offset,
470 1, ub_privacy_mark_length, hf_index, NULL);
472 return offset;
476 static const value_string ess_ESSPrivacyMark_vals[] = {
477 { 0, "pString" },
478 { 1, "utf8String" },
479 { 0, NULL }
482 static const ber_choice_t ESSPrivacyMark_choice[] = {
483 { 0, &hf_ess_pString , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_ess_PrintableString_SIZE_1_ub_privacy_mark_length },
484 { 1, &hf_ess_utf8String , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_ess_UTF8String_SIZE_1_MAX },
485 { 0, NULL, 0, 0, 0, NULL }
488 static int
489 dissect_ess_ESSPrivacyMark(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
490 offset = dissect_ber_choice(actx, tree, tvb, offset,
491 ESSPrivacyMark_choice, hf_index, ett_ess_ESSPrivacyMark,
492 NULL);
494 return offset;
499 static int
500 dissect_ess_T_type(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
501 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_ess_SecurityCategory_type_OID, &object_identifier_id);
503 return offset;
508 static int
509 dissect_ess_T_value(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
510 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
513 return offset;
517 static const ber_sequence_t SecurityCategory_sequence[] = {
518 { &hf_ess_type , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_T_type },
519 { &hf_ess_value , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_T_value },
520 { NULL, 0, 0, 0, NULL }
523 static int
524 dissect_ess_SecurityCategory(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
525 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
526 SecurityCategory_sequence, hf_index, ett_ess_SecurityCategory);
528 return offset;
532 static const ber_sequence_t SecurityCategories_set_of[1] = {
533 { &hf_ess_SecurityCategories_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityCategory },
536 static int
537 dissect_ess_SecurityCategories(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
538 offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
539 1, ub_security_categories, SecurityCategories_set_of, hf_index, ett_ess_SecurityCategories);
541 return offset;
545 static const ber_sequence_t ESSSecurityLabel_set[] = {
546 { &hf_ess_security_policy_identifier, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityPolicyIdentifier },
547 { &hf_ess_security_classification, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SecurityClassification },
548 { &hf_ess_privacy_mark , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_ESSPrivacyMark },
549 { &hf_ess_security_categories, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SecurityCategories },
550 { NULL, 0, 0, 0, NULL }
553 static int
554 dissect_ess_ESSSecurityLabel(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
555 offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
556 ESSSecurityLabel_set, hf_index, ett_ess_ESSSecurityLabel);
558 return offset;
563 static int
564 dissect_ess_T_restrictiveTagName(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
565 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
567 return offset;
572 static int
573 dissect_ess_T_restrictiveAttributeFlags(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
574 tvbuff_t *attributes;
576 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
577 NULL, 0, hf_index, -1,
578 &attributes);
580 ess_dissect_attribute_flags (attributes, actx);
583 return offset;
587 static const ber_sequence_t RestrictiveTag_sequence[] = {
588 { &hf_ess_restrictiveTagName, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_T_restrictiveTagName },
589 { &hf_ess_restrictiveAttributeFlags, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_T_restrictiveAttributeFlags },
590 { NULL, 0, 0, 0, NULL }
593 static int
594 dissect_ess_RestrictiveTag(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
595 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
596 RestrictiveTag_sequence, hf_index, ett_ess_RestrictiveTag);
598 return offset;
603 static int
604 dissect_ess_T_tagName(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
605 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
607 return offset;
612 static int
613 dissect_ess_SecurityAttribute(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
614 uint32_t attribute;
616 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
617 &attribute);
619 ess_dissect_attribute (attribute, actx);
622 return offset;
626 static const ber_sequence_t SET_OF_SecurityAttribute_set_of[1] = {
627 { &hf_ess_attributeList_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityAttribute },
630 static int
631 dissect_ess_SET_OF_SecurityAttribute(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
632 offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
633 SET_OF_SecurityAttribute_set_of, hf_index, ett_ess_SET_OF_SecurityAttribute);
635 return offset;
639 static const ber_sequence_t EnumeratedTag_sequence[] = {
640 { &hf_ess_tagName , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_T_tagName },
641 { &hf_ess_attributeList , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_SET_OF_SecurityAttribute },
642 { NULL, 0, 0, 0, NULL }
645 static int
646 dissect_ess_EnumeratedTag(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
647 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
648 EnumeratedTag_sequence, hf_index, ett_ess_EnumeratedTag);
650 return offset;
655 static int
656 dissect_ess_T_permissiveTagName(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
657 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
659 return offset;
664 static int
665 dissect_ess_T_permissiveAttributeFlags(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
666 tvbuff_t *attributes;
668 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
669 NULL, 0, hf_index, -1,
670 &attributes);
672 ess_dissect_attribute_flags (attributes, actx);
675 return offset;
679 static const ber_sequence_t PermissiveTag_sequence[] = {
680 { &hf_ess_permissiveTagName, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_T_permissiveTagName },
681 { &hf_ess_permissiveAttributeFlags, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_T_permissiveAttributeFlags },
682 { NULL, 0, 0, 0, NULL }
685 static int
686 dissect_ess_PermissiveTag(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
687 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
688 PermissiveTag_sequence, hf_index, ett_ess_PermissiveTag);
690 return offset;
695 static int
696 dissect_ess_T_informativeTagName(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
697 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
699 return offset;
704 static int
705 dissect_ess_T_informativeAttributeFlags(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
706 tvbuff_t *attributes;
708 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
709 NULL, 0, hf_index, -1,
710 &attributes);
712 ess_dissect_attribute_flags (attributes, actx);
715 return offset;
719 static const value_string ess_FreeFormField_vals[] = {
720 { 0, "bitSetAttributes" },
721 { 1, "securityAttributes" },
722 { 0, NULL }
725 static const ber_choice_t FreeFormField_choice[] = {
726 { 0, &hf_ess_informativeAttributeFlags, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_T_informativeAttributeFlags },
727 { 1, &hf_ess_securityAttributes, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_SET_OF_SecurityAttribute },
728 { 0, NULL, 0, 0, 0, NULL }
731 static int
732 dissect_ess_FreeFormField(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
733 offset = dissect_ber_choice(actx, tree, tvb, offset,
734 FreeFormField_choice, hf_index, ett_ess_FreeFormField,
735 NULL);
737 return offset;
741 static const ber_sequence_t InformativeTag_sequence[] = {
742 { &hf_ess_informativeTagName, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_T_informativeTagName },
743 { &hf_ess_attributes , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_FreeFormField },
744 { NULL, 0, 0, 0, NULL }
747 static int
748 dissect_ess_InformativeTag(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
749 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
750 InformativeTag_sequence, hf_index, ett_ess_InformativeTag);
752 return offset;
756 static const ber_sequence_t EquivalentLabels_sequence_of[1] = {
757 { &hf_ess_EquivalentLabels_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_ESSSecurityLabel },
760 static int
761 dissect_ess_EquivalentLabels(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
762 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
763 EquivalentLabels_sequence_of, hf_index, ett_ess_EquivalentLabels);
765 return offset;
769 static const value_string ess_EntityIdentifier_vals[] = {
770 { 0, "issuerAndSerialNumber" },
771 { 1, "subjectKeyIdentifier" },
772 { 0, NULL }
775 static const ber_choice_t EntityIdentifier_choice[] = {
776 { 0, &hf_ess_issuerAndSerialNumber, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cms_IssuerAndSerialNumber },
777 { 1, &hf_ess_subjectKeyIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_x509ce_SubjectKeyIdentifier },
778 { 0, NULL, 0, 0, 0, NULL }
781 static int
782 dissect_ess_EntityIdentifier(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
783 offset = dissect_ber_choice(actx, tree, tvb, offset,
784 EntityIdentifier_choice, hf_index, ett_ess_EntityIdentifier,
785 NULL);
787 return offset;
792 static int
793 dissect_ess_GeneralizedTime(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
794 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
796 return offset;
801 static int
802 dissect_ess_NULL(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
803 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
805 return offset;
809 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_GeneralNames_sequence_of[1] = {
810 { &hf_ess_insteadOf_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
813 static int
814 dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
815 offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
816 1, NO_BOUND, SEQUENCE_SIZE_1_MAX_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames);
818 return offset;
822 static const value_string ess_MLReceiptPolicy_vals[] = {
823 { 0, "none" },
824 { 1, "insteadOf" },
825 { 2, "inAdditionTo" },
826 { 0, NULL }
829 static const ber_choice_t MLReceiptPolicy_choice[] = {
830 { 0, &hf_ess_none , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_NULL },
831 { 1, &hf_ess_insteadOf , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames },
832 { 2, &hf_ess_inAdditionTo , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames },
833 { 0, NULL, 0, 0, 0, NULL }
836 static int
837 dissect_ess_MLReceiptPolicy(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
838 offset = dissect_ber_choice(actx, tree, tvb, offset,
839 MLReceiptPolicy_choice, hf_index, ett_ess_MLReceiptPolicy,
840 NULL);
842 return offset;
846 static const ber_sequence_t MLData_sequence[] = {
847 { &hf_ess_mailListIdentifier, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_EntityIdentifier },
848 { &hf_ess_expansionTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_ess_GeneralizedTime },
849 { &hf_ess_mlReceiptPolicy , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_MLReceiptPolicy },
850 { NULL, 0, 0, 0, NULL }
853 static int
854 dissect_ess_MLData(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
855 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
856 MLData_sequence, hf_index, ett_ess_MLData);
858 return offset;
862 static const ber_sequence_t MLExpansionHistory_sequence_of[1] = {
863 { &hf_ess_MLExpansionHistory_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_MLData },
866 static int
867 dissect_ess_MLExpansionHistory(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
868 offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
869 1, ub_ml_expansion_history, MLExpansionHistory_sequence_of, hf_index, ett_ess_MLExpansionHistory);
871 return offset;
876 static int
877 dissect_ess_Hash(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
878 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
879 NULL);
881 return offset;
885 static const ber_sequence_t IssuerSerial_sequence[] = {
886 { &hf_ess_issuer , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
887 { &hf_ess_serialNumber , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
888 { NULL, 0, 0, 0, NULL }
891 static int
892 dissect_ess_IssuerSerial(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
893 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
894 IssuerSerial_sequence, hf_index, ett_ess_IssuerSerial);
896 return offset;
900 static const ber_sequence_t ESSCertID_sequence[] = {
901 { &hf_ess_certHash , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_Hash },
902 { &hf_ess_issuerSerial , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_IssuerSerial },
903 { NULL, 0, 0, 0, NULL }
906 static int
907 dissect_ess_ESSCertID(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
908 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
909 ESSCertID_sequence, hf_index, ett_ess_ESSCertID);
911 return offset;
915 static const ber_sequence_t SEQUENCE_OF_ESSCertID_sequence_of[1] = {
916 { &hf_ess_certs_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_ESSCertID },
919 static int
920 dissect_ess_SEQUENCE_OF_ESSCertID(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
921 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
922 SEQUENCE_OF_ESSCertID_sequence_of, hf_index, ett_ess_SEQUENCE_OF_ESSCertID);
924 return offset;
928 static const ber_sequence_t SEQUENCE_OF_PolicyInformation_sequence_of[1] = {
929 { &hf_ess_policies_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_PolicyInformation },
932 static int
933 dissect_ess_SEQUENCE_OF_PolicyInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
934 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
935 SEQUENCE_OF_PolicyInformation_sequence_of, hf_index, ett_ess_SEQUENCE_OF_PolicyInformation);
937 return offset;
941 static const ber_sequence_t SigningCertificate_sequence[] = {
942 { &hf_ess_certs , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_ESSCertID },
943 { &hf_ess_policies , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_PolicyInformation },
944 { NULL, 0, 0, 0, NULL }
947 static int
948 dissect_ess_SigningCertificate(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
949 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
950 SigningCertificate_sequence, hf_index, ett_ess_SigningCertificate);
952 return offset;
956 static const ber_sequence_t ESSCertIDv2_sequence[] = {
957 { &hf_ess_hashAlgorithm , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
958 { &hf_ess_certHash , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_Hash },
959 { &hf_ess_issuerSerial , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_IssuerSerial },
960 { NULL, 0, 0, 0, NULL }
963 static int
964 dissect_ess_ESSCertIDv2(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
965 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
966 ESSCertIDv2_sequence, hf_index, ett_ess_ESSCertIDv2);
968 return offset;
972 static const ber_sequence_t SEQUENCE_OF_ESSCertIDv2_sequence_of[1] = {
973 { &hf_ess_certsV2_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_ESSCertIDv2 },
976 static int
977 dissect_ess_SEQUENCE_OF_ESSCertIDv2(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
978 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
979 SEQUENCE_OF_ESSCertIDv2_sequence_of, hf_index, ett_ess_SEQUENCE_OF_ESSCertIDv2);
981 return offset;
985 static const ber_sequence_t SigningCertificateV2_sequence[] = {
986 { &hf_ess_certsV2 , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_ESSCertIDv2 },
987 { &hf_ess_policies , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_PolicyInformation },
988 { NULL, 0, 0, 0, NULL }
991 static int
992 dissect_ess_SigningCertificateV2(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
993 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
994 SigningCertificateV2_sequence, hf_index, ett_ess_SigningCertificateV2);
996 return offset;
999 /*--- PDUs ---*/
1001 static int dissect_ReceiptRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1002 int offset = 0;
1003 asn1_ctx_t asn1_ctx;
1004 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1005 offset = dissect_ess_ReceiptRequest(false, tvb, offset, &asn1_ctx, tree, hf_ess_ReceiptRequest_PDU);
1006 return offset;
1008 static int dissect_ContentIdentifier_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1009 int offset = 0;
1010 asn1_ctx_t asn1_ctx;
1011 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1012 offset = dissect_ess_ContentIdentifier(false, tvb, offset, &asn1_ctx, tree, hf_ess_ContentIdentifier_PDU);
1013 return offset;
1015 static int dissect_Receipt_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1016 int offset = 0;
1017 asn1_ctx_t asn1_ctx;
1018 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1019 offset = dissect_ess_Receipt(false, tvb, offset, &asn1_ctx, tree, hf_ess_Receipt_PDU);
1020 return offset;
1022 static int dissect_ContentHints_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1023 int offset = 0;
1024 asn1_ctx_t asn1_ctx;
1025 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1026 offset = dissect_ess_ContentHints(false, tvb, offset, &asn1_ctx, tree, hf_ess_ContentHints_PDU);
1027 return offset;
1029 static int dissect_MsgSigDigest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1030 int offset = 0;
1031 asn1_ctx_t asn1_ctx;
1032 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1033 offset = dissect_ess_MsgSigDigest(false, tvb, offset, &asn1_ctx, tree, hf_ess_MsgSigDigest_PDU);
1034 return offset;
1036 static int dissect_ContentReference_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1037 int offset = 0;
1038 asn1_ctx_t asn1_ctx;
1039 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1040 offset = dissect_ess_ContentReference(false, tvb, offset, &asn1_ctx, tree, hf_ess_ContentReference_PDU);
1041 return offset;
1043 int dissect_ess_ESSSecurityLabel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1044 int offset = 0;
1045 asn1_ctx_t asn1_ctx;
1046 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1047 offset = dissect_ess_ESSSecurityLabel(false, tvb, offset, &asn1_ctx, tree, hf_ess_ess_ESSSecurityLabel_PDU);
1048 return offset;
1050 static int dissect_RestrictiveTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1051 int offset = 0;
1052 asn1_ctx_t asn1_ctx;
1053 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1054 offset = dissect_ess_RestrictiveTag(false, tvb, offset, &asn1_ctx, tree, hf_ess_RestrictiveTag_PDU);
1055 return offset;
1057 static int dissect_EnumeratedTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1058 int offset = 0;
1059 asn1_ctx_t asn1_ctx;
1060 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1061 offset = dissect_ess_EnumeratedTag(false, tvb, offset, &asn1_ctx, tree, hf_ess_EnumeratedTag_PDU);
1062 return offset;
1064 static int dissect_PermissiveTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1065 int offset = 0;
1066 asn1_ctx_t asn1_ctx;
1067 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1068 offset = dissect_ess_PermissiveTag(false, tvb, offset, &asn1_ctx, tree, hf_ess_PermissiveTag_PDU);
1069 return offset;
1071 static int dissect_InformativeTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1072 int offset = 0;
1073 asn1_ctx_t asn1_ctx;
1074 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1075 offset = dissect_ess_InformativeTag(false, tvb, offset, &asn1_ctx, tree, hf_ess_InformativeTag_PDU);
1076 return offset;
1078 static int dissect_EquivalentLabels_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1079 int offset = 0;
1080 asn1_ctx_t asn1_ctx;
1081 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1082 offset = dissect_ess_EquivalentLabels(false, tvb, offset, &asn1_ctx, tree, hf_ess_EquivalentLabels_PDU);
1083 return offset;
1085 static int dissect_MLExpansionHistory_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1086 int offset = 0;
1087 asn1_ctx_t asn1_ctx;
1088 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1089 offset = dissect_ess_MLExpansionHistory(false, tvb, offset, &asn1_ctx, tree, hf_ess_MLExpansionHistory_PDU);
1090 return offset;
1092 static int dissect_SigningCertificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1093 int offset = 0;
1094 asn1_ctx_t asn1_ctx;
1095 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1096 offset = dissect_ess_SigningCertificate(false, tvb, offset, &asn1_ctx, tree, hf_ess_SigningCertificate_PDU);
1097 return offset;
1099 static int dissect_SigningCertificateV2_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1100 int offset = 0;
1101 asn1_ctx_t asn1_ctx;
1102 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1103 offset = dissect_ess_SigningCertificateV2(false, tvb, offset, &asn1_ctx, tree, hf_ess_SigningCertificateV2_PDU);
1104 return offset;
1108 /*--- proto_register_ess ----------------------------------------------*/
1109 void proto_register_ess(void) {
1111 /* List of fields */
1112 static hf_register_info hf[] = {
1113 { &hf_ess_SecurityCategory_type_OID,
1114 { "type", "ess.type_OID", FT_STRING, BASE_NONE, NULL, 0,
1115 "Type of Security Category", HFILL }},
1116 { &hf_ess_Category_attribute,
1117 { "Attribute", "ess.attribute", FT_STRING, BASE_NONE, NULL, 0,
1118 NULL, HFILL }},
1119 { &hf_ess_ReceiptRequest_PDU,
1120 { "ReceiptRequest", "ess.ReceiptRequest_element",
1121 FT_NONE, BASE_NONE, NULL, 0,
1122 NULL, HFILL }},
1123 { &hf_ess_ContentIdentifier_PDU,
1124 { "ContentIdentifier", "ess.ContentIdentifier",
1125 FT_BYTES, BASE_NONE, NULL, 0,
1126 NULL, HFILL }},
1127 { &hf_ess_Receipt_PDU,
1128 { "Receipt", "ess.Receipt_element",
1129 FT_NONE, BASE_NONE, NULL, 0,
1130 NULL, HFILL }},
1131 { &hf_ess_ContentHints_PDU,
1132 { "ContentHints", "ess.ContentHints_element",
1133 FT_NONE, BASE_NONE, NULL, 0,
1134 NULL, HFILL }},
1135 { &hf_ess_MsgSigDigest_PDU,
1136 { "MsgSigDigest", "ess.MsgSigDigest",
1137 FT_BYTES, BASE_NONE, NULL, 0,
1138 NULL, HFILL }},
1139 { &hf_ess_ContentReference_PDU,
1140 { "ContentReference", "ess.ContentReference_element",
1141 FT_NONE, BASE_NONE, NULL, 0,
1142 NULL, HFILL }},
1143 { &hf_ess_ess_ESSSecurityLabel_PDU,
1144 { "ESSSecurityLabel", "ess.ESSSecurityLabel_element",
1145 FT_NONE, BASE_NONE, NULL, 0,
1146 NULL, HFILL }},
1147 { &hf_ess_RestrictiveTag_PDU,
1148 { "RestrictiveTag", "ess.RestrictiveTag_element",
1149 FT_NONE, BASE_NONE, NULL, 0,
1150 NULL, HFILL }},
1151 { &hf_ess_EnumeratedTag_PDU,
1152 { "EnumeratedTag", "ess.EnumeratedTag_element",
1153 FT_NONE, BASE_NONE, NULL, 0,
1154 NULL, HFILL }},
1155 { &hf_ess_PermissiveTag_PDU,
1156 { "PermissiveTag", "ess.PermissiveTag_element",
1157 FT_NONE, BASE_NONE, NULL, 0,
1158 NULL, HFILL }},
1159 { &hf_ess_InformativeTag_PDU,
1160 { "InformativeTag", "ess.InformativeTag_element",
1161 FT_NONE, BASE_NONE, NULL, 0,
1162 NULL, HFILL }},
1163 { &hf_ess_EquivalentLabels_PDU,
1164 { "EquivalentLabels", "ess.EquivalentLabels",
1165 FT_UINT32, BASE_DEC, NULL, 0,
1166 NULL, HFILL }},
1167 { &hf_ess_MLExpansionHistory_PDU,
1168 { "MLExpansionHistory", "ess.MLExpansionHistory",
1169 FT_UINT32, BASE_DEC, NULL, 0,
1170 NULL, HFILL }},
1171 { &hf_ess_SigningCertificate_PDU,
1172 { "SigningCertificate", "ess.SigningCertificate_element",
1173 FT_NONE, BASE_NONE, NULL, 0,
1174 NULL, HFILL }},
1175 { &hf_ess_SigningCertificateV2_PDU,
1176 { "SigningCertificateV2", "ess.SigningCertificateV2_element",
1177 FT_NONE, BASE_NONE, NULL, 0,
1178 NULL, HFILL }},
1179 { &hf_ess_signedContentIdentifier,
1180 { "signedContentIdentifier", "ess.signedContentIdentifier",
1181 FT_BYTES, BASE_NONE, NULL, 0,
1182 "ContentIdentifier", HFILL }},
1183 { &hf_ess_receiptsFrom,
1184 { "receiptsFrom", "ess.receiptsFrom",
1185 FT_UINT32, BASE_DEC, VALS(ess_ReceiptsFrom_vals), 0,
1186 NULL, HFILL }},
1187 { &hf_ess_receiptsTo,
1188 { "receiptsTo", "ess.receiptsTo",
1189 FT_UINT32, BASE_DEC, NULL, 0,
1190 "SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames", HFILL }},
1191 { &hf_ess_receiptsTo_item,
1192 { "GeneralNames", "ess.GeneralNames",
1193 FT_UINT32, BASE_DEC, NULL, 0,
1194 NULL, HFILL }},
1195 { &hf_ess_allOrFirstTier,
1196 { "allOrFirstTier", "ess.allOrFirstTier",
1197 FT_INT32, BASE_DEC, VALS(ess_AllOrFirstTier_vals), 0,
1198 NULL, HFILL }},
1199 { &hf_ess_receiptList,
1200 { "receiptList", "ess.receiptList",
1201 FT_UINT32, BASE_DEC, NULL, 0,
1202 "SEQUENCE_OF_GeneralNames", HFILL }},
1203 { &hf_ess_receiptList_item,
1204 { "GeneralNames", "ess.GeneralNames",
1205 FT_UINT32, BASE_DEC, NULL, 0,
1206 NULL, HFILL }},
1207 { &hf_ess_version,
1208 { "version", "ess.version",
1209 FT_INT32, BASE_DEC, VALS(ess_ESSVersion_vals), 0,
1210 "ESSVersion", HFILL }},
1211 { &hf_ess_contentType,
1212 { "contentType", "ess.contentType",
1213 FT_OID, BASE_NONE, NULL, 0,
1214 NULL, HFILL }},
1215 { &hf_ess_originatorSignatureValue,
1216 { "originatorSignatureValue", "ess.originatorSignatureValue",
1217 FT_BYTES, BASE_NONE, NULL, 0,
1218 "OCTET_STRING", HFILL }},
1219 { &hf_ess_contentDescription,
1220 { "contentDescription", "ess.contentDescription",
1221 FT_STRING, BASE_NONE, NULL, 0,
1222 "UTF8String_SIZE_1_MAX", HFILL }},
1223 { &hf_ess_security_policy_identifier,
1224 { "security-policy-identifier", "ess.security_policy_identifier",
1225 FT_OID, BASE_NONE, NULL, 0,
1226 "SecurityPolicyIdentifier", HFILL }},
1227 { &hf_ess_security_classification,
1228 { "security-classification", "ess.security_classification",
1229 FT_UINT32, BASE_DEC, VALS(ess_SecurityClassification_vals), 0,
1230 "SecurityClassification", HFILL }},
1231 { &hf_ess_privacy_mark,
1232 { "privacy-mark", "ess.privacy_mark",
1233 FT_UINT32, BASE_DEC, VALS(ess_ESSPrivacyMark_vals), 0,
1234 "ESSPrivacyMark", HFILL }},
1235 { &hf_ess_security_categories,
1236 { "security-categories", "ess.security_categories",
1237 FT_UINT32, BASE_DEC, NULL, 0,
1238 "SecurityCategories", HFILL }},
1239 { &hf_ess_pString,
1240 { "pString", "ess.pString",
1241 FT_STRING, BASE_NONE, NULL, 0,
1242 "PrintableString_SIZE_1_ub_privacy_mark_length", HFILL }},
1243 { &hf_ess_utf8String,
1244 { "utf8String", "ess.utf8String",
1245 FT_STRING, BASE_NONE, NULL, 0,
1246 "UTF8String_SIZE_1_MAX", HFILL }},
1247 { &hf_ess_SecurityCategories_item,
1248 { "SecurityCategory", "ess.SecurityCategory_element",
1249 FT_NONE, BASE_NONE, NULL, 0,
1250 NULL, HFILL }},
1251 { &hf_ess_type,
1252 { "type", "ess.type",
1253 FT_OID, BASE_NONE, NULL, 0,
1254 NULL, HFILL }},
1255 { &hf_ess_value,
1256 { "value", "ess.value_element",
1257 FT_NONE, BASE_NONE, NULL, 0,
1258 NULL, HFILL }},
1259 { &hf_ess_restrictiveTagName,
1260 { "tagName", "ess.restrictiveTagName",
1261 FT_OID, BASE_NONE, NULL, 0,
1262 "T_restrictiveTagName", HFILL }},
1263 { &hf_ess_restrictiveAttributeFlags,
1264 { "attributeFlags", "ess.restrictiveAttributeFlags",
1265 FT_BYTES, BASE_NONE, NULL, 0,
1266 "T_restrictiveAttributeFlags", HFILL }},
1267 { &hf_ess_tagName,
1268 { "tagName", "ess.tagName",
1269 FT_OID, BASE_NONE, NULL, 0,
1270 NULL, HFILL }},
1271 { &hf_ess_attributeList,
1272 { "attributeList", "ess.attributeList",
1273 FT_UINT32, BASE_DEC, NULL, 0,
1274 "SET_OF_SecurityAttribute", HFILL }},
1275 { &hf_ess_attributeList_item,
1276 { "SecurityAttribute", "ess.SecurityAttribute",
1277 FT_INT32, BASE_DEC, NULL, 0,
1278 NULL, HFILL }},
1279 { &hf_ess_permissiveTagName,
1280 { "tagName", "ess.permissiveTagName",
1281 FT_OID, BASE_NONE, NULL, 0,
1282 "T_permissiveTagName", HFILL }},
1283 { &hf_ess_permissiveAttributeFlags,
1284 { "attributeFlags", "ess.permissiveAttributeFlags",
1285 FT_BYTES, BASE_NONE, NULL, 0,
1286 "T_permissiveAttributeFlags", HFILL }},
1287 { &hf_ess_informativeTagName,
1288 { "tagName", "ess.informativeTagName",
1289 FT_OID, BASE_NONE, NULL, 0,
1290 "T_informativeTagName", HFILL }},
1291 { &hf_ess_attributes,
1292 { "attributes", "ess.attributes",
1293 FT_UINT32, BASE_DEC, VALS(ess_FreeFormField_vals), 0,
1294 "FreeFormField", HFILL }},
1295 { &hf_ess_informativeAttributeFlags,
1296 { "bitSetAttributes", "ess.informativeAttributeFlags",
1297 FT_BYTES, BASE_NONE, NULL, 0,
1298 "T_informativeAttributeFlags", HFILL }},
1299 { &hf_ess_securityAttributes,
1300 { "securityAttributes", "ess.securityAttributes",
1301 FT_UINT32, BASE_DEC, NULL, 0,
1302 "SET_OF_SecurityAttribute", HFILL }},
1303 { &hf_ess_securityAttributes_item,
1304 { "SecurityAttribute", "ess.SecurityAttribute",
1305 FT_INT32, BASE_DEC, NULL, 0,
1306 NULL, HFILL }},
1307 { &hf_ess_EquivalentLabels_item,
1308 { "ESSSecurityLabel", "ess.ESSSecurityLabel_element",
1309 FT_NONE, BASE_NONE, NULL, 0,
1310 NULL, HFILL }},
1311 { &hf_ess_MLExpansionHistory_item,
1312 { "MLData", "ess.MLData_element",
1313 FT_NONE, BASE_NONE, NULL, 0,
1314 NULL, HFILL }},
1315 { &hf_ess_mailListIdentifier,
1316 { "mailListIdentifier", "ess.mailListIdentifier",
1317 FT_UINT32, BASE_DEC, VALS(ess_EntityIdentifier_vals), 0,
1318 "EntityIdentifier", HFILL }},
1319 { &hf_ess_expansionTime,
1320 { "expansionTime", "ess.expansionTime",
1321 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
1322 "GeneralizedTime", HFILL }},
1323 { &hf_ess_mlReceiptPolicy,
1324 { "mlReceiptPolicy", "ess.mlReceiptPolicy",
1325 FT_UINT32, BASE_DEC, VALS(ess_MLReceiptPolicy_vals), 0,
1326 NULL, HFILL }},
1327 { &hf_ess_issuerAndSerialNumber,
1328 { "issuerAndSerialNumber", "ess.issuerAndSerialNumber_element",
1329 FT_NONE, BASE_NONE, NULL, 0,
1330 NULL, HFILL }},
1331 { &hf_ess_subjectKeyIdentifier,
1332 { "subjectKeyIdentifier", "ess.subjectKeyIdentifier",
1333 FT_BYTES, BASE_NONE, NULL, 0,
1334 NULL, HFILL }},
1335 { &hf_ess_none,
1336 { "none", "ess.none_element",
1337 FT_NONE, BASE_NONE, NULL, 0,
1338 NULL, HFILL }},
1339 { &hf_ess_insteadOf,
1340 { "insteadOf", "ess.insteadOf",
1341 FT_UINT32, BASE_DEC, NULL, 0,
1342 "SEQUENCE_SIZE_1_MAX_OF_GeneralNames", HFILL }},
1343 { &hf_ess_insteadOf_item,
1344 { "GeneralNames", "ess.GeneralNames",
1345 FT_UINT32, BASE_DEC, NULL, 0,
1346 NULL, HFILL }},
1347 { &hf_ess_inAdditionTo,
1348 { "inAdditionTo", "ess.inAdditionTo",
1349 FT_UINT32, BASE_DEC, NULL, 0,
1350 "SEQUENCE_SIZE_1_MAX_OF_GeneralNames", HFILL }},
1351 { &hf_ess_inAdditionTo_item,
1352 { "GeneralNames", "ess.GeneralNames",
1353 FT_UINT32, BASE_DEC, NULL, 0,
1354 NULL, HFILL }},
1355 { &hf_ess_certs,
1356 { "certs", "ess.certs",
1357 FT_UINT32, BASE_DEC, NULL, 0,
1358 "SEQUENCE_OF_ESSCertID", HFILL }},
1359 { &hf_ess_certs_item,
1360 { "ESSCertID", "ess.ESSCertID_element",
1361 FT_NONE, BASE_NONE, NULL, 0,
1362 NULL, HFILL }},
1363 { &hf_ess_policies,
1364 { "policies", "ess.policies",
1365 FT_UINT32, BASE_DEC, NULL, 0,
1366 "SEQUENCE_OF_PolicyInformation", HFILL }},
1367 { &hf_ess_policies_item,
1368 { "PolicyInformation", "ess.PolicyInformation_element",
1369 FT_NONE, BASE_NONE, NULL, 0,
1370 NULL, HFILL }},
1371 { &hf_ess_certsV2,
1372 { "certs", "ess.certsV2",
1373 FT_UINT32, BASE_DEC, NULL, 0,
1374 "SEQUENCE_OF_ESSCertIDv2", HFILL }},
1375 { &hf_ess_certsV2_item,
1376 { "ESSCertIDv2", "ess.ESSCertIDv2_element",
1377 FT_NONE, BASE_NONE, NULL, 0,
1378 NULL, HFILL }},
1379 { &hf_ess_hashAlgorithm,
1380 { "hashAlgorithm", "ess.hashAlgorithm_element",
1381 FT_NONE, BASE_NONE, NULL, 0,
1382 "AlgorithmIdentifier", HFILL }},
1383 { &hf_ess_certHash,
1384 { "certHash", "ess.certHash",
1385 FT_BYTES, BASE_NONE, NULL, 0,
1386 "Hash", HFILL }},
1387 { &hf_ess_issuerSerial,
1388 { "issuerSerial", "ess.issuerSerial_element",
1389 FT_NONE, BASE_NONE, NULL, 0,
1390 NULL, HFILL }},
1391 { &hf_ess_issuer,
1392 { "issuer", "ess.issuer",
1393 FT_UINT32, BASE_DEC, NULL, 0,
1394 "GeneralNames", HFILL }},
1395 { &hf_ess_serialNumber,
1396 { "serialNumber", "ess.serialNumber",
1397 FT_BYTES, BASE_NONE, NULL, 0,
1398 "CertificateSerialNumber", HFILL }},
1401 /* List of subtrees */
1402 static int *ett[] = {
1403 &ett_Category_attributes,
1404 &ett_ess_ReceiptRequest,
1405 &ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames,
1406 &ett_ess_ReceiptsFrom,
1407 &ett_ess_SEQUENCE_OF_GeneralNames,
1408 &ett_ess_Receipt,
1409 &ett_ess_ContentHints,
1410 &ett_ess_ContentReference,
1411 &ett_ess_ESSSecurityLabel,
1412 &ett_ess_ESSPrivacyMark,
1413 &ett_ess_SecurityCategories,
1414 &ett_ess_SecurityCategory,
1415 &ett_ess_RestrictiveTag,
1416 &ett_ess_EnumeratedTag,
1417 &ett_ess_SET_OF_SecurityAttribute,
1418 &ett_ess_PermissiveTag,
1419 &ett_ess_InformativeTag,
1420 &ett_ess_FreeFormField,
1421 &ett_ess_EquivalentLabels,
1422 &ett_ess_MLExpansionHistory,
1423 &ett_ess_MLData,
1424 &ett_ess_EntityIdentifier,
1425 &ett_ess_MLReceiptPolicy,
1426 &ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames,
1427 &ett_ess_SigningCertificate,
1428 &ett_ess_SEQUENCE_OF_ESSCertID,
1429 &ett_ess_SEQUENCE_OF_PolicyInformation,
1430 &ett_ess_SigningCertificateV2,
1431 &ett_ess_SEQUENCE_OF_ESSCertIDv2,
1432 &ett_ess_ESSCertIDv2,
1433 &ett_ess_ESSCertID,
1434 &ett_ess_IssuerSerial,
1437 static uat_field_t attributes_flds[] = {
1438 UAT_FLD_CSTRING(ess_category_attributes,oid, "Tag Set", "Category Tag Set (Object Identifier)"),
1439 UAT_FLD_DEC(ess_category_attributes,lacv, "Value", "Label And Cert Value"),
1440 UAT_FLD_CSTRING(ess_category_attributes,name, "Name", "Category Name"),
1441 UAT_END_FIELDS
1444 uat_t *attributes_uat = uat_new("ESS Category Attributes",
1445 sizeof(ess_category_attributes_t),
1446 "ess_category_attributes",
1447 true,
1448 &ess_category_attributes,
1449 &num_ess_category_attributes,
1450 UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
1451 "ChEssCategoryAttributes",
1452 ess_copy_cb,
1453 NULL,
1454 ess_free_cb,
1455 NULL,
1456 NULL,
1457 attributes_flds);
1459 static module_t *ess_module;
1461 /* Register protocol */
1462 proto_ess = proto_register_protocol(PNAME, PSNAME, PFNAME);
1464 /* Register fields and subtrees */
1465 proto_register_field_array(proto_ess, hf, array_length(hf));
1466 proto_register_subtree_array(ett, array_length(ett));
1468 ess_module = prefs_register_protocol(proto_ess, NULL);
1470 prefs_register_uat_preference(ess_module, "attributes_table",
1471 "ESS Category Attributes",
1472 "ESS category attributes translation table",
1473 attributes_uat);
1478 /*--- proto_reg_handoff_ess -------------------------------------------*/
1479 void proto_reg_handoff_ess(void) {
1480 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.1", dissect_ReceiptRequest_PDU, proto_ess, "id-aa-receiptRequest");
1481 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.7", dissect_ContentIdentifier_PDU, proto_ess, "id-aa-contentIdentifier");
1482 register_ber_oid_dissector("1.2.840.113549.1.9.16.1.1", dissect_Receipt_PDU, proto_ess, "id-ct-receipt");
1483 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.4", dissect_ContentHints_PDU, proto_ess, "id-aa-contentHint");
1484 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.5", dissect_MsgSigDigest_PDU, proto_ess, "id-aa-msgSigDigest");
1485 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.10", dissect_ContentReference_PDU, proto_ess, "id-aa-contentReference");
1486 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.2", dissect_ess_ESSSecurityLabel_PDU, proto_ess, "id-aa-securityLabel");
1487 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.9", dissect_EquivalentLabels_PDU, proto_ess, "id-aa-equivalentLabels");
1488 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.3", dissect_MLExpansionHistory_PDU, proto_ess, "id-aa-mlExpandHistory");
1489 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.12", dissect_SigningCertificate_PDU, proto_ess, "id-aa-signingCertificate");
1490 register_ber_oid_dissector("1.2.840.113549.1.9.16.2.47", dissect_SigningCertificateV2_PDU, proto_ess, "id-aa-signingCertificateV2");
1491 register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.0", dissect_RestrictiveTag_PDU, proto_ess, "id-restrictiveAttributes");
1492 register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.1", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedPermissiveAttributes");
1493 register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.2", dissect_PermissiveTag_PDU, proto_ess, "id-permissiveAttributes");
1494 register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.3", dissect_InformativeTag_PDU, proto_ess, "id-informativeAttributes");
1495 register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.4", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedRestrictiveAttributes");