updates from tomas and anders
[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 Ethereal dissector compiler    */
3 /* ./packet-ess.c                                                             */
4 /* ../../tools/asn2eth.py -X -b -k -e -p ess -c ess.cnf -s packet-ess-template ExtendedSecurityServices.asn */
5
6 /* Input file: packet-ess-template.c */
7
8 /* packet-ess.c
9  * Routines for RFC2634 Extended Security Services packet dissection
10  *   Ronnie Sahlberg 2004
11  *
12  * $Id: packet-ess-template.c 12438 2004-10-30 02:36:58Z sahlberg $
13  *
14  * Ethereal - Network traffic analyzer
15  * By Gerald Combs <gerald@ethereal.com>
16  * Copyright 1998 Gerald Combs
17  *
18  * This program is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU General Public License
20  * as published by the Free Software Foundation; either version 2
21  * of the License, or (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  * GNU General Public License for more details.
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with this program; if not, write to the Free Software
30  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31  */
32
33 #ifdef HAVE_CONFIG_H
34 # include "config.h"
35 #endif
36
37 #include <glib.h>
38 #include <epan/packet.h>
39
40 #include <stdio.h>
41 #include <string.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
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_MLExpansionHistory_PDU = -1;    /* MLExpansionHistory */
66 static int hf_ess_SigningCertificate_PDU = -1;    /* SigningCertificate */
67 static int hf_ess_signedContentIdentifier = -1;   /* ContentIdentifier */
68 static int hf_ess_receiptsFrom = -1;              /* ReceiptsFrom */
69 static int hf_ess_receiptsTo = -1;                /* SEQUNCE_OF_GeneralNames */
70 static int hf_ess_receiptsTo_item = -1;           /* GeneralNames */
71 static int hf_ess_allOrFirstTier = -1;            /* AllOrFirstTier */
72 static int hf_ess_receiptList = -1;               /* SEQUNCE_OF_GeneralNames */
73 static int hf_ess_receiptList_item = -1;          /* GeneralNames */
74 static int hf_ess_version = -1;                   /* ESSVersion */
75 static int hf_ess_contentType = -1;               /* ContentType */
76 static int hf_ess_originatorSignatureValue = -1;  /* OCTET_STRING */
77 static int hf_ess_contentDescription = -1;        /* UTF8String */
78 static int hf_ess_pString = -1;                   /* PrintableString */
79 static int hf_ess_utf8String = -1;                /* UTF8String */
80 static int hf_ess_SecurityCategories_item = -1;   /* SecurityCategory */
81 static int hf_ess_type = -1;                      /* T_type */
82 static int hf_ess_value = -1;                     /* T_value */
83 static int hf_ess_MLExpansionHistory_item = -1;   /* MLData */
84 static int hf_ess_mailListIdentifier = -1;        /* EntityIdentifier */
85 static int hf_ess_expansionTime = -1;             /* GeneralizedTime */
86 static int hf_ess_mlReceiptPolicy = -1;           /* MLReceiptPolicy */
87 static int hf_ess_issuerAndSerialNumber = -1;     /* IssuerAndSerialNumber */
88 static int hf_ess_subjectKeyIdentifier = -1;      /* SubjectKeyIdentifier */
89 static int hf_ess_none = -1;                      /* NULL */
90 static int hf_ess_insteadOf = -1;                 /* SEQUNCE_OF_GeneralNames */
91 static int hf_ess_insteadOf_item = -1;            /* GeneralNames */
92 static int hf_ess_inAdditionTo = -1;              /* SEQUNCE_OF_GeneralNames */
93 static int hf_ess_inAdditionTo_item = -1;         /* GeneralNames */
94 static int hf_ess_certs = -1;                     /* SEQUNCE_OF_ESSCertID */
95 static int hf_ess_certs_item = -1;                /* ESSCertID */
96 static int hf_ess_policies = -1;                  /* SEQUNCE_OF_PolicyInformation */
97 static int hf_ess_policies_item = -1;             /* PolicyInformation */
98 static int hf_ess_certHash = -1;                  /* Hash */
99 static int hf_ess_issuerSerial = -1;              /* IssuerSerial */
100 static int hf_ess_issuer = -1;                    /* GeneralNames */
101 static int hf_ess_serialNumber = -1;              /* CertificateSerialNumber */
102
103 /*--- End of included file: packet-ess-hf.c ---*/
104
105
106 /* Initialize the subtree pointers */
107
108 /*--- Included file: packet-ess-ett.c ---*/
109
110 static gint ett_ess_ReceiptRequest = -1;
111 static gint ett_ess_SEQUNCE_OF_GeneralNames = -1;
112 static gint ett_ess_ReceiptsFrom = -1;
113 static gint ett_ess_Receipt = -1;
114 static gint ett_ess_ContentHints = -1;
115 static gint ett_ess_ContentReference = -1;
116 static gint ett_ess_ESSPrivacyMark = -1;
117 static gint ett_ess_SecurityCategories = -1;
118 static gint ett_ess_SecurityCategory = -1;
119 static gint ett_ess_MLExpansionHistory = -1;
120 static gint ett_ess_MLData = -1;
121 static gint ett_ess_EntityIdentifier = -1;
122 static gint ett_ess_MLReceiptPolicy = -1;
123 static gint ett_ess_SigningCertificate = -1;
124 static gint ett_ess_SEQUNCE_OF_ESSCertID = -1;
125 static gint ett_ess_SEQUNCE_OF_PolicyInformation = -1;
126 static gint ett_ess_ESSCertID = -1;
127 static gint ett_ess_IssuerSerial = -1;
128
129 /*--- End of included file: packet-ess-ett.c ---*/
130
131
132 static char object_identifier_id[64]; /*64 chars should be long enough? */
133
134
135 /*--- Included file: packet-ess-fn.c ---*/
136
137 /*--- Fields for imported types ---*/
138
139 static int dissect_receiptsTo_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
140   return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_receiptsTo_item);
141 }
142 static int dissect_receiptList_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
143   return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_receiptList_item);
144 }
145 static int dissect_contentType(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
146   return dissect_cms_ContentType(FALSE, tvb, offset, pinfo, tree, hf_ess_contentType);
147 }
148 static int dissect_issuerAndSerialNumber(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
149   return dissect_cms_IssuerAndSerialNumber(FALSE, tvb, offset, pinfo, tree, hf_ess_issuerAndSerialNumber);
150 }
151 static int dissect_subjectKeyIdentifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
152   return dissect_x509ce_SubjectKeyIdentifier(FALSE, tvb, offset, pinfo, tree, hf_ess_subjectKeyIdentifier);
153 }
154 static int dissect_insteadOf_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
155   return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_insteadOf_item);
156 }
157 static int dissect_inAdditionTo_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
158   return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_inAdditionTo_item);
159 }
160 static int dissect_policies_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
161   return dissect_x509ce_PolicyInformation(FALSE, tvb, offset, pinfo, tree, hf_ess_policies_item);
162 }
163 static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
164   return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_issuer);
165 }
166 static int dissect_serialNumber(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
167   return dissect_x509af_CertificateSerialNumber(FALSE, tvb, offset, pinfo, tree, hf_ess_serialNumber);
168 }
169
170
171 static int
172 dissect_ess_ContentIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
173   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
174                                     NULL);
175
176   return offset;
177 }
178 static int dissect_signedContentIdentifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
179   return dissect_ess_ContentIdentifier(FALSE, tvb, offset, pinfo, tree, hf_ess_signedContentIdentifier);
180 }
181
182
183 static const value_string AllOrFirstTier_vals[] = {
184   {   0, "allReceipts" },
185   {   1, "firstTierRecipients" },
186   { 0, NULL }
187 };
188
189
190 static int
191 dissect_ess_AllOrFirstTier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
192   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
193
194   return offset;
195 }
196 static int dissect_allOrFirstTier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
197   return dissect_ess_AllOrFirstTier(TRUE, tvb, offset, pinfo, tree, hf_ess_allOrFirstTier);
198 }
199
200 static const ber_sequence SEQUNCE_OF_GeneralNames_sequence_of[1] = {
201   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_receiptsTo_item },
202 };
203
204 static int
205 dissect_ess_SEQUNCE_OF_GeneralNames(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
206   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
207                                    SEQUNCE_OF_GeneralNames_sequence_of, hf_index, ett_ess_SEQUNCE_OF_GeneralNames);
208
209   return offset;
210 }
211 static int dissect_receiptsTo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
212   return dissect_ess_SEQUNCE_OF_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_ess_receiptsTo);
213 }
214 static int dissect_receiptList_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
215   return dissect_ess_SEQUNCE_OF_GeneralNames(TRUE, tvb, offset, pinfo, tree, hf_ess_receiptList);
216 }
217 static int dissect_insteadOf_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
218   return dissect_ess_SEQUNCE_OF_GeneralNames(TRUE, tvb, offset, pinfo, tree, hf_ess_insteadOf);
219 }
220 static int dissect_inAdditionTo_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
221   return dissect_ess_SEQUNCE_OF_GeneralNames(TRUE, tvb, offset, pinfo, tree, hf_ess_inAdditionTo);
222 }
223
224
225 static const value_string ReceiptsFrom_vals[] = {
226   {   0, "allOrFirstTier" },
227   {   1, "receiptList" },
228   { 0, NULL }
229 };
230
231 static const ber_choice ReceiptsFrom_choice[] = {
232   {   0, BER_CLASS_CON, 0, 0, dissect_allOrFirstTier_impl },
233   {   1, BER_CLASS_CON, 1, 0, dissect_receiptList_impl },
234   { 0, 0, 0, 0, NULL }
235 };
236
237 static int
238 dissect_ess_ReceiptsFrom(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
239   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
240                               ReceiptsFrom_choice, hf_index, ett_ess_ReceiptsFrom);
241
242   return offset;
243 }
244 static int dissect_receiptsFrom(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
245   return dissect_ess_ReceiptsFrom(FALSE, tvb, offset, pinfo, tree, hf_ess_receiptsFrom);
246 }
247
248 static const ber_sequence ReceiptRequest_sequence[] = {
249   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_signedContentIdentifier },
250   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_receiptsFrom },
251   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_receiptsTo },
252   { 0, 0, 0, NULL }
253 };
254
255 static int
256 dissect_ess_ReceiptRequest(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
257   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
258                                 ReceiptRequest_sequence, hf_index, ett_ess_ReceiptRequest);
259
260   return offset;
261 }
262
263
264 static const value_string ESSVersion_vals[] = {
265   {   1, "v1" },
266   { 0, NULL }
267 };
268
269
270 static int
271 dissect_ess_ESSVersion(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
272   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
273
274   return offset;
275 }
276 static int dissect_version(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
277   return dissect_ess_ESSVersion(FALSE, tvb, offset, pinfo, tree, hf_ess_version);
278 }
279
280
281 static int
282 dissect_ess_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
283   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
284                                     NULL);
285
286   return offset;
287 }
288 static int dissect_originatorSignatureValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
289   return dissect_ess_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_ess_originatorSignatureValue);
290 }
291
292 static const ber_sequence Receipt_sequence[] = {
293   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_version },
294   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_contentType },
295   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_signedContentIdentifier },
296   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_originatorSignatureValue },
297   { 0, 0, 0, NULL }
298 };
299
300 static int
301 dissect_ess_Receipt(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
302   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
303                                 Receipt_sequence, hf_index, ett_ess_Receipt);
304
305   return offset;
306 }
307
308
309 static int
310 dissect_ess_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
311   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
312                                          pinfo, tree, tvb, offset, hf_index,
313                                          NULL);
314
315   return offset;
316 }
317 static int dissect_contentDescription(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
318   return dissect_ess_UTF8String(FALSE, tvb, offset, pinfo, tree, hf_ess_contentDescription);
319 }
320 static int dissect_utf8String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
321   return dissect_ess_UTF8String(FALSE, tvb, offset, pinfo, tree, hf_ess_utf8String);
322 }
323
324 static const ber_sequence ContentHints_sequence[] = {
325   { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_contentDescription },
326   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_contentType },
327   { 0, 0, 0, NULL }
328 };
329
330 static int
331 dissect_ess_ContentHints(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
332   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
333                                 ContentHints_sequence, hf_index, ett_ess_ContentHints);
334
335   return offset;
336 }
337
338
339 static int
340 dissect_ess_MsgSigDigest(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
341   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
342                                     NULL);
343
344   return offset;
345 }
346
347 static const ber_sequence ContentReference_sequence[] = {
348   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_contentType },
349   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_signedContentIdentifier },
350   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_originatorSignatureValue },
351   { 0, 0, 0, NULL }
352 };
353
354 static int
355 dissect_ess_ContentReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
356   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
357                                 ContentReference_sequence, hf_index, ett_ess_ContentReference);
358
359   return offset;
360 }
361
362
363 static int
364 dissect_ess_SecurityPolicyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
365   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
366                                          hf_index, NULL);
367
368   return offset;
369 }
370
371
372 static const value_string SecurityClassification_vals[] = {
373   {   0, "unmarked" },
374   {   1, "unclassified" },
375   {   2, "restricted" },
376   {   3, "confidential" },
377   {   4, "secret" },
378   {   5, "top-secret" },
379   { 0, NULL }
380 };
381
382
383 static int
384 dissect_ess_SecurityClassification(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
385   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
386
387   return offset;
388 }
389
390
391 static int
392 dissect_ess_PrintableString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
393   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
394                                          pinfo, tree, tvb, offset, hf_index,
395                                          NULL);
396
397   return offset;
398 }
399 static int dissect_pString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
400   return dissect_ess_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_ess_pString);
401 }
402
403
404 static const value_string ESSPrivacyMark_vals[] = {
405   {   0, "pString" },
406   {   1, "utf8String" },
407   { 0, NULL }
408 };
409
410 static const ber_choice ESSPrivacyMark_choice[] = {
411   {   0, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_pString },
412   {   1, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_utf8String },
413   { 0, 0, 0, 0, NULL }
414 };
415
416 static int
417 dissect_ess_ESSPrivacyMark(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
418   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
419                               ESSPrivacyMark_choice, hf_index, ett_ess_ESSPrivacyMark);
420
421   return offset;
422 }
423
424
425 static int
426 dissect_ess_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
427   offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
428                                          hf_ess_SecurityCategory_type_OID, object_identifier_id);
429
430
431   return offset;
432 }
433 static int dissect_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
434   return dissect_ess_T_type(TRUE, tvb, offset, pinfo, tree, hf_ess_type);
435 }
436
437
438
439 static int
440 dissect_ess_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
441   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
442
443
444   return offset;
445 }
446 static int dissect_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
447   return dissect_ess_T_value(TRUE, tvb, offset, pinfo, tree, hf_ess_value);
448 }
449
450 static const ber_sequence SecurityCategory_sequence[] = {
451   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_type_impl },
452   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_value_impl },
453   { 0, 0, 0, NULL }
454 };
455
456 static int
457 dissect_ess_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
458   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
459                                 SecurityCategory_sequence, hf_index, ett_ess_SecurityCategory);
460
461   return offset;
462 }
463 static int dissect_SecurityCategories_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
464   return dissect_ess_SecurityCategory(FALSE, tvb, offset, pinfo, tree, hf_ess_SecurityCategories_item);
465 }
466
467 static const ber_sequence SecurityCategories_set_of[1] = {
468   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_SecurityCategories_item },
469 };
470
471 static int
472 dissect_ess_SecurityCategories(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
473   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
474                               SecurityCategories_set_of, hf_index, ett_ess_SecurityCategories);
475
476   return offset;
477 }
478
479
480 static const value_string EntityIdentifier_vals[] = {
481   {   0, "issuerAndSerialNumber" },
482   {   1, "subjectKeyIdentifier" },
483   { 0, NULL }
484 };
485
486 static const ber_choice EntityIdentifier_choice[] = {
487   {   0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_issuerAndSerialNumber },
488   {   1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_subjectKeyIdentifier },
489   { 0, 0, 0, 0, NULL }
490 };
491
492 static int
493 dissect_ess_EntityIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
494   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
495                               EntityIdentifier_choice, hf_index, ett_ess_EntityIdentifier);
496
497   return offset;
498 }
499 static int dissect_mailListIdentifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
500   return dissect_ess_EntityIdentifier(FALSE, tvb, offset, pinfo, tree, hf_ess_mailListIdentifier);
501 }
502
503
504 static int
505 dissect_ess_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
506   offset = dissect_ber_generalized_time(pinfo, tree, tvb, offset, hf_index);
507
508   return offset;
509 }
510 static int dissect_expansionTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
511   return dissect_ess_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_ess_expansionTime);
512 }
513
514
515 static int
516 dissect_ess_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
517   { proto_item *ti_tmp;
518   ti_tmp = proto_tree_add_item(tree, hf_index, tvb, offset>>8, 0, FALSE);
519   proto_item_append_text(ti_tmp, ": NULL");
520   }
521
522   return offset;
523 }
524 static int dissect_none_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
525   return dissect_ess_NULL(TRUE, tvb, offset, pinfo, tree, hf_ess_none);
526 }
527
528
529 static const value_string MLReceiptPolicy_vals[] = {
530   {   0, "none" },
531   {   1, "insteadOf" },
532   {   2, "inAdditionTo" },
533   { 0, NULL }
534 };
535
536 static const ber_choice MLReceiptPolicy_choice[] = {
537   {   0, BER_CLASS_CON, 0, 0, dissect_none_impl },
538   {   1, BER_CLASS_CON, 1, 0, dissect_insteadOf_impl },
539   {   2, BER_CLASS_CON, 2, 0, dissect_inAdditionTo_impl },
540   { 0, 0, 0, 0, NULL }
541 };
542
543 static int
544 dissect_ess_MLReceiptPolicy(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
545   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
546                               MLReceiptPolicy_choice, hf_index, ett_ess_MLReceiptPolicy);
547
548   return offset;
549 }
550 static int dissect_mlReceiptPolicy(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
551   return dissect_ess_MLReceiptPolicy(FALSE, tvb, offset, pinfo, tree, hf_ess_mlReceiptPolicy);
552 }
553
554 static const ber_sequence MLData_sequence[] = {
555   { BER_CLASS_UNI, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_mailListIdentifier },
556   { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_expansionTime },
557   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_mlReceiptPolicy },
558   { 0, 0, 0, NULL }
559 };
560
561 static int
562 dissect_ess_MLData(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
563   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
564                                 MLData_sequence, hf_index, ett_ess_MLData);
565
566   return offset;
567 }
568 static int dissect_MLExpansionHistory_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
569   return dissect_ess_MLData(FALSE, tvb, offset, pinfo, tree, hf_ess_MLExpansionHistory_item);
570 }
571
572 static const ber_sequence MLExpansionHistory_sequence_of[1] = {
573   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_MLExpansionHistory_item },
574 };
575
576 static int
577 dissect_ess_MLExpansionHistory(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
578   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
579                                    MLExpansionHistory_sequence_of, hf_index, ett_ess_MLExpansionHistory);
580
581   return offset;
582 }
583
584
585 static int
586 dissect_ess_Hash(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
587   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
588                                     NULL);
589
590   return offset;
591 }
592 static int dissect_certHash(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
593   return dissect_ess_Hash(FALSE, tvb, offset, pinfo, tree, hf_ess_certHash);
594 }
595
596 static const ber_sequence IssuerSerial_sequence[] = {
597   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_issuer },
598   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber },
599   { 0, 0, 0, NULL }
600 };
601
602 static int
603 dissect_ess_IssuerSerial(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
604   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
605                                 IssuerSerial_sequence, hf_index, ett_ess_IssuerSerial);
606
607   return offset;
608 }
609 static int dissect_issuerSerial(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
610   return dissect_ess_IssuerSerial(FALSE, tvb, offset, pinfo, tree, hf_ess_issuerSerial);
611 }
612
613 static const ber_sequence ESSCertID_sequence[] = {
614   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_certHash },
615   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_issuerSerial },
616   { 0, 0, 0, NULL }
617 };
618
619 static int
620 dissect_ess_ESSCertID(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
621   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
622                                 ESSCertID_sequence, hf_index, ett_ess_ESSCertID);
623
624   return offset;
625 }
626 static int dissect_certs_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
627   return dissect_ess_ESSCertID(FALSE, tvb, offset, pinfo, tree, hf_ess_certs_item);
628 }
629
630 static const ber_sequence SEQUNCE_OF_ESSCertID_sequence_of[1] = {
631   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certs_item },
632 };
633
634 static int
635 dissect_ess_SEQUNCE_OF_ESSCertID(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
636   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
637                                    SEQUNCE_OF_ESSCertID_sequence_of, hf_index, ett_ess_SEQUNCE_OF_ESSCertID);
638
639   return offset;
640 }
641 static int dissect_certs(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
642   return dissect_ess_SEQUNCE_OF_ESSCertID(FALSE, tvb, offset, pinfo, tree, hf_ess_certs);
643 }
644
645 static const ber_sequence SEQUNCE_OF_PolicyInformation_sequence_of[1] = {
646   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_policies_item },
647 };
648
649 static int
650 dissect_ess_SEQUNCE_OF_PolicyInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
651   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
652                                    SEQUNCE_OF_PolicyInformation_sequence_of, hf_index, ett_ess_SEQUNCE_OF_PolicyInformation);
653
654   return offset;
655 }
656 static int dissect_policies(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
657   return dissect_ess_SEQUNCE_OF_PolicyInformation(FALSE, tvb, offset, pinfo, tree, hf_ess_policies);
658 }
659
660 static const ber_sequence SigningCertificate_sequence[] = {
661   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certs },
662   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_policies },
663   { 0, 0, 0, NULL }
664 };
665
666 static int
667 dissect_ess_SigningCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
668   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
669                                 SigningCertificate_sequence, hf_index, ett_ess_SigningCertificate);
670
671   return offset;
672 }
673
674 /*--- PDUs ---*/
675
676 static void dissect_ReceiptRequest_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
677   dissect_ess_ReceiptRequest(FALSE, tvb, 0, pinfo, tree, hf_ess_ReceiptRequest_PDU);
678 }
679 static void dissect_ContentIdentifier_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
680   dissect_ess_ContentIdentifier(FALSE, tvb, 0, pinfo, tree, hf_ess_ContentIdentifier_PDU);
681 }
682 static void dissect_Receipt_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
683   dissect_ess_Receipt(FALSE, tvb, 0, pinfo, tree, hf_ess_Receipt_PDU);
684 }
685 static void dissect_ContentHints_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
686   dissect_ess_ContentHints(FALSE, tvb, 0, pinfo, tree, hf_ess_ContentHints_PDU);
687 }
688 static void dissect_MsgSigDigest_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
689   dissect_ess_MsgSigDigest(FALSE, tvb, 0, pinfo, tree, hf_ess_MsgSigDigest_PDU);
690 }
691 static void dissect_ContentReference_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
692   dissect_ess_ContentReference(FALSE, tvb, 0, pinfo, tree, hf_ess_ContentReference_PDU);
693 }
694 static void dissect_MLExpansionHistory_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
695   dissect_ess_MLExpansionHistory(FALSE, tvb, 0, pinfo, tree, hf_ess_MLExpansionHistory_PDU);
696 }
697 static void dissect_SigningCertificate_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
698   dissect_ess_SigningCertificate(FALSE, tvb, 0, pinfo, tree, hf_ess_SigningCertificate_PDU);
699 }
700
701
702 /*--- End of included file: packet-ess-fn.c ---*/
703
704
705
706 /*--- proto_register_ess ----------------------------------------------*/
707 void proto_register_ess(void) {
708
709   /* List of fields */
710   static hf_register_info hf[] = {
711     { &hf_ess_SecurityCategory_type_OID, 
712       { "type", "ess.type_OID", FT_STRING, BASE_NONE, NULL, 0,
713         "Type of Security Category", HFILL }},
714
715 /*--- Included file: packet-ess-hfarr.c ---*/
716
717     { &hf_ess_ReceiptRequest_PDU,
718       { "ReceiptRequest", "ess.ReceiptRequest",
719         FT_NONE, BASE_NONE, NULL, 0,
720         "ReceiptRequest", HFILL }},
721     { &hf_ess_ContentIdentifier_PDU,
722       { "ContentIdentifier", "ess.ContentIdentifier",
723         FT_BYTES, BASE_HEX, NULL, 0,
724         "ContentIdentifier", HFILL }},
725     { &hf_ess_Receipt_PDU,
726       { "Receipt", "ess.Receipt",
727         FT_NONE, BASE_NONE, NULL, 0,
728         "Receipt", HFILL }},
729     { &hf_ess_ContentHints_PDU,
730       { "ContentHints", "ess.ContentHints",
731         FT_NONE, BASE_NONE, NULL, 0,
732         "ContentHints", HFILL }},
733     { &hf_ess_MsgSigDigest_PDU,
734       { "MsgSigDigest", "ess.MsgSigDigest",
735         FT_BYTES, BASE_HEX, NULL, 0,
736         "MsgSigDigest", HFILL }},
737     { &hf_ess_ContentReference_PDU,
738       { "ContentReference", "ess.ContentReference",
739         FT_NONE, BASE_NONE, NULL, 0,
740         "ContentReference", HFILL }},
741     { &hf_ess_MLExpansionHistory_PDU,
742       { "MLExpansionHistory", "ess.MLExpansionHistory",
743         FT_NONE, BASE_NONE, NULL, 0,
744         "MLExpansionHistory", HFILL }},
745     { &hf_ess_SigningCertificate_PDU,
746       { "SigningCertificate", "ess.SigningCertificate",
747         FT_NONE, BASE_NONE, NULL, 0,
748         "SigningCertificate", HFILL }},
749     { &hf_ess_signedContentIdentifier,
750       { "signedContentIdentifier", "ess.signedContentIdentifier",
751         FT_BYTES, BASE_HEX, NULL, 0,
752         "", HFILL }},
753     { &hf_ess_receiptsFrom,
754       { "receiptsFrom", "ess.receiptsFrom",
755         FT_UINT32, BASE_DEC, VALS(ReceiptsFrom_vals), 0,
756         "ReceiptRequest/receiptsFrom", HFILL }},
757     { &hf_ess_receiptsTo,
758       { "receiptsTo", "ess.receiptsTo",
759         FT_NONE, BASE_NONE, NULL, 0,
760         "ReceiptRequest/receiptsTo", HFILL }},
761     { &hf_ess_receiptsTo_item,
762       { "Item", "ess.receiptsTo_item",
763         FT_UINT32, BASE_DEC, NULL, 0,
764         "ReceiptRequest/receiptsTo/_item", HFILL }},
765     { &hf_ess_allOrFirstTier,
766       { "allOrFirstTier", "ess.allOrFirstTier",
767         FT_INT32, BASE_DEC, VALS(AllOrFirstTier_vals), 0,
768         "ReceiptsFrom/allOrFirstTier", HFILL }},
769     { &hf_ess_receiptList,
770       { "receiptList", "ess.receiptList",
771         FT_NONE, BASE_NONE, NULL, 0,
772         "ReceiptsFrom/receiptList", HFILL }},
773     { &hf_ess_receiptList_item,
774       { "Item", "ess.receiptList_item",
775         FT_UINT32, BASE_DEC, NULL, 0,
776         "ReceiptsFrom/receiptList/_item", HFILL }},
777     { &hf_ess_version,
778       { "version", "ess.version",
779         FT_INT32, BASE_DEC, VALS(ESSVersion_vals), 0,
780         "Receipt/version", HFILL }},
781     { &hf_ess_contentType,
782       { "contentType", "ess.contentType",
783         FT_STRING, BASE_NONE, NULL, 0,
784         "", HFILL }},
785     { &hf_ess_originatorSignatureValue,
786       { "originatorSignatureValue", "ess.originatorSignatureValue",
787         FT_BYTES, BASE_HEX, NULL, 0,
788         "", HFILL }},
789     { &hf_ess_contentDescription,
790       { "contentDescription", "ess.contentDescription",
791         FT_STRING, BASE_NONE, NULL, 0,
792         "ContentHints/contentDescription", HFILL }},
793     { &hf_ess_pString,
794       { "pString", "ess.pString",
795         FT_STRING, BASE_NONE, NULL, 0,
796         "ESSPrivacyMark/pString", HFILL }},
797     { &hf_ess_utf8String,
798       { "utf8String", "ess.utf8String",
799         FT_STRING, BASE_NONE, NULL, 0,
800         "ESSPrivacyMark/utf8String", HFILL }},
801     { &hf_ess_SecurityCategories_item,
802       { "Item", "ess.SecurityCategories_item",
803         FT_NONE, BASE_NONE, NULL, 0,
804         "SecurityCategories/_item", HFILL }},
805     { &hf_ess_type,
806       { "type", "ess.type",
807         FT_STRING, BASE_NONE, NULL, 0,
808         "SecurityCategory/type", HFILL }},
809     { &hf_ess_value,
810       { "value", "ess.value",
811         FT_NONE, BASE_NONE, NULL, 0,
812         "SecurityCategory/value", HFILL }},
813     { &hf_ess_MLExpansionHistory_item,
814       { "Item", "ess.MLExpansionHistory_item",
815         FT_NONE, BASE_NONE, NULL, 0,
816         "MLExpansionHistory/_item", HFILL }},
817     { &hf_ess_mailListIdentifier,
818       { "mailListIdentifier", "ess.mailListIdentifier",
819         FT_UINT32, BASE_DEC, VALS(EntityIdentifier_vals), 0,
820         "MLData/mailListIdentifier", HFILL }},
821     { &hf_ess_expansionTime,
822       { "expansionTime", "ess.expansionTime",
823         FT_STRING, BASE_NONE, NULL, 0,
824         "MLData/expansionTime", HFILL }},
825     { &hf_ess_mlReceiptPolicy,
826       { "mlReceiptPolicy", "ess.mlReceiptPolicy",
827         FT_UINT32, BASE_DEC, VALS(MLReceiptPolicy_vals), 0,
828         "MLData/mlReceiptPolicy", HFILL }},
829     { &hf_ess_issuerAndSerialNumber,
830       { "issuerAndSerialNumber", "ess.issuerAndSerialNumber",
831         FT_NONE, BASE_NONE, NULL, 0,
832         "EntityIdentifier/issuerAndSerialNumber", HFILL }},
833     { &hf_ess_subjectKeyIdentifier,
834       { "subjectKeyIdentifier", "ess.subjectKeyIdentifier",
835         FT_BYTES, BASE_HEX, NULL, 0,
836         "EntityIdentifier/subjectKeyIdentifier", HFILL }},
837     { &hf_ess_none,
838       { "none", "ess.none",
839         FT_NONE, BASE_NONE, NULL, 0,
840         "MLReceiptPolicy/none", HFILL }},
841     { &hf_ess_insteadOf,
842       { "insteadOf", "ess.insteadOf",
843         FT_NONE, BASE_NONE, NULL, 0,
844         "MLReceiptPolicy/insteadOf", HFILL }},
845     { &hf_ess_insteadOf_item,
846       { "Item", "ess.insteadOf_item",
847         FT_UINT32, BASE_DEC, NULL, 0,
848         "MLReceiptPolicy/insteadOf/_item", HFILL }},
849     { &hf_ess_inAdditionTo,
850       { "inAdditionTo", "ess.inAdditionTo",
851         FT_NONE, BASE_NONE, NULL, 0,
852         "MLReceiptPolicy/inAdditionTo", HFILL }},
853     { &hf_ess_inAdditionTo_item,
854       { "Item", "ess.inAdditionTo_item",
855         FT_UINT32, BASE_DEC, NULL, 0,
856         "MLReceiptPolicy/inAdditionTo/_item", HFILL }},
857     { &hf_ess_certs,
858       { "certs", "ess.certs",
859         FT_NONE, BASE_NONE, NULL, 0,
860         "SigningCertificate/certs", HFILL }},
861     { &hf_ess_certs_item,
862       { "Item", "ess.certs_item",
863         FT_NONE, BASE_NONE, NULL, 0,
864         "SigningCertificate/certs/_item", HFILL }},
865     { &hf_ess_policies,
866       { "policies", "ess.policies",
867         FT_NONE, BASE_NONE, NULL, 0,
868         "SigningCertificate/policies", HFILL }},
869     { &hf_ess_policies_item,
870       { "Item", "ess.policies_item",
871         FT_NONE, BASE_NONE, NULL, 0,
872         "SigningCertificate/policies/_item", HFILL }},
873     { &hf_ess_certHash,
874       { "certHash", "ess.certHash",
875         FT_BYTES, BASE_HEX, NULL, 0,
876         "ESSCertID/certHash", HFILL }},
877     { &hf_ess_issuerSerial,
878       { "issuerSerial", "ess.issuerSerial",
879         FT_NONE, BASE_NONE, NULL, 0,
880         "ESSCertID/issuerSerial", HFILL }},
881     { &hf_ess_issuer,
882       { "issuer", "ess.issuer",
883         FT_UINT32, BASE_DEC, NULL, 0,
884         "IssuerSerial/issuer", HFILL }},
885     { &hf_ess_serialNumber,
886       { "serialNumber", "ess.serialNumber",
887         FT_INT32, BASE_DEC, NULL, 0,
888         "IssuerSerial/serialNumber", HFILL }},
889
890 /*--- End of included file: packet-ess-hfarr.c ---*/
891
892   };
893
894   /* List of subtrees */
895   static gint *ett[] = {
896
897 /*--- Included file: packet-ess-ettarr.c ---*/
898
899     &ett_ess_ReceiptRequest,
900     &ett_ess_SEQUNCE_OF_GeneralNames,
901     &ett_ess_ReceiptsFrom,
902     &ett_ess_Receipt,
903     &ett_ess_ContentHints,
904     &ett_ess_ContentReference,
905     &ett_ess_ESSPrivacyMark,
906     &ett_ess_SecurityCategories,
907     &ett_ess_SecurityCategory,
908     &ett_ess_MLExpansionHistory,
909     &ett_ess_MLData,
910     &ett_ess_EntityIdentifier,
911     &ett_ess_MLReceiptPolicy,
912     &ett_ess_SigningCertificate,
913     &ett_ess_SEQUNCE_OF_ESSCertID,
914     &ett_ess_SEQUNCE_OF_PolicyInformation,
915     &ett_ess_ESSCertID,
916     &ett_ess_IssuerSerial,
917
918 /*--- End of included file: packet-ess-ettarr.c ---*/
919
920   };
921
922   /* Register protocol */
923   proto_ess = proto_register_protocol(PNAME, PSNAME, PFNAME);
924
925   /* Register fields and subtrees */
926   proto_register_field_array(proto_ess, hf, array_length(hf));
927   proto_register_subtree_array(ett, array_length(ett));
928
929 }
930
931
932 /*--- proto_reg_handoff_ess -------------------------------------------*/
933 void proto_reg_handoff_ess(void) {
934
935 /*--- Included file: packet-ess-dis-tab.c ---*/
936
937  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.1", dissect_ReceiptRequest_PDU, proto_ess, "id-aa-receiptRequest");
938  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.7", dissect_ContentIdentifier_PDU, proto_ess, "id-aa-contentIdentifier");
939  register_ber_oid_dissector("1.2.840.113549.1.9.16.1.1", dissect_Receipt_PDU, proto_ess, "id-ct-receipt");
940  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.4", dissect_ContentHints_PDU, proto_ess, "id-aa-contentHint");
941  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.5", dissect_MsgSigDigest_PDU, proto_ess, "id-aa-msgSigDigest");
942  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.10", dissect_ContentReference_PDU, proto_ess, "id-aa-contentReference");
943  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.3", dissect_MLExpansionHistory_PDU, proto_ess, "id-aa-mlExpandHistory");
944  register_ber_oid_dissector("1.2.840.113549.1.9.16.2.12", dissect_SigningCertificate_PDU, proto_ess, "id-aa-signingCertificate");
945
946
947 /*--- End of included file: packet-ess-dis-tab.c ---*/
948
949 }
950