#include <string.h> and/or #include <stdio.h> not needed.
[obnox/wireshark/wip.git] / epan / dissectors / packet-ess.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-ess.c                                                               */
4 /* ../../tools/asn2wrs.py -b -e -k -C -p ess -c ./ess.cnf -s ./packet-ess-template -D . ExtendedSecurityServices.asn */
5
6 /* Input file: packet-ess-template.c */
7
8 #line 1 "packet-ess-template.c"
9 /* packet-ess.c
10  * Routines for RFC5035 Extended Security Services packet dissection
11  *   Ronnie Sahlberg 2004
12  *   Stig Bjorlykke 2010
13  *
14  * $Id$
15  *
16  * Wireshark - Network traffic analyzer
17  * By Gerald Combs <gerald@wireshark.org>
18  * Copyright 1998 Gerald Combs
19  *
20  * This program is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU General Public License
22  * as published by the Free Software Foundation; either version 2
23  * of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
33  */
34
35 #ifdef HAVE_CONFIG_H
36 # include "config.h"
37 #endif
38
39 #include <glib.h>
40 #include <epan/packet.h>
41 #include <epan/asn1.h>
42
43 #include "packet-ber.h"
44 #include "packet-ess.h"
45 #include "packet-cms.h"
46 #include "packet-x509ce.h"
47 #include "packet-x509af.h"
48
49 #define PNAME  "Extended Security Services"
50 #define PSNAME "ESS"
51 #define PFNAME "ess"
52
53 /* Initialize the protocol and registered fields */
54 static int proto_ess = -1;
55 static int hf_ess_SecurityCategory_type_OID = -1;
56
57 /*--- Included file: packet-ess-hf.c ---*/
58 #line 1 "packet-ess-hf.c"
59 static int hf_ess_ReceiptRequest_PDU = -1;        /* ReceiptRequest */
60 static int hf_ess_ContentIdentifier_PDU = -1;     /* ContentIdentifier */
61 static int hf_ess_Receipt_PDU = -1;               /* Receipt */
62 static int hf_ess_ContentHints_PDU = -1;          /* ContentHints */
63 static int hf_ess_MsgSigDigest_PDU = -1;          /* MsgSigDigest */
64 static int hf_ess_ContentReference_PDU = -1;      /* ContentReference */
65 static int hf_ess_ESSSecurityLabel_PDU = -1;      /* ESSSecurityLabel */
66 static int hf_ess_RestrictiveTag_PDU = -1;        /* RestrictiveTag */
67 static int hf_ess_EnumeratedTag_PDU = -1;         /* EnumeratedTag */
68 static int hf_ess_PermissiveTag_PDU = -1;         /* PermissiveTag */
69 static int hf_ess_InformativeTag_PDU = -1;        /* InformativeTag */
70 static int hf_ess_EquivalentLabels_PDU = -1;      /* EquivalentLabels */
71 static int hf_ess_MLExpansionHistory_PDU = -1;    /* MLExpansionHistory */
72 static int hf_ess_SigningCertificate_PDU = -1;    /* SigningCertificate */
73 static int hf_ess_SigningCertificateV2_PDU = -1;  /* SigningCertificateV2 */
74 static int hf_ess_signedContentIdentifier = -1;   /* ContentIdentifier */
75 static int hf_ess_receiptsFrom = -1;              /* ReceiptsFrom */
76 static int hf_ess_receiptsTo = -1;                /* SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames */
77 static int hf_ess_receiptsTo_item = -1;           /* GeneralNames */
78 static int hf_ess_allOrFirstTier = -1;            /* AllOrFirstTier */
79 static int hf_ess_receiptList = -1;               /* SEQUENCE_OF_GeneralNames */
80 static int hf_ess_receiptList_item = -1;          /* GeneralNames */
81 static int hf_ess_version = -1;                   /* ESSVersion */
82 static int hf_ess_contentType = -1;               /* ContentType */
83 static int hf_ess_originatorSignatureValue = -1;  /* OCTET_STRING */
84 static int hf_ess_contentDescription = -1;        /* UTF8String_SIZE_1_MAX */
85 static int hf_ess_security_policy_identifier = -1;  /* SecurityPolicyIdentifier */
86 static int hf_ess_security_classification = -1;   /* SecurityClassification */
87 static int hf_ess_privacy_mark = -1;              /* ESSPrivacyMark */
88 static int hf_ess_security_categories = -1;       /* SecurityCategories */
89 static int hf_ess_pString = -1;                   /* PrintableString_SIZE_1_ub_privacy_mark_length */
90 static int hf_ess_utf8String = -1;                /* UTF8String_SIZE_1_MAX */
91 static int hf_ess_SecurityCategories_item = -1;   /* SecurityCategory */
92 static int hf_ess_type = -1;                      /* T_type */
93 static int hf_ess_value = -1;                     /* T_value */
94 static int hf_ess_tagName = -1;                   /* OBJECT_IDENTIFIER */
95 static int hf_ess_attributeFlags = -1;            /* BIT_STRING */
96 static int hf_ess_attributeList = -1;             /* SET_OF_SecurityAttribute */
97 static int hf_ess_attributeList_item = -1;        /* SecurityAttribute */
98 static int hf_ess_attributes = -1;                /* FreeFormField */
99 static int hf_ess_bitSetAttributes = -1;          /* BIT_STRING */
100 static int hf_ess_securityAttributes = -1;        /* SET_OF_SecurityAttribute */
101 static int hf_ess_securityAttributes_item = -1;   /* SecurityAttribute */
102 static int hf_ess_EquivalentLabels_item = -1;     /* ESSSecurityLabel */
103 static int hf_ess_MLExpansionHistory_item = -1;   /* MLData */
104 static int hf_ess_mailListIdentifier = -1;        /* EntityIdentifier */
105 static int hf_ess_expansionTime = -1;             /* GeneralizedTime */
106 static int hf_ess_mlReceiptPolicy = -1;           /* MLReceiptPolicy */
107 static int hf_ess_issuerAndSerialNumber = -1;     /* IssuerAndSerialNumber */
108 static int hf_ess_subjectKeyIdentifier = -1;      /* SubjectKeyIdentifier */
109 static int hf_ess_none = -1;                      /* NULL */
110 static int hf_ess_insteadOf = -1;                 /* SEQUENCE_SIZE_1_MAX_OF_GeneralNames */
111 static int hf_ess_insteadOf_item = -1;            /* GeneralNames */
112 static int hf_ess_inAdditionTo = -1;              /* SEQUENCE_SIZE_1_MAX_OF_GeneralNames */
113 static int hf_ess_inAdditionTo_item = -1;         /* GeneralNames */
114 static int hf_ess_certs = -1;                     /* SEQUENCE_OF_ESSCertID */
115 static int hf_ess_certs_item = -1;                /* ESSCertID */
116 static int hf_ess_policies = -1;                  /* SEQUENCE_OF_PolicyInformation */
117 static int hf_ess_policies_item = -1;             /* PolicyInformation */
118 static int hf_ess_certsV2 = -1;                   /* SEQUENCE_OF_ESSCertIDv2 */
119 static int hf_ess_certsV2_item = -1;              /* ESSCertIDv2 */
120 static int hf_ess_hashAlgorithm = -1;             /* AlgorithmIdentifier */
121 static int hf_ess_certHash = -1;                  /* Hash */
122 static int hf_ess_issuerSerial = -1;              /* IssuerSerial */
123 static int hf_ess_issuer = -1;                    /* GeneralNames */
124 static int hf_ess_serialNumber = -1;              /* CertificateSerialNumber */
125
126 /*--- End of included file: packet-ess-hf.c ---*/
127 #line 49 "packet-ess-template.c"
128
129
130 /*--- Included file: packet-ess-val.h ---*/
131 #line 1 "packet-ess-val.h"
132 #define ub_receiptsTo                  16
133 #define id_aa_receiptRequest           "1.2.840.113549.1.9.16.2.1"
134 #define id_aa_contentIdentifier        "1.2.840.113549.1.9.16.2.7"
135 #define id_ct_receipt                  "1.2.840.113549.1.9.16.1.1"
136 #define id_aa_contentHint              "1.2.840.113549.1.9.16.2.4"
137 #define id_aa_msgSigDigest             "1.2.840.113549.1.9.16.2.5"
138 #define id_aa_contentReference         "1.2.840.113549.1.9.16.2.10"
139 #define id_aa_securityLabel            "1.2.840.113549.1.9.16.2.2"
140 #define ub_integer_options             256
141 #define ub_privacy_mark_length         128
142 #define ub_security_categories         64
143 #define id_aa_equivalentLabels         "1.2.840.113549.1.9.16.2.9"
144 #define id_aa_mlExpandHistory          "1.2.840.113549.1.9.16.2.3"
145 #define ub_ml_expansion_history        64
146 #define id_aa_signingCertificate       "1.2.840.113549.1.9.16.2.12"
147 #define id_aa_signingCertificateV2     "1.2.840.113549.1.9.16.2.47"
148 #define id_sha256                      "2.16.840.1.101.3.4.2.1"
149
150 /*--- End of included file: packet-ess-val.h ---*/
151 #line 51 "packet-ess-template.c"
152
153 /* Initialize the subtree pointers */
154
155 /*--- Included file: packet-ess-ett.c ---*/
156 #line 1 "packet-ess-ett.c"
157 static gint ett_ess_ReceiptRequest = -1;
158 static gint ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames = -1;
159 static gint ett_ess_ReceiptsFrom = -1;
160 static gint ett_ess_SEQUENCE_OF_GeneralNames = -1;
161 static gint ett_ess_Receipt = -1;
162 static gint ett_ess_ContentHints = -1;
163 static gint ett_ess_ContentReference = -1;
164 static gint ett_ess_ESSSecurityLabel = -1;
165 static gint ett_ess_ESSPrivacyMark = -1;
166 static gint ett_ess_SecurityCategories = -1;
167 static gint ett_ess_SecurityCategory = -1;
168 static gint ett_ess_RestrictiveTag = -1;
169 static gint ett_ess_EnumeratedTag = -1;
170 static gint ett_ess_SET_OF_SecurityAttribute = -1;
171 static gint ett_ess_PermissiveTag = -1;
172 static gint ett_ess_InformativeTag = -1;
173 static gint ett_ess_FreeFormField = -1;
174 static gint ett_ess_EquivalentLabels = -1;
175 static gint ett_ess_MLExpansionHistory = -1;
176 static gint ett_ess_MLData = -1;
177 static gint ett_ess_EntityIdentifier = -1;
178 static gint ett_ess_MLReceiptPolicy = -1;
179 static gint ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames = -1;
180 static gint ett_ess_SigningCertificate = -1;
181 static gint ett_ess_SEQUENCE_OF_ESSCertID = -1;
182 static gint ett_ess_SEQUENCE_OF_PolicyInformation = -1;
183 static gint ett_ess_SigningCertificateV2 = -1;
184 static gint ett_ess_SEQUENCE_OF_ESSCertIDv2 = -1;
185 static gint ett_ess_ESSCertIDv2 = -1;
186 static gint ett_ess_ESSCertID = -1;
187 static gint ett_ess_IssuerSerial = -1;
188
189 /*--- End of included file: packet-ess-ett.c ---*/
190 #line 54 "packet-ess-template.c"
191
192 static const char *object_identifier_id;
193
194
195 /*--- Included file: packet-ess-fn.c ---*/
196 #line 1 "packet-ess-fn.c"
197
198
199 static int
200 dissect_ess_ContentIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
201   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
202                                        NULL);
203
204   return offset;
205 }
206
207
208 static const value_string ess_AllOrFirstTier_vals[] = {
209   {   0, "allReceipts" },
210   {   1, "firstTierRecipients" },
211   { 0, NULL }
212 };
213
214
215 static int
216 dissect_ess_AllOrFirstTier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
217   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
218                                                 NULL);
219
220   return offset;
221 }
222
223
224 static const ber_sequence_t SEQUENCE_OF_GeneralNames_sequence_of[1] = {
225   { &hf_ess_receiptList_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
226 };
227
228 static int
229 dissect_ess_SEQUENCE_OF_GeneralNames(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
230   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
231                                       SEQUENCE_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_OF_GeneralNames);
232
233   return offset;
234 }
235
236
237 static const value_string ess_ReceiptsFrom_vals[] = {
238   {   0, "allOrFirstTier" },
239   {   1, "receiptList" },
240   { 0, NULL }
241 };
242
243 static const ber_choice_t ReceiptsFrom_choice[] = {
244   {   0, &hf_ess_allOrFirstTier  , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_AllOrFirstTier },
245   {   1, &hf_ess_receiptList     , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_OF_GeneralNames },
246   { 0, NULL, 0, 0, 0, NULL }
247 };
248
249 static int
250 dissect_ess_ReceiptsFrom(gboolean 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_choice(actx, tree, tvb, offset,
252                                  ReceiptsFrom_choice, hf_index, ett_ess_ReceiptsFrom,
253                                  NULL);
254
255   return offset;
256 }
257
258
259 static const ber_sequence_t SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames_sequence_of[1] = {
260   { &hf_ess_receiptsTo_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
261 };
262
263 static int
264 dissect_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
265   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
266                                                   1, ub_receiptsTo, SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames);
267
268   return offset;
269 }
270
271
272 static const ber_sequence_t ReceiptRequest_sequence[] = {
273   { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
274   { &hf_ess_receiptsFrom    , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_ReceiptsFrom },
275   { &hf_ess_receiptsTo      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames },
276   { NULL, 0, 0, 0, NULL }
277 };
278
279 static int
280 dissect_ess_ReceiptRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
281   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
282                                    ReceiptRequest_sequence, hf_index, ett_ess_ReceiptRequest);
283
284   return offset;
285 }
286
287
288 static const value_string ess_ESSVersion_vals[] = {
289   {   1, "v1" },
290   { 0, NULL }
291 };
292
293
294 static int
295 dissect_ess_ESSVersion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
296   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
297                                                 NULL);
298
299   return offset;
300 }
301
302
303
304 static int
305 dissect_ess_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
306   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
307                                        NULL);
308
309   return offset;
310 }
311
312
313 static const ber_sequence_t Receipt_sequence[] = {
314   { &hf_ess_version         , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_ess_ESSVersion },
315   { &hf_ess_contentType     , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
316   { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
317   { &hf_ess_originatorSignatureValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_OCTET_STRING },
318   { NULL, 0, 0, 0, NULL }
319 };
320
321 static int
322 dissect_ess_Receipt(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
323   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
324                                    Receipt_sequence, hf_index, ett_ess_Receipt);
325
326   return offset;
327 }
328
329
330
331 static int
332 dissect_ess_UTF8String_SIZE_1_MAX(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
333   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
334                                                         actx, tree, tvb, offset,
335                                                         1, NO_BOUND, hf_index, NULL);
336
337   return offset;
338 }
339
340
341 static const ber_sequence_t ContentHints_sequence[] = {
342   { &hf_ess_contentDescription, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_UTF8String_SIZE_1_MAX },
343   { &hf_ess_contentType     , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
344   { NULL, 0, 0, 0, NULL }
345 };
346
347 static int
348 dissect_ess_ContentHints(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
349   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
350                                    ContentHints_sequence, hf_index, ett_ess_ContentHints);
351
352   return offset;
353 }
354
355
356
357 static int
358 dissect_ess_MsgSigDigest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
359   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
360                                        NULL);
361
362   return offset;
363 }
364
365
366 static const ber_sequence_t ContentReference_sequence[] = {
367   { &hf_ess_contentType     , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cms_ContentType },
368   { &hf_ess_signedContentIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_ContentIdentifier },
369   { &hf_ess_originatorSignatureValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_OCTET_STRING },
370   { NULL, 0, 0, 0, NULL }
371 };
372
373 static int
374 dissect_ess_ContentReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
375   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
376                                    ContentReference_sequence, hf_index, ett_ess_ContentReference);
377
378   return offset;
379 }
380
381
382
383 static int
384 dissect_ess_SecurityPolicyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
385   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
386
387   return offset;
388 }
389
390
391 static const value_string ess_SecurityClassification_vals[] = {
392   {   0, "unmarked" },
393   {   1, "unclassified" },
394   {   2, "restricted" },
395   {   3, "confidential" },
396   {   4, "secret" },
397   {   5, "top-secret" },
398   { 0, NULL }
399 };
400
401
402 static int
403 dissect_ess_SecurityClassification(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
404   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
405                                                             0U, ub_integer_options, hf_index, NULL);
406
407   return offset;
408 }
409
410
411
412 static int
413 dissect_ess_PrintableString_SIZE_1_ub_privacy_mark_length(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
414   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
415                                                         actx, tree, tvb, offset,
416                                                         1, ub_privacy_mark_length, hf_index, NULL);
417
418   return offset;
419 }
420
421
422 static const value_string ess_ESSPrivacyMark_vals[] = {
423   {   0, "pString" },
424   {   1, "utf8String" },
425   { 0, NULL }
426 };
427
428 static const ber_choice_t ESSPrivacyMark_choice[] = {
429   {   0, &hf_ess_pString         , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_ess_PrintableString_SIZE_1_ub_privacy_mark_length },
430   {   1, &hf_ess_utf8String      , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_ess_UTF8String_SIZE_1_MAX },
431   { 0, NULL, 0, 0, 0, NULL }
432 };
433
434 static int
435 dissect_ess_ESSPrivacyMark(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
436   offset = dissect_ber_choice(actx, tree, tvb, offset,
437                                  ESSPrivacyMark_choice, hf_index, ett_ess_ESSPrivacyMark,
438                                  NULL);
439
440   return offset;
441 }
442
443
444
445 static int
446 dissect_ess_T_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_) {
447   offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_ess_SecurityCategory_type_OID, &object_identifier_id);
448
449   return offset;
450 }
451
452
453
454 static int
455 dissect_ess_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
456 #line 44 "ess.cnf"
457   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
458
459
460
461   return offset;
462 }
463
464
465 static const ber_sequence_t SecurityCategory_sequence[] = {
466   { &hf_ess_type            , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_T_type },
467   { &hf_ess_value           , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_T_value },
468   { NULL, 0, 0, 0, NULL }
469 };
470
471 static int
472 dissect_ess_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
473   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
474                                    SecurityCategory_sequence, hf_index, ett_ess_SecurityCategory);
475
476   return offset;
477 }
478
479
480 static const ber_sequence_t SecurityCategories_set_of[1] = {
481   { &hf_ess_SecurityCategories_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityCategory },
482 };
483
484 static int
485 dissect_ess_SecurityCategories(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
486   offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
487                                              1, ub_security_categories, SecurityCategories_set_of, hf_index, ett_ess_SecurityCategories);
488
489   return offset;
490 }
491
492
493 static const ber_sequence_t ESSSecurityLabel_set[] = {
494   { &hf_ess_security_policy_identifier, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityPolicyIdentifier },
495   { &hf_ess_security_classification, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SecurityClassification },
496   { &hf_ess_privacy_mark    , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_ESSPrivacyMark },
497   { &hf_ess_security_categories, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SecurityCategories },
498   { NULL, 0, 0, 0, NULL }
499 };
500
501 static int
502 dissect_ess_ESSSecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
503   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
504                               ESSSecurityLabel_set, hf_index, ett_ess_ESSSecurityLabel);
505
506   return offset;
507 }
508
509
510
511 static int
512 dissect_ess_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
513   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
514
515   return offset;
516 }
517
518
519
520 static int
521 dissect_ess_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
522   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
523                                     NULL, hf_index, -1,
524                                     NULL);
525
526   return offset;
527 }
528
529
530 static const ber_sequence_t RestrictiveTag_sequence[] = {
531   { &hf_ess_tagName         , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_OBJECT_IDENTIFIER },
532   { &hf_ess_attributeFlags  , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_BIT_STRING },
533   { NULL, 0, 0, 0, NULL }
534 };
535
536 static int
537 dissect_ess_RestrictiveTag(gboolean 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_sequence(implicit_tag, actx, tree, tvb, offset,
539                                    RestrictiveTag_sequence, hf_index, ett_ess_RestrictiveTag);
540
541   return offset;
542 }
543
544
545
546 static int
547 dissect_ess_SecurityAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
548   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
549                                                 NULL);
550
551   return offset;
552 }
553
554
555 static const ber_sequence_t SET_OF_SecurityAttribute_set_of[1] = {
556   { &hf_ess_attributeList_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_ess_SecurityAttribute },
557 };
558
559 static int
560 dissect_ess_SET_OF_SecurityAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
561   offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
562                                  SET_OF_SecurityAttribute_set_of, hf_index, ett_ess_SET_OF_SecurityAttribute);
563
564   return offset;
565 }
566
567
568 static const ber_sequence_t EnumeratedTag_sequence[] = {
569   { &hf_ess_tagName         , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_OBJECT_IDENTIFIER },
570   { &hf_ess_attributeList   , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_SET_OF_SecurityAttribute },
571   { NULL, 0, 0, 0, NULL }
572 };
573
574 static int
575 dissect_ess_EnumeratedTag(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
576   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
577                                    EnumeratedTag_sequence, hf_index, ett_ess_EnumeratedTag);
578
579   return offset;
580 }
581
582
583 static const ber_sequence_t PermissiveTag_sequence[] = {
584   { &hf_ess_tagName         , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_OBJECT_IDENTIFIER },
585   { &hf_ess_attributeFlags  , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_BIT_STRING },
586   { NULL, 0, 0, 0, NULL }
587 };
588
589 static int
590 dissect_ess_PermissiveTag(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
591   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
592                                    PermissiveTag_sequence, hf_index, ett_ess_PermissiveTag);
593
594   return offset;
595 }
596
597
598 static const value_string ess_FreeFormField_vals[] = {
599   {   0, "bitSetAttributes" },
600   {   1, "securityAttributes" },
601   { 0, NULL }
602 };
603
604 static const ber_choice_t FreeFormField_choice[] = {
605   {   0, &hf_ess_bitSetAttributes, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_BIT_STRING },
606   {   1, &hf_ess_securityAttributes, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_SET_OF_SecurityAttribute },
607   { 0, NULL, 0, 0, 0, NULL }
608 };
609
610 static int
611 dissect_ess_FreeFormField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
612   offset = dissect_ber_choice(actx, tree, tvb, offset,
613                                  FreeFormField_choice, hf_index, ett_ess_FreeFormField,
614                                  NULL);
615
616   return offset;
617 }
618
619
620 static const ber_sequence_t InformativeTag_sequence[] = {
621   { &hf_ess_tagName         , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ess_OBJECT_IDENTIFIER },
622   { &hf_ess_attributes      , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_FreeFormField },
623   { NULL, 0, 0, 0, NULL }
624 };
625
626 static int
627 dissect_ess_InformativeTag(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
628   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
629                                    InformativeTag_sequence, hf_index, ett_ess_InformativeTag);
630
631   return offset;
632 }
633
634
635 static const ber_sequence_t EquivalentLabels_sequence_of[1] = {
636   { &hf_ess_EquivalentLabels_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ess_ESSSecurityLabel },
637 };
638
639 static int
640 dissect_ess_EquivalentLabels(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
641   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
642                                       EquivalentLabels_sequence_of, hf_index, ett_ess_EquivalentLabels);
643
644   return offset;
645 }
646
647
648 static const value_string ess_EntityIdentifier_vals[] = {
649   {   0, "issuerAndSerialNumber" },
650   {   1, "subjectKeyIdentifier" },
651   { 0, NULL }
652 };
653
654 static const ber_choice_t EntityIdentifier_choice[] = {
655   {   0, &hf_ess_issuerAndSerialNumber, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cms_IssuerAndSerialNumber },
656   {   1, &hf_ess_subjectKeyIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_x509ce_SubjectKeyIdentifier },
657   { 0, NULL, 0, 0, 0, NULL }
658 };
659
660 static int
661 dissect_ess_EntityIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
662   offset = dissect_ber_choice(actx, tree, tvb, offset,
663                                  EntityIdentifier_choice, hf_index, ett_ess_EntityIdentifier,
664                                  NULL);
665
666   return offset;
667 }
668
669
670
671 static int
672 dissect_ess_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
673   offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
674
675   return offset;
676 }
677
678
679
680 static int
681 dissect_ess_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
682   offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
683
684   return offset;
685 }
686
687
688 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_GeneralNames_sequence_of[1] = {
689   { &hf_ess_insteadOf_item  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
690 };
691
692 static int
693 dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
694   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
695                                                   1, NO_BOUND, SEQUENCE_SIZE_1_MAX_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames);
696
697   return offset;
698 }
699
700
701 static const value_string ess_MLReceiptPolicy_vals[] = {
702   {   0, "none" },
703   {   1, "insteadOf" },
704   {   2, "inAdditionTo" },
705   { 0, NULL }
706 };
707
708 static const ber_choice_t MLReceiptPolicy_choice[] = {
709   {   0, &hf_ess_none            , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ess_NULL },
710   {   1, &hf_ess_insteadOf       , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames },
711   {   2, &hf_ess_inAdditionTo    , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames },
712   { 0, NULL, 0, 0, 0, NULL }
713 };
714
715 static int
716 dissect_ess_MLReceiptPolicy(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
717   offset = dissect_ber_choice(actx, tree, tvb, offset,
718                                  MLReceiptPolicy_choice, hf_index, ett_ess_MLReceiptPolicy,
719                                  NULL);
720
721   return offset;
722 }
723
724
725 static const ber_sequence_t MLData_sequence[] = {
726   { &hf_ess_mailListIdentifier, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_EntityIdentifier },
727   { &hf_ess_expansionTime   , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_ess_GeneralizedTime },
728   { &hf_ess_mlReceiptPolicy , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ess_MLReceiptPolicy },
729   { NULL, 0, 0, 0, NULL }
730 };
731
732 static int
733 dissect_ess_MLData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
734   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
735                                    MLData_sequence, hf_index, ett_ess_MLData);
736
737   return offset;
738 }
739
740
741 static const ber_sequence_t MLExpansionHistory_sequence_of[1] = {
742   { &hf_ess_MLExpansionHistory_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_MLData },
743 };
744
745 static int
746 dissect_ess_MLExpansionHistory(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
747   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
748                                                   1, ub_ml_expansion_history, MLExpansionHistory_sequence_of, hf_index, ett_ess_MLExpansionHistory);
749
750   return offset;
751 }
752
753
754
755 static int
756 dissect_ess_Hash(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
757   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
758                                        NULL);
759
760   return offset;
761 }
762
763
764 static const ber_sequence_t IssuerSerial_sequence[] = {
765   { &hf_ess_issuer          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
766   { &hf_ess_serialNumber    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
767   { NULL, 0, 0, 0, NULL }
768 };
769
770 static int
771 dissect_ess_IssuerSerial(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
772   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
773                                    IssuerSerial_sequence, hf_index, ett_ess_IssuerSerial);
774
775   return offset;
776 }
777
778
779 static const ber_sequence_t ESSCertID_sequence[] = {
780   { &hf_ess_certHash        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_Hash },
781   { &hf_ess_issuerSerial    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_IssuerSerial },
782   { NULL, 0, 0, 0, NULL }
783 };
784
785 static int
786 dissect_ess_ESSCertID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
787   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
788                                    ESSCertID_sequence, hf_index, ett_ess_ESSCertID);
789
790   return offset;
791 }
792
793
794 static const ber_sequence_t SEQUENCE_OF_ESSCertID_sequence_of[1] = {
795   { &hf_ess_certs_item      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_ESSCertID },
796 };
797
798 static int
799 dissect_ess_SEQUENCE_OF_ESSCertID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
800   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
801                                       SEQUENCE_OF_ESSCertID_sequence_of, hf_index, ett_ess_SEQUENCE_OF_ESSCertID);
802
803   return offset;
804 }
805
806
807 static const ber_sequence_t SEQUENCE_OF_PolicyInformation_sequence_of[1] = {
808   { &hf_ess_policies_item   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_PolicyInformation },
809 };
810
811 static int
812 dissect_ess_SEQUENCE_OF_PolicyInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
813   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
814                                       SEQUENCE_OF_PolicyInformation_sequence_of, hf_index, ett_ess_SEQUENCE_OF_PolicyInformation);
815
816   return offset;
817 }
818
819
820 static const ber_sequence_t SigningCertificate_sequence[] = {
821   { &hf_ess_certs           , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_ESSCertID },
822   { &hf_ess_policies        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_PolicyInformation },
823   { NULL, 0, 0, 0, NULL }
824 };
825
826 static int
827 dissect_ess_SigningCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
828   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
829                                    SigningCertificate_sequence, hf_index, ett_ess_SigningCertificate);
830
831   return offset;
832 }
833
834
835 static const ber_sequence_t ESSCertIDv2_sequence[] = {
836   { &hf_ess_hashAlgorithm   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
837   { &hf_ess_certHash        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_ess_Hash },
838   { &hf_ess_issuerSerial    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_IssuerSerial },
839   { NULL, 0, 0, 0, NULL }
840 };
841
842 static int
843 dissect_ess_ESSCertIDv2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
844   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
845                                    ESSCertIDv2_sequence, hf_index, ett_ess_ESSCertIDv2);
846
847   return offset;
848 }
849
850
851 static const ber_sequence_t SEQUENCE_OF_ESSCertIDv2_sequence_of[1] = {
852   { &hf_ess_certsV2_item    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_ESSCertIDv2 },
853 };
854
855 static int
856 dissect_ess_SEQUENCE_OF_ESSCertIDv2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
857   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
858                                       SEQUENCE_OF_ESSCertIDv2_sequence_of, hf_index, ett_ess_SEQUENCE_OF_ESSCertIDv2);
859
860   return offset;
861 }
862
863
864 static const ber_sequence_t SigningCertificateV2_sequence[] = {
865   { &hf_ess_certsV2         , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_ESSCertIDv2 },
866   { &hf_ess_policies        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ess_SEQUENCE_OF_PolicyInformation },
867   { NULL, 0, 0, 0, NULL }
868 };
869
870 static int
871 dissect_ess_SigningCertificateV2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
872   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
873                                    SigningCertificateV2_sequence, hf_index, ett_ess_SigningCertificateV2);
874
875   return offset;
876 }
877
878 /*--- PDUs ---*/
879
880 static void dissect_ReceiptRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
881   asn1_ctx_t asn1_ctx;
882   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
883   dissect_ess_ReceiptRequest(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_ReceiptRequest_PDU);
884 }
885 static void dissect_ContentIdentifier_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
886   asn1_ctx_t asn1_ctx;
887   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
888   dissect_ess_ContentIdentifier(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_ContentIdentifier_PDU);
889 }
890 static void dissect_Receipt_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
891   asn1_ctx_t asn1_ctx;
892   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
893   dissect_ess_Receipt(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_Receipt_PDU);
894 }
895 static void dissect_ContentHints_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
896   asn1_ctx_t asn1_ctx;
897   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
898   dissect_ess_ContentHints(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_ContentHints_PDU);
899 }
900 static void dissect_MsgSigDigest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
901   asn1_ctx_t asn1_ctx;
902   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
903   dissect_ess_MsgSigDigest(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_MsgSigDigest_PDU);
904 }
905 static void dissect_ContentReference_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
906   asn1_ctx_t asn1_ctx;
907   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
908   dissect_ess_ContentReference(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_ContentReference_PDU);
909 }
910 static void dissect_ESSSecurityLabel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
911   asn1_ctx_t asn1_ctx;
912   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
913   dissect_ess_ESSSecurityLabel(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_ESSSecurityLabel_PDU);
914 }
915 static void dissect_RestrictiveTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
916   asn1_ctx_t asn1_ctx;
917   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
918   dissect_ess_RestrictiveTag(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_RestrictiveTag_PDU);
919 }
920 static void dissect_EnumeratedTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
921   asn1_ctx_t asn1_ctx;
922   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
923   dissect_ess_EnumeratedTag(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_EnumeratedTag_PDU);
924 }
925 static void dissect_PermissiveTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
926   asn1_ctx_t asn1_ctx;
927   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
928   dissect_ess_PermissiveTag(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_PermissiveTag_PDU);
929 }
930 static void dissect_InformativeTag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
931   asn1_ctx_t asn1_ctx;
932   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
933   dissect_ess_InformativeTag(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_InformativeTag_PDU);
934 }
935 static void dissect_EquivalentLabels_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
936   asn1_ctx_t asn1_ctx;
937   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
938   dissect_ess_EquivalentLabels(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_EquivalentLabels_PDU);
939 }
940 static void dissect_MLExpansionHistory_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
941   asn1_ctx_t asn1_ctx;
942   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
943   dissect_ess_MLExpansionHistory(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_MLExpansionHistory_PDU);
944 }
945 static void dissect_SigningCertificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
946   asn1_ctx_t asn1_ctx;
947   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
948   dissect_ess_SigningCertificate(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_SigningCertificate_PDU);
949 }
950 static void dissect_SigningCertificateV2_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
951   asn1_ctx_t asn1_ctx;
952   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
953   dissect_ess_SigningCertificateV2(FALSE, tvb, 0, &asn1_ctx, tree, hf_ess_SigningCertificateV2_PDU);
954 }
955
956
957 /*--- End of included file: packet-ess-fn.c ---*/
958 #line 58 "packet-ess-template.c"
959
960
961 /*--- proto_register_ess ----------------------------------------------*/
962 void proto_register_ess(void) {
963
964   /* List of fields */
965   static hf_register_info hf[] = {
966     { &hf_ess_SecurityCategory_type_OID, 
967       { "type", "ess.type_OID", FT_STRING, BASE_NONE, NULL, 0,
968         "Type of Security Category", HFILL }},
969
970 /*--- Included file: packet-ess-hfarr.c ---*/
971 #line 1 "packet-ess-hfarr.c"
972     { &hf_ess_ReceiptRequest_PDU,
973       { "ReceiptRequest", "ess.ReceiptRequest",
974         FT_NONE, BASE_NONE, NULL, 0,
975         "ess.ReceiptRequest", HFILL }},
976     { &hf_ess_ContentIdentifier_PDU,
977       { "ContentIdentifier", "ess.ContentIdentifier",
978         FT_BYTES, BASE_NONE, NULL, 0,
979         "ess.ContentIdentifier", HFILL }},
980     { &hf_ess_Receipt_PDU,
981       { "Receipt", "ess.Receipt",
982         FT_NONE, BASE_NONE, NULL, 0,
983         "ess.Receipt", HFILL }},
984     { &hf_ess_ContentHints_PDU,
985       { "ContentHints", "ess.ContentHints",
986         FT_NONE, BASE_NONE, NULL, 0,
987         "ess.ContentHints", HFILL }},
988     { &hf_ess_MsgSigDigest_PDU,
989       { "MsgSigDigest", "ess.MsgSigDigest",
990         FT_BYTES, BASE_NONE, NULL, 0,
991         "ess.MsgSigDigest", HFILL }},
992     { &hf_ess_ContentReference_PDU,
993       { "ContentReference", "ess.ContentReference",
994         FT_NONE, BASE_NONE, NULL, 0,
995         "ess.ContentReference", HFILL }},
996     { &hf_ess_ESSSecurityLabel_PDU,
997       { "ESSSecurityLabel", "ess.ESSSecurityLabel",
998         FT_NONE, BASE_NONE, NULL, 0,
999         "ess.ESSSecurityLabel", HFILL }},
1000     { &hf_ess_RestrictiveTag_PDU,
1001       { "RestrictiveTag", "ess.RestrictiveTag",
1002         FT_NONE, BASE_NONE, NULL, 0,
1003         "ess.RestrictiveTag", HFILL }},
1004     { &hf_ess_EnumeratedTag_PDU,
1005       { "EnumeratedTag", "ess.EnumeratedTag",
1006         FT_NONE, BASE_NONE, NULL, 0,
1007         "ess.EnumeratedTag", HFILL }},
1008     { &hf_ess_PermissiveTag_PDU,
1009       { "PermissiveTag", "ess.PermissiveTag",
1010         FT_NONE, BASE_NONE, NULL, 0,
1011         "ess.PermissiveTag", HFILL }},
1012     { &hf_ess_InformativeTag_PDU,
1013       { "InformativeTag", "ess.InformativeTag",
1014         FT_NONE, BASE_NONE, NULL, 0,
1015         "ess.InformativeTag", HFILL }},
1016     { &hf_ess_EquivalentLabels_PDU,
1017       { "EquivalentLabels", "ess.EquivalentLabels",
1018         FT_UINT32, BASE_DEC, NULL, 0,
1019         "ess.EquivalentLabels", HFILL }},
1020     { &hf_ess_MLExpansionHistory_PDU,
1021       { "MLExpansionHistory", "ess.MLExpansionHistory",
1022         FT_UINT32, BASE_DEC, NULL, 0,
1023         "ess.MLExpansionHistory", HFILL }},
1024     { &hf_ess_SigningCertificate_PDU,
1025       { "SigningCertificate", "ess.SigningCertificate",
1026         FT_NONE, BASE_NONE, NULL, 0,
1027         "ess.SigningCertificate", HFILL }},
1028     { &hf_ess_SigningCertificateV2_PDU,
1029       { "SigningCertificateV2", "ess.SigningCertificateV2",
1030         FT_NONE, BASE_NONE, NULL, 0,
1031         "ess.SigningCertificateV2", HFILL }},
1032     { &hf_ess_signedContentIdentifier,
1033       { "signedContentIdentifier", "ess.signedContentIdentifier",
1034         FT_BYTES, BASE_NONE, NULL, 0,
1035         "ess.ContentIdentifier", HFILL }},
1036     { &hf_ess_receiptsFrom,
1037       { "receiptsFrom", "ess.receiptsFrom",
1038         FT_UINT32, BASE_DEC, VALS(ess_ReceiptsFrom_vals), 0,
1039         "ess.ReceiptsFrom", HFILL }},
1040     { &hf_ess_receiptsTo,
1041       { "receiptsTo", "ess.receiptsTo",
1042         FT_UINT32, BASE_DEC, NULL, 0,
1043         "ess.SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames", HFILL }},
1044     { &hf_ess_receiptsTo_item,
1045       { "GeneralNames", "ess.GeneralNames",
1046         FT_UINT32, BASE_DEC, NULL, 0,
1047         "x509ce.GeneralNames", HFILL }},
1048     { &hf_ess_allOrFirstTier,
1049       { "allOrFirstTier", "ess.allOrFirstTier",
1050         FT_INT32, BASE_DEC, VALS(ess_AllOrFirstTier_vals), 0,
1051         "ess.AllOrFirstTier", HFILL }},
1052     { &hf_ess_receiptList,
1053       { "receiptList", "ess.receiptList",
1054         FT_UINT32, BASE_DEC, NULL, 0,
1055         "ess.SEQUENCE_OF_GeneralNames", HFILL }},
1056     { &hf_ess_receiptList_item,
1057       { "GeneralNames", "ess.GeneralNames",
1058         FT_UINT32, BASE_DEC, NULL, 0,
1059         "x509ce.GeneralNames", HFILL }},
1060     { &hf_ess_version,
1061       { "version", "ess.version",
1062         FT_INT32, BASE_DEC, VALS(ess_ESSVersion_vals), 0,
1063         "ess.ESSVersion", HFILL }},
1064     { &hf_ess_contentType,
1065       { "contentType", "ess.contentType",
1066         FT_OID, BASE_NONE, NULL, 0,
1067         "cms.ContentType", HFILL }},
1068     { &hf_ess_originatorSignatureValue,
1069       { "originatorSignatureValue", "ess.originatorSignatureValue",
1070         FT_BYTES, BASE_NONE, NULL, 0,
1071         "ess.OCTET_STRING", HFILL }},
1072     { &hf_ess_contentDescription,
1073       { "contentDescription", "ess.contentDescription",
1074         FT_STRING, BASE_NONE, NULL, 0,
1075         "ess.UTF8String_SIZE_1_MAX", HFILL }},
1076     { &hf_ess_security_policy_identifier,
1077       { "security-policy-identifier", "ess.security_policy_identifier",
1078         FT_OID, BASE_NONE, NULL, 0,
1079         "ess.SecurityPolicyIdentifier", HFILL }},
1080     { &hf_ess_security_classification,
1081       { "security-classification", "ess.security_classification",
1082         FT_UINT32, BASE_DEC, VALS(ess_SecurityClassification_vals), 0,
1083         "ess.SecurityClassification", HFILL }},
1084     { &hf_ess_privacy_mark,
1085       { "privacy-mark", "ess.privacy_mark",
1086         FT_UINT32, BASE_DEC, VALS(ess_ESSPrivacyMark_vals), 0,
1087         "ess.ESSPrivacyMark", HFILL }},
1088     { &hf_ess_security_categories,
1089       { "security-categories", "ess.security_categories",
1090         FT_UINT32, BASE_DEC, NULL, 0,
1091         "ess.SecurityCategories", HFILL }},
1092     { &hf_ess_pString,
1093       { "pString", "ess.pString",
1094         FT_STRING, BASE_NONE, NULL, 0,
1095         "ess.PrintableString_SIZE_1_ub_privacy_mark_length", HFILL }},
1096     { &hf_ess_utf8String,
1097       { "utf8String", "ess.utf8String",
1098         FT_STRING, BASE_NONE, NULL, 0,
1099         "ess.UTF8String_SIZE_1_MAX", HFILL }},
1100     { &hf_ess_SecurityCategories_item,
1101       { "SecurityCategory", "ess.SecurityCategory",
1102         FT_NONE, BASE_NONE, NULL, 0,
1103         "ess.SecurityCategory", HFILL }},
1104     { &hf_ess_type,
1105       { "type", "ess.type",
1106         FT_OID, BASE_NONE, NULL, 0,
1107         "ess.T_type", HFILL }},
1108     { &hf_ess_value,
1109       { "value", "ess.value",
1110         FT_NONE, BASE_NONE, NULL, 0,
1111         "ess.T_value", HFILL }},
1112     { &hf_ess_tagName,
1113       { "tagName", "ess.tagName",
1114         FT_OID, BASE_NONE, NULL, 0,
1115         "ess.OBJECT_IDENTIFIER", HFILL }},
1116     { &hf_ess_attributeFlags,
1117       { "attributeFlags", "ess.attributeFlags",
1118         FT_BYTES, BASE_NONE, NULL, 0,
1119         "ess.BIT_STRING", HFILL }},
1120     { &hf_ess_attributeList,
1121       { "attributeList", "ess.attributeList",
1122         FT_UINT32, BASE_DEC, NULL, 0,
1123         "ess.SET_OF_SecurityAttribute", HFILL }},
1124     { &hf_ess_attributeList_item,
1125       { "SecurityAttribute", "ess.SecurityAttribute",
1126         FT_INT32, BASE_DEC, NULL, 0,
1127         "ess.SecurityAttribute", HFILL }},
1128     { &hf_ess_attributes,
1129       { "attributes", "ess.attributes",
1130         FT_UINT32, BASE_DEC, VALS(ess_FreeFormField_vals), 0,
1131         "ess.FreeFormField", HFILL }},
1132     { &hf_ess_bitSetAttributes,
1133       { "bitSetAttributes", "ess.bitSetAttributes",
1134         FT_BYTES, BASE_NONE, NULL, 0,
1135         "ess.BIT_STRING", HFILL }},
1136     { &hf_ess_securityAttributes,
1137       { "securityAttributes", "ess.securityAttributes",
1138         FT_UINT32, BASE_DEC, NULL, 0,
1139         "ess.SET_OF_SecurityAttribute", HFILL }},
1140     { &hf_ess_securityAttributes_item,
1141       { "SecurityAttribute", "ess.SecurityAttribute",
1142         FT_INT32, BASE_DEC, NULL, 0,
1143         "ess.SecurityAttribute", HFILL }},
1144     { &hf_ess_EquivalentLabels_item,
1145       { "ESSSecurityLabel", "ess.ESSSecurityLabel",
1146         FT_NONE, BASE_NONE, NULL, 0,
1147         "ess.ESSSecurityLabel", HFILL }},
1148     { &hf_ess_MLExpansionHistory_item,
1149       { "MLData", "ess.MLData",
1150         FT_NONE, BASE_NONE, NULL, 0,
1151         "ess.MLData", HFILL }},
1152     { &hf_ess_mailListIdentifier,
1153       { "mailListIdentifier", "ess.mailListIdentifier",
1154         FT_UINT32, BASE_DEC, VALS(ess_EntityIdentifier_vals), 0,
1155         "ess.EntityIdentifier", HFILL }},
1156     { &hf_ess_expansionTime,
1157       { "expansionTime", "ess.expansionTime",
1158         FT_STRING, BASE_NONE, NULL, 0,
1159         "ess.GeneralizedTime", HFILL }},
1160     { &hf_ess_mlReceiptPolicy,
1161       { "mlReceiptPolicy", "ess.mlReceiptPolicy",
1162         FT_UINT32, BASE_DEC, VALS(ess_MLReceiptPolicy_vals), 0,
1163         "ess.MLReceiptPolicy", HFILL }},
1164     { &hf_ess_issuerAndSerialNumber,
1165       { "issuerAndSerialNumber", "ess.issuerAndSerialNumber",
1166         FT_NONE, BASE_NONE, NULL, 0,
1167         "cms.IssuerAndSerialNumber", HFILL }},
1168     { &hf_ess_subjectKeyIdentifier,
1169       { "subjectKeyIdentifier", "ess.subjectKeyIdentifier",
1170         FT_BYTES, BASE_NONE, NULL, 0,
1171         "x509ce.SubjectKeyIdentifier", HFILL }},
1172     { &hf_ess_none,
1173       { "none", "ess.none",
1174         FT_NONE, BASE_NONE, NULL, 0,
1175         "ess.NULL", HFILL }},
1176     { &hf_ess_insteadOf,
1177       { "insteadOf", "ess.insteadOf",
1178         FT_UINT32, BASE_DEC, NULL, 0,
1179         "ess.SEQUENCE_SIZE_1_MAX_OF_GeneralNames", HFILL }},
1180     { &hf_ess_insteadOf_item,
1181       { "GeneralNames", "ess.GeneralNames",
1182         FT_UINT32, BASE_DEC, NULL, 0,
1183         "x509ce.GeneralNames", HFILL }},
1184     { &hf_ess_inAdditionTo,
1185       { "inAdditionTo", "ess.inAdditionTo",
1186         FT_UINT32, BASE_DEC, NULL, 0,
1187         "ess.SEQUENCE_SIZE_1_MAX_OF_GeneralNames", HFILL }},
1188     { &hf_ess_inAdditionTo_item,
1189       { "GeneralNames", "ess.GeneralNames",
1190         FT_UINT32, BASE_DEC, NULL, 0,
1191         "x509ce.GeneralNames", HFILL }},
1192     { &hf_ess_certs,
1193       { "certs", "ess.certs",
1194         FT_UINT32, BASE_DEC, NULL, 0,
1195         "ess.SEQUENCE_OF_ESSCertID", HFILL }},
1196     { &hf_ess_certs_item,
1197       { "ESSCertID", "ess.ESSCertID",
1198         FT_NONE, BASE_NONE, NULL, 0,
1199         "ess.ESSCertID", HFILL }},
1200     { &hf_ess_policies,
1201       { "policies", "ess.policies",
1202         FT_UINT32, BASE_DEC, NULL, 0,
1203         "ess.SEQUENCE_OF_PolicyInformation", HFILL }},
1204     { &hf_ess_policies_item,
1205       { "PolicyInformation", "ess.PolicyInformation",
1206         FT_NONE, BASE_NONE, NULL, 0,
1207         "x509ce.PolicyInformation", HFILL }},
1208     { &hf_ess_certsV2,
1209       { "certs", "ess.certs",
1210         FT_UINT32, BASE_DEC, NULL, 0,
1211         "ess.SEQUENCE_OF_ESSCertIDv2", HFILL }},
1212     { &hf_ess_certsV2_item,
1213       { "ESSCertIDv2", "ess.ESSCertIDv2",
1214         FT_NONE, BASE_NONE, NULL, 0,
1215         "ess.ESSCertIDv2", HFILL }},
1216     { &hf_ess_hashAlgorithm,
1217       { "hashAlgorithm", "ess.hashAlgorithm",
1218         FT_NONE, BASE_NONE, NULL, 0,
1219         "x509af.AlgorithmIdentifier", HFILL }},
1220     { &hf_ess_certHash,
1221       { "certHash", "ess.certHash",
1222         FT_BYTES, BASE_NONE, NULL, 0,
1223         "ess.Hash", HFILL }},
1224     { &hf_ess_issuerSerial,
1225       { "issuerSerial", "ess.issuerSerial",
1226         FT_NONE, BASE_NONE, NULL, 0,
1227         "ess.IssuerSerial", HFILL }},
1228     { &hf_ess_issuer,
1229       { "issuer", "ess.issuer",
1230         FT_UINT32, BASE_DEC, NULL, 0,
1231         "x509ce.GeneralNames", HFILL }},
1232     { &hf_ess_serialNumber,
1233       { "serialNumber", "ess.serialNumber",
1234         FT_INT32, BASE_DEC, NULL, 0,
1235         "x509af.CertificateSerialNumber", HFILL }},
1236
1237 /*--- End of included file: packet-ess-hfarr.c ---*/
1238 #line 69 "packet-ess-template.c"
1239   };
1240
1241   /* List of subtrees */
1242   static gint *ett[] = {
1243
1244 /*--- Included file: packet-ess-ettarr.c ---*/
1245 #line 1 "packet-ess-ettarr.c"
1246     &ett_ess_ReceiptRequest,
1247     &ett_ess_SEQUENCE_SIZE_1_ub_receiptsTo_OF_GeneralNames,
1248     &ett_ess_ReceiptsFrom,
1249     &ett_ess_SEQUENCE_OF_GeneralNames,
1250     &ett_ess_Receipt,
1251     &ett_ess_ContentHints,
1252     &ett_ess_ContentReference,
1253     &ett_ess_ESSSecurityLabel,
1254     &ett_ess_ESSPrivacyMark,
1255     &ett_ess_SecurityCategories,
1256     &ett_ess_SecurityCategory,
1257     &ett_ess_RestrictiveTag,
1258     &ett_ess_EnumeratedTag,
1259     &ett_ess_SET_OF_SecurityAttribute,
1260     &ett_ess_PermissiveTag,
1261     &ett_ess_InformativeTag,
1262     &ett_ess_FreeFormField,
1263     &ett_ess_EquivalentLabels,
1264     &ett_ess_MLExpansionHistory,
1265     &ett_ess_MLData,
1266     &ett_ess_EntityIdentifier,
1267     &ett_ess_MLReceiptPolicy,
1268     &ett_ess_SEQUENCE_SIZE_1_MAX_OF_GeneralNames,
1269     &ett_ess_SigningCertificate,
1270     &ett_ess_SEQUENCE_OF_ESSCertID,
1271     &ett_ess_SEQUENCE_OF_PolicyInformation,
1272     &ett_ess_SigningCertificateV2,
1273     &ett_ess_SEQUENCE_OF_ESSCertIDv2,
1274     &ett_ess_ESSCertIDv2,
1275     &ett_ess_ESSCertID,
1276     &ett_ess_IssuerSerial,
1277
1278 /*--- End of included file: packet-ess-ettarr.c ---*/
1279 #line 74 "packet-ess-template.c"
1280   };
1281
1282   /* Register protocol */
1283   proto_ess = proto_register_protocol(PNAME, PSNAME, PFNAME);
1284
1285   /* Register fields and subtrees */
1286   proto_register_field_array(proto_ess, hf, array_length(hf));
1287   proto_register_subtree_array(ett, array_length(ett));
1288
1289 }
1290
1291
1292 /*--- proto_reg_handoff_ess -------------------------------------------*/
1293 void proto_reg_handoff_ess(void) {
1294
1295 /*--- Included file: packet-ess-dis-tab.c ---*/
1296 #line 1 "packet-ess-dis-tab.c"
1297   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.1", dissect_ReceiptRequest_PDU, proto_ess, "id-aa-receiptRequest");
1298   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.7", dissect_ContentIdentifier_PDU, proto_ess, "id-aa-contentIdentifier");
1299   register_ber_oid_dissector("1.2.840.113549.1.9.16.1.1", dissect_Receipt_PDU, proto_ess, "id-ct-receipt");
1300   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.4", dissect_ContentHints_PDU, proto_ess, "id-aa-contentHint");
1301   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.5", dissect_MsgSigDigest_PDU, proto_ess, "id-aa-msgSigDigest");
1302   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.10", dissect_ContentReference_PDU, proto_ess, "id-aa-contentReference");
1303   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.2", dissect_ESSSecurityLabel_PDU, proto_ess, "id-aa-securityLabel");
1304   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.9", dissect_EquivalentLabels_PDU, proto_ess, "id-aa-equivalentLabels");
1305   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.3", dissect_MLExpansionHistory_PDU, proto_ess, "id-aa-mlExpandHistory");
1306   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.12", dissect_SigningCertificate_PDU, proto_ess, "id-aa-signingCertificate");
1307   register_ber_oid_dissector("1.2.840.113549.1.9.16.2.47", dissect_SigningCertificateV2_PDU, proto_ess, "id-aa-signingCertificateV2");
1308   register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.0", dissect_RestrictiveTag_PDU, proto_ess, "id-restrictiveAttributes");
1309   register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.1", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedPermissiveAttributes");
1310   register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.2", dissect_PermissiveTag_PDU, proto_ess, "id-restrictiveAttributes");
1311   register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.3", dissect_InformativeTag_PDU, proto_ess, "id-informativeAttributes");
1312   register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.4", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedRestrictiveAttributes");
1313
1314
1315 /*--- End of included file: packet-ess-dis-tab.c ---*/
1316 #line 89 "packet-ess-template.c"
1317 }
1318