01d2ba8dcf31278c20c21060857e232067dc85ec
[obnox/wireshark/wip.git] / epan / dissectors / packet-crmf.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* ./packet-crmf.c                                                            */
4 /* ../../tools/asn2eth.py -X -b -e -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */
5
6 /* Input file: packet-crmf-template.c */
7
8 /* packet-crmf.c
9  * Routines for RFC2511 Certificate Request Message Format packet dissection
10  *   Ronnie Sahlberg 2004
11  *
12  * $Id$
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 #include <epan/conversation.h>
40
41 #include <stdio.h>
42 #include <string.h>
43
44 #include "packet-ber.h"
45 #include "packet-crmf.h"
46 #include "packet-cms.h"
47 #include "packet-pkix1explicit.h"
48 #include "packet-pkix1implicit.h"
49
50 #define PNAME  "Certificate Request Message Format"
51 #define PSNAME "CRMF"
52 #define PFNAME "crmf"
53
54 /* Initialize the protocol and registered fields */
55 int proto_crmf = -1;
56 static int hf_crmf_type_oid = -1;
57
58 /*--- Included file: packet-crmf-hf.c ---*/
59
60 static int hf_crmf_PBMParameter_PDU = -1;         /* PBMParameter */
61 static int hf_crmf_utcTime = -1;                  /* UTCTime */
62 static int hf_crmf_generalTime = -1;              /* GeneralizedTime */
63 static int hf_crmf_CertReqMessages_item = -1;     /* CertReqMsg */
64 static int hf_crmf_certReq = -1;                  /* CertRequest */
65 static int hf_crmf_pop = -1;                      /* ProofOfPossession */
66 static int hf_crmf_regInfo = -1;                  /* SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue */
67 static int hf_crmf_regInfo_item = -1;             /* AttributeTypeAndValue */
68 static int hf_crmf_certReqId = -1;                /* INTEGER */
69 static int hf_crmf_certTemplate = -1;             /* CertTemplate */
70 static int hf_crmf_controls = -1;                 /* Controls */
71 static int hf_crmf_version = -1;                  /* Version */
72 static int hf_crmf_serialNumber = -1;             /* INTEGER */
73 static int hf_crmf_signingAlg = -1;               /* AlgorithmIdentifier */
74 static int hf_crmf_template_issuer = -1;          /* Name */
75 static int hf_crmf_validity = -1;                 /* OptionalValidity */
76 static int hf_crmf_subject = -1;                  /* Name */
77 static int hf_crmf_publicKey = -1;                /* SubjectPublicKeyInfo */
78 static int hf_crmf_issuerUID = -1;                /* UniqueIdentifier */
79 static int hf_crmf_subjectUID = -1;               /* UniqueIdentifier */
80 static int hf_crmf_extensions = -1;               /* Extensions */
81 static int hf_crmf_notBefore = -1;                /* Time */
82 static int hf_crmf_notAfter = -1;                 /* Time */
83 static int hf_crmf_Controls_item = -1;            /* AttributeTypeAndValue */
84 static int hf_crmf_type = -1;                     /* T_type */
85 static int hf_crmf_value = -1;                    /* T_value */
86 static int hf_crmf_raVerified = -1;               /* NULL */
87 static int hf_crmf_signature = -1;                /* POPOSigningKey */
88 static int hf_crmf_keyEncipherment = -1;          /* POPOPrivKey */
89 static int hf_crmf_keyAgreement = -1;             /* POPOPrivKey */
90 static int hf_crmf_poposkInput = -1;              /* POPOSigningKeyInput */
91 static int hf_crmf_algorithmIdentifier = -1;      /* AlgorithmIdentifier */
92 static int hf_crmf_sk_signature = -1;             /* BIT_STRING */
93 static int hf_crmf_authInfo = -1;                 /* T_authInfo */
94 static int hf_crmf_sender = -1;                   /* GeneralName */
95 static int hf_crmf_publicKeyMAC = -1;             /* PKMACValue */
96 static int hf_crmf_algId = -1;                    /* AlgorithmIdentifier */
97 static int hf_crmf_pkmac_value = -1;              /* BIT_STRING */
98 static int hf_crmf_salt = -1;                     /* OCTET_STRING */
99 static int hf_crmf_owf = -1;                      /* AlgorithmIdentifier */
100 static int hf_crmf_iterationCount = -1;           /* INTEGER */
101 static int hf_crmf_mac = -1;                      /* AlgorithmIdentifier */
102 static int hf_crmf_thisMessage = -1;              /* BIT_STRING */
103 static int hf_crmf_subsequentMessage = -1;        /* SubsequentMessage */
104 static int hf_crmf_dhMAC = -1;                    /* BIT_STRING */
105 static int hf_crmf_action = -1;                   /* T_action */
106 static int hf_crmf_pubInfos = -1;                 /* SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo */
107 static int hf_crmf_pubInfos_item = -1;            /* SinglePubInfo */
108 static int hf_crmf_pubMethod = -1;                /* T_pubMethod */
109 static int hf_crmf_pubLocation = -1;              /* GeneralName */
110 static int hf_crmf_encryptedPrivKey = -1;         /* EncryptedKey */
111 static int hf_crmf_keyGenParameters = -1;         /* KeyGenParameters */
112 static int hf_crmf_archiveRemGenPrivKey = -1;     /* BOOLEAN */
113 static int hf_crmf_encryptedValue = -1;           /* EncryptedValue */
114 static int hf_crmf_envelopedData = -1;            /* EnvelopedData */
115 static int hf_crmf_intendedAlg = -1;              /* AlgorithmIdentifier */
116 static int hf_crmf_symmAlg = -1;                  /* AlgorithmIdentifier */
117 static int hf_crmf_encSymmKey = -1;               /* BIT_STRING */
118 static int hf_crmf_keyAlg = -1;                   /* AlgorithmIdentifier */
119 static int hf_crmf_valueHint = -1;                /* OCTET_STRING */
120 static int hf_crmf_encValue = -1;                 /* BIT_STRING */
121 static int hf_crmf_issuer = -1;                   /* GeneralName */
122
123 /*--- End of included file: packet-crmf-hf.c ---*/
124
125
126 /* Initialize the subtree pointers */
127
128 /*--- Included file: packet-crmf-ett.c ---*/
129
130 static gint ett_crmf_Time = -1;
131 static gint ett_crmf_CertReqMessages = -1;
132 static gint ett_crmf_CertReqMsg = -1;
133 static gint ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue = -1;
134 static gint ett_crmf_CertRequest = -1;
135 static gint ett_crmf_CertTemplate = -1;
136 static gint ett_crmf_OptionalValidity = -1;
137 static gint ett_crmf_Controls = -1;
138 static gint ett_crmf_AttributeTypeAndValue = -1;
139 static gint ett_crmf_ProofOfPossession = -1;
140 static gint ett_crmf_POPOSigningKey = -1;
141 static gint ett_crmf_POPOSigningKeyInput = -1;
142 static gint ett_crmf_T_authInfo = -1;
143 static gint ett_crmf_PKMACValue = -1;
144 static gint ett_crmf_PBMParameter = -1;
145 static gint ett_crmf_POPOPrivKey = -1;
146 static gint ett_crmf_PKIPublicationInfo = -1;
147 static gint ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo = -1;
148 static gint ett_crmf_SinglePubInfo = -1;
149 static gint ett_crmf_PKIArchiveOptions = -1;
150 static gint ett_crmf_EncryptedKey = -1;
151 static gint ett_crmf_EncryptedValue = -1;
152 static gint ett_crmf_CertId = -1;
153
154 /*--- End of included file: packet-crmf-ett.c ---*/
155
156
157 static char object_identifier_id[BER_MAX_OID_STR_LEN];
158
159
160 /*--- Included file: packet-crmf-fn.c ---*/
161
162 /*--- Fields for imported types ---*/
163
164 static int dissect_signingAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
165   return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_signingAlg);
166 }
167 static int dissect_template_issuer_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
168   return dissect_pkix1explicit_Name(TRUE, tvb, offset, pinfo, tree, hf_crmf_template_issuer);
169 }
170 static int dissect_subject_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
171   return dissect_pkix1explicit_Name(TRUE, tvb, offset, pinfo, tree, hf_crmf_subject);
172 }
173 static int dissect_publicKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
174   return dissect_pkix1explicit_SubjectPublicKeyInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_publicKey);
175 }
176 static int dissect_publicKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
177   return dissect_pkix1explicit_SubjectPublicKeyInfo(TRUE, tvb, offset, pinfo, tree, hf_crmf_publicKey);
178 }
179 static int dissect_extensions_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
180   return dissect_pkix1explicit_Extensions(TRUE, tvb, offset, pinfo, tree, hf_crmf_extensions);
181 }
182 static int dissect_algorithmIdentifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
183   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_algorithmIdentifier);
184 }
185 static int dissect_sender_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
186   return dissect_pkix1implicit_GeneralName(TRUE, tvb, offset, pinfo, tree, hf_crmf_sender);
187 }
188 static int dissect_algId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
189   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_algId);
190 }
191 static int dissect_owf(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
192   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_owf);
193 }
194 static int dissect_mac(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
195   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_mac);
196 }
197 static int dissect_pubLocation(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
198   return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubLocation);
199 }
200 static int dissect_envelopedData_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
201   return dissect_cms_EnvelopedData(TRUE, tvb, offset, pinfo, tree, hf_crmf_envelopedData);
202 }
203 static int dissect_intendedAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
204   return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_intendedAlg);
205 }
206 static int dissect_symmAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
207   return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_symmAlg);
208 }
209 static int dissect_keyAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
210   return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyAlg);
211 }
212 static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
213   return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_crmf_issuer);
214 }
215
216
217 static const value_string crmf_Version_vals[] = {
218   {   0, "v1" },
219   {   1, "v2" },
220   {   2, "v3" },
221   { 0, NULL }
222 };
223
224
225 static int
226 dissect_crmf_Version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
227   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
228                                   NULL);
229
230   return offset;
231 }
232 static int dissect_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
233   return dissect_crmf_Version(TRUE, tvb, offset, pinfo, tree, hf_crmf_version);
234 }
235
236
237
238 static int
239 dissect_crmf_UniqueIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
240   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
241                                     NULL, hf_index, -1,
242                                     NULL);
243
244   return offset;
245 }
246 static int dissect_issuerUID_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
247   return dissect_crmf_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_issuerUID);
248 }
249 static int dissect_subjectUID_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
250   return dissect_crmf_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_subjectUID);
251 }
252
253
254
255 static int
256 dissect_crmf_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
257   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
258                                             pinfo, tree, tvb, offset, hf_index,
259                                             NULL);
260
261   return offset;
262 }
263 static int dissect_utcTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
264   return dissect_crmf_UTCTime(FALSE, tvb, offset, pinfo, tree, hf_crmf_utcTime);
265 }
266
267
268
269 static int
270 dissect_crmf_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
271   offset = dissect_ber_GeneralizedTime(implicit_tag, pinfo, tree, tvb, offset, hf_index);
272
273   return offset;
274 }
275 static int dissect_generalTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
276   return dissect_crmf_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_crmf_generalTime);
277 }
278
279
280 static const value_string crmf_Time_vals[] = {
281   {   0, "utcTime" },
282   {   1, "generalTime" },
283   { 0, NULL }
284 };
285
286 static const ber_choice_t Time_choice[] = {
287   {   0, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_utcTime },
288   {   1, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_generalTime },
289   { 0, 0, 0, 0, NULL }
290 };
291
292 static int
293 dissect_crmf_Time(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
294   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
295                                  Time_choice, hf_index, ett_crmf_Time,
296                                  NULL);
297
298   return offset;
299 }
300 static int dissect_notBefore_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
301   return dissect_crmf_Time(TRUE, tvb, offset, pinfo, tree, hf_crmf_notBefore);
302 }
303 static int dissect_notAfter_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
304   return dissect_crmf_Time(TRUE, tvb, offset, pinfo, tree, hf_crmf_notAfter);
305 }
306
307
308
309 static int
310 dissect_crmf_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
311   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
312                                   NULL);
313
314   return offset;
315 }
316 static int dissect_certReqId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
317   return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_certReqId);
318 }
319 static int dissect_serialNumber(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
320   return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_serialNumber);
321 }
322 static int dissect_serialNumber_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
323   return dissect_crmf_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_crmf_serialNumber);
324 }
325 static int dissect_iterationCount(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
326   return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_iterationCount);
327 }
328
329
330 static const ber_sequence_t OptionalValidity_sequence[] = {
331   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_notBefore_impl },
332   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_notAfter_impl },
333   { 0, 0, 0, NULL }
334 };
335
336 int
337 dissect_crmf_OptionalValidity(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
338   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
339                                    OptionalValidity_sequence, hf_index, ett_crmf_OptionalValidity);
340
341   return offset;
342 }
343 static int dissect_validity_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
344   return dissect_crmf_OptionalValidity(TRUE, tvb, offset, pinfo, tree, hf_crmf_validity);
345 }
346
347
348 static const ber_sequence_t CertTemplate_sequence[] = {
349   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_version_impl },
350   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_serialNumber_impl },
351   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_signingAlg_impl },
352   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_template_issuer_impl },
353   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_validity_impl },
354   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subject_impl },
355   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_publicKey_impl },
356   { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_issuerUID_impl },
357   { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subjectUID_impl },
358   { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
359   { 0, 0, 0, NULL }
360 };
361
362 int
363 dissect_crmf_CertTemplate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
364   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
365                                    CertTemplate_sequence, hf_index, ett_crmf_CertTemplate);
366
367   return offset;
368 }
369 static int dissect_certTemplate(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
370   return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_crmf_certTemplate);
371 }
372
373
374
375 static int
376 dissect_crmf_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
377   offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
378                                          hf_crmf_type_oid, object_identifier_id);
379
380
381   return offset;
382 }
383 static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
384   return dissect_crmf_T_type(FALSE, tvb, offset, pinfo, tree, hf_crmf_type);
385 }
386
387
388
389 static int
390 dissect_crmf_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
391   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
392
393
394   return offset;
395 }
396 static int dissect_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
397   return dissect_crmf_T_value(FALSE, tvb, offset, pinfo, tree, hf_crmf_value);
398 }
399
400
401 static const ber_sequence_t AttributeTypeAndValue_sequence[] = {
402   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type },
403   { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value },
404   { 0, 0, 0, NULL }
405 };
406
407 int
408 dissect_crmf_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
409   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
410                                    AttributeTypeAndValue_sequence, hf_index, ett_crmf_AttributeTypeAndValue);
411
412   return offset;
413 }
414 static int dissect_regInfo_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
415   return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_regInfo_item);
416 }
417 static int dissect_Controls_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
418   return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_Controls_item);
419 }
420
421
422 static const ber_sequence_t Controls_sequence_of[1] = {
423   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Controls_item },
424 };
425
426 int
427 dissect_crmf_Controls(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
428   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
429                                       Controls_sequence_of, hf_index, ett_crmf_Controls);
430
431   return offset;
432 }
433 static int dissect_controls(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
434   return dissect_crmf_Controls(FALSE, tvb, offset, pinfo, tree, hf_crmf_controls);
435 }
436
437
438 static const ber_sequence_t CertRequest_sequence[] = {
439   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId },
440   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certTemplate },
441   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_controls },
442   { 0, 0, 0, NULL }
443 };
444
445 int
446 dissect_crmf_CertRequest(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
447   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
448                                    CertRequest_sequence, hf_index, ett_crmf_CertRequest);
449
450   return offset;
451 }
452 static int dissect_certReq(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
453   return dissect_crmf_CertRequest(FALSE, tvb, offset, pinfo, tree, hf_crmf_certReq);
454 }
455
456
457
458 static int
459 dissect_crmf_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
460   offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
461
462   return offset;
463 }
464 static int dissect_raVerified_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
465   return dissect_crmf_NULL(TRUE, tvb, offset, pinfo, tree, hf_crmf_raVerified);
466 }
467
468
469
470 static int
471 dissect_crmf_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
472   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
473                                     NULL, hf_index, -1,
474                                     NULL);
475
476   return offset;
477 }
478 static int dissect_sk_signature(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
479   return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_sk_signature);
480 }
481 static int dissect_pkmac_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
482   return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_pkmac_value);
483 }
484 static int dissect_thisMessage_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
485   return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_thisMessage);
486 }
487 static int dissect_dhMAC_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
488   return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_dhMAC);
489 }
490 static int dissect_encSymmKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
491   return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_encSymmKey);
492 }
493 static int dissect_encValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
494   return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_encValue);
495 }
496
497
498 static const ber_sequence_t PKMACValue_sequence[] = {
499   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algId },
500   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkmac_value },
501   { 0, 0, 0, NULL }
502 };
503
504 int
505 dissect_crmf_PKMACValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
506   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
507                                    PKMACValue_sequence, hf_index, ett_crmf_PKMACValue);
508
509   return offset;
510 }
511 static int dissect_publicKeyMAC(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
512   return dissect_crmf_PKMACValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_publicKeyMAC);
513 }
514
515
516 static const value_string crmf_T_authInfo_vals[] = {
517   {   0, "sender" },
518   {   1, "publicKeyMAC" },
519   { 0, NULL }
520 };
521
522 static const ber_choice_t T_authInfo_choice[] = {
523   {   0, BER_CLASS_CON, 0, 0, dissect_sender_impl },
524   {   1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKeyMAC },
525   { 0, 0, 0, 0, NULL }
526 };
527
528 static int
529 dissect_crmf_T_authInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
530   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
531                                  T_authInfo_choice, hf_index, ett_crmf_T_authInfo,
532                                  NULL);
533
534   return offset;
535 }
536 static int dissect_authInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
537   return dissect_crmf_T_authInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_authInfo);
538 }
539
540
541 static const ber_sequence_t POPOSigningKeyInput_sequence[] = {
542   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_authInfo },
543   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKey },
544   { 0, 0, 0, NULL }
545 };
546
547 int
548 dissect_crmf_POPOSigningKeyInput(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
549   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
550                                    POPOSigningKeyInput_sequence, hf_index, ett_crmf_POPOSigningKeyInput);
551
552   return offset;
553 }
554 static int dissect_poposkInput_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
555   return dissect_crmf_POPOSigningKeyInput(TRUE, tvb, offset, pinfo, tree, hf_crmf_poposkInput);
556 }
557
558
559 static const ber_sequence_t POPOSigningKey_sequence[] = {
560   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_poposkInput_impl },
561   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier },
562   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_sk_signature },
563   { 0, 0, 0, NULL }
564 };
565
566 int
567 dissect_crmf_POPOSigningKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
568   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
569                                    POPOSigningKey_sequence, hf_index, ett_crmf_POPOSigningKey);
570
571   return offset;
572 }
573 static int dissect_signature_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
574   return dissect_crmf_POPOSigningKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_signature);
575 }
576
577
578 const value_string crmf_SubsequentMessage_vals[] = {
579   {   0, "encrCert" },
580   {   1, "challengeResp" },
581   { 0, NULL }
582 };
583
584
585 int
586 dissect_crmf_SubsequentMessage(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
587   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
588                                   NULL);
589
590   return offset;
591 }
592 static int dissect_subsequentMessage_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
593   return dissect_crmf_SubsequentMessage(TRUE, tvb, offset, pinfo, tree, hf_crmf_subsequentMessage);
594 }
595
596
597 const value_string crmf_POPOPrivKey_vals[] = {
598   {   0, "thisMessage" },
599   {   1, "subsequentMessage" },
600   {   2, "dhMAC" },
601   { 0, NULL }
602 };
603
604 static const ber_choice_t POPOPrivKey_choice[] = {
605   {   0, BER_CLASS_CON, 0, 0, dissect_thisMessage_impl },
606   {   1, BER_CLASS_CON, 1, 0, dissect_subsequentMessage_impl },
607   {   2, BER_CLASS_CON, 2, 0, dissect_dhMAC_impl },
608   { 0, 0, 0, 0, NULL }
609 };
610
611 int
612 dissect_crmf_POPOPrivKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
613   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
614                                  POPOPrivKey_choice, hf_index, ett_crmf_POPOPrivKey,
615                                  NULL);
616
617   return offset;
618 }
619 static int dissect_keyEncipherment_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
620   return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyEncipherment);
621 }
622 static int dissect_keyAgreement_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
623   return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyAgreement);
624 }
625
626
627 const value_string crmf_ProofOfPossession_vals[] = {
628   {   0, "raVerified" },
629   {   1, "signature" },
630   {   2, "keyEncipherment" },
631   {   3, "keyAgreement" },
632   { 0, NULL }
633 };
634
635 static const ber_choice_t ProofOfPossession_choice[] = {
636   {   0, BER_CLASS_CON, 0, 0, dissect_raVerified_impl },
637   {   1, BER_CLASS_CON, 1, 0, dissect_signature_impl },
638   {   2, BER_CLASS_CON, 2, 0, dissect_keyEncipherment_impl },
639   {   3, BER_CLASS_CON, 3, 0, dissect_keyAgreement_impl },
640   { 0, 0, 0, 0, NULL }
641 };
642
643 int
644 dissect_crmf_ProofOfPossession(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
645   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
646                                  ProofOfPossession_choice, hf_index, ett_crmf_ProofOfPossession,
647                                  NULL);
648
649   return offset;
650 }
651 static int dissect_pop(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
652   return dissect_crmf_ProofOfPossession(FALSE, tvb, offset, pinfo, tree, hf_crmf_pop);
653 }
654
655
656 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of[1] = {
657   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_regInfo_item },
658 };
659
660 static int
661 dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
662   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
663                                       SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue);
664
665   return offset;
666 }
667 static int dissect_regInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
668   return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_regInfo);
669 }
670
671
672 static const ber_sequence_t CertReqMsg_sequence[] = {
673   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certReq },
674   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pop },
675   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_regInfo },
676   { 0, 0, 0, NULL }
677 };
678
679 int
680 dissect_crmf_CertReqMsg(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
681   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
682                                    CertReqMsg_sequence, hf_index, ett_crmf_CertReqMsg);
683
684   return offset;
685 }
686 static int dissect_CertReqMessages_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
687   return dissect_crmf_CertReqMsg(FALSE, tvb, offset, pinfo, tree, hf_crmf_CertReqMessages_item);
688 }
689
690
691 static const ber_sequence_t CertReqMessages_sequence_of[1] = {
692   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CertReqMessages_item },
693 };
694
695 int
696 dissect_crmf_CertReqMessages(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
697   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
698                                       CertReqMessages_sequence_of, hf_index, ett_crmf_CertReqMessages);
699
700   return offset;
701 }
702
703
704
705 static int
706 dissect_crmf_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
707   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
708                                        NULL);
709
710   return offset;
711 }
712 static int dissect_salt(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
713   return dissect_crmf_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_salt);
714 }
715 static int dissect_valueHint_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
716   return dissect_crmf_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_valueHint);
717 }
718
719
720 static const ber_sequence_t PBMParameter_sequence[] = {
721   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt },
722   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
723   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount },
724   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
725   { 0, 0, 0, NULL }
726 };
727
728 int
729 dissect_crmf_PBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
730   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
731                                    PBMParameter_sequence, hf_index, ett_crmf_PBMParameter);
732
733   return offset;
734 }
735
736
737
738 int
739 dissect_crmf_RegToken(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
740   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
741                                             pinfo, tree, tvb, offset, hf_index,
742                                             NULL);
743
744   return offset;
745 }
746
747
748
749 int
750 dissect_crmf_Authenticator(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
751   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
752                                             pinfo, tree, tvb, offset, hf_index,
753                                             NULL);
754
755   return offset;
756 }
757
758
759 static const value_string crmf_T_action_vals[] = {
760   {   0, "dontPublish" },
761   {   1, "pleasePublish" },
762   { 0, NULL }
763 };
764
765
766 static int
767 dissect_crmf_T_action(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
768   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
769                                   NULL);
770
771   return offset;
772 }
773 static int dissect_action(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
774   return dissect_crmf_T_action(FALSE, tvb, offset, pinfo, tree, hf_crmf_action);
775 }
776
777
778 static const value_string crmf_T_pubMethod_vals[] = {
779   {   0, "dontCare" },
780   {   1, "x500" },
781   {   2, "web" },
782   {   3, "ldap" },
783   { 0, NULL }
784 };
785
786
787 static int
788 dissect_crmf_T_pubMethod(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
789   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
790                                   NULL);
791
792   return offset;
793 }
794 static int dissect_pubMethod(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
795   return dissect_crmf_T_pubMethod(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubMethod);
796 }
797
798
799 static const ber_sequence_t SinglePubInfo_sequence[] = {
800   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pubMethod },
801   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubLocation },
802   { 0, 0, 0, NULL }
803 };
804
805 int
806 dissect_crmf_SinglePubInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
807   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
808                                    SinglePubInfo_sequence, hf_index, ett_crmf_SinglePubInfo);
809
810   return offset;
811 }
812 static int dissect_pubInfos_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
813   return dissect_crmf_SinglePubInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubInfos_item);
814 }
815
816
817 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of[1] = {
818   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pubInfos_item },
819 };
820
821 static int
822 dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
823   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
824                                       SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo);
825
826   return offset;
827 }
828 static int dissect_pubInfos(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
829   return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubInfos);
830 }
831
832
833 static const ber_sequence_t PKIPublicationInfo_sequence[] = {
834   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_action },
835   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubInfos },
836   { 0, 0, 0, NULL }
837 };
838
839 int
840 dissect_crmf_PKIPublicationInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
841   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
842                                    PKIPublicationInfo_sequence, hf_index, ett_crmf_PKIPublicationInfo);
843
844   return offset;
845 }
846
847
848 static const ber_sequence_t EncryptedValue_sequence[] = {
849   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_intendedAlg_impl },
850   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_symmAlg_impl },
851   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_encSymmKey_impl },
852   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_keyAlg_impl },
853   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_valueHint_impl },
854   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encValue },
855   { 0, 0, 0, NULL }
856 };
857
858 int
859 dissect_crmf_EncryptedValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
860   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
861                                    EncryptedValue_sequence, hf_index, ett_crmf_EncryptedValue);
862
863   return offset;
864 }
865 static int dissect_encryptedValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
866   return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_encryptedValue);
867 }
868
869
870 const value_string crmf_EncryptedKey_vals[] = {
871   {   0, "encryptedValue" },
872   {   1, "envelopedData" },
873   { 0, NULL }
874 };
875
876 static const ber_choice_t EncryptedKey_choice[] = {
877   {   0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_encryptedValue },
878   {   1, BER_CLASS_CON, 0, 0, dissect_envelopedData_impl },
879   { 0, 0, 0, 0, NULL }
880 };
881
882 int
883 dissect_crmf_EncryptedKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
884   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
885                                  EncryptedKey_choice, hf_index, ett_crmf_EncryptedKey,
886                                  NULL);
887
888   return offset;
889 }
890 static int dissect_encryptedPrivKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
891   return dissect_crmf_EncryptedKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_encryptedPrivKey);
892 }
893
894
895
896 int
897 dissect_crmf_KeyGenParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
898   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
899                                        NULL);
900
901   return offset;
902 }
903 static int dissect_keyGenParameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
904   return dissect_crmf_KeyGenParameters(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyGenParameters);
905 }
906
907
908
909 static int
910 dissect_crmf_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
911   offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index);
912
913   return offset;
914 }
915 static int dissect_archiveRemGenPrivKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
916   return dissect_crmf_BOOLEAN(TRUE, tvb, offset, pinfo, tree, hf_crmf_archiveRemGenPrivKey);
917 }
918
919
920 const value_string crmf_PKIArchiveOptions_vals[] = {
921   {   0, "encryptedPrivKey" },
922   {   1, "keyGenParameters" },
923   {   2, "archiveRemGenPrivKey" },
924   { 0, NULL }
925 };
926
927 static const ber_choice_t PKIArchiveOptions_choice[] = {
928   {   0, BER_CLASS_CON, 0, 0, dissect_encryptedPrivKey_impl },
929   {   1, BER_CLASS_CON, 1, 0, dissect_keyGenParameters_impl },
930   {   2, BER_CLASS_CON, 2, 0, dissect_archiveRemGenPrivKey_impl },
931   { 0, 0, 0, 0, NULL }
932 };
933
934 int
935 dissect_crmf_PKIArchiveOptions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
936   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
937                                  PKIArchiveOptions_choice, hf_index, ett_crmf_PKIArchiveOptions,
938                                  NULL);
939
940   return offset;
941 }
942
943
944 static const ber_sequence_t CertId_sequence[] = {
945   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer },
946   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber },
947   { 0, 0, 0, NULL }
948 };
949
950 int
951 dissect_crmf_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
952   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
953                                    CertId_sequence, hf_index, ett_crmf_CertId);
954
955   return offset;
956 }
957
958
959
960 int
961 dissect_crmf_OldCertId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
962   offset = dissect_crmf_CertId(implicit_tag, tvb, offset, pinfo, tree, hf_index);
963
964   return offset;
965 }
966
967
968
969 int
970 dissect_crmf_ProtocolEncrKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
971   offset = dissect_pkix1explicit_SubjectPublicKeyInfo(implicit_tag, tvb, offset, pinfo, tree, hf_index);
972
973   return offset;
974 }
975
976
977
978 int
979 dissect_crmf_UTF8Pairs(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
980   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
981                                             pinfo, tree, tvb, offset, hf_index,
982                                             NULL);
983
984   return offset;
985 }
986
987
988
989 int
990 dissect_crmf_CertReq(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
991   offset = dissect_crmf_CertRequest(implicit_tag, tvb, offset, pinfo, tree, hf_index);
992
993   return offset;
994 }
995
996 /*--- PDUs ---*/
997
998 static void dissect_PBMParameter_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
999   dissect_crmf_PBMParameter(FALSE, tvb, 0, pinfo, tree, hf_crmf_PBMParameter_PDU);
1000 }
1001
1002
1003 /*--- End of included file: packet-crmf-fn.c ---*/
1004
1005
1006
1007 /*--- proto_register_crmf ----------------------------------------------*/
1008 void proto_register_crmf(void) {
1009
1010   /* List of fields */
1011   static hf_register_info hf[] = {
1012     { &hf_crmf_type_oid,
1013       { "Type", "crmf.type.oid",
1014         FT_STRING, BASE_NONE, NULL, 0,
1015         "Type of AttributeTypeAndValue", HFILL }},
1016
1017 /*--- Included file: packet-crmf-hfarr.c ---*/
1018
1019     { &hf_crmf_PBMParameter_PDU,
1020       { "PBMParameter", "crmf.PBMParameter",
1021         FT_NONE, BASE_NONE, NULL, 0,
1022         "PBMParameter", HFILL }},
1023     { &hf_crmf_utcTime,
1024       { "utcTime", "crmf.utcTime",
1025         FT_STRING, BASE_NONE, NULL, 0,
1026         "Time/utcTime", HFILL }},
1027     { &hf_crmf_generalTime,
1028       { "generalTime", "crmf.generalTime",
1029         FT_STRING, BASE_NONE, NULL, 0,
1030         "Time/generalTime", HFILL }},
1031     { &hf_crmf_CertReqMessages_item,
1032       { "Item", "crmf.CertReqMessages_item",
1033         FT_NONE, BASE_NONE, NULL, 0,
1034         "CertReqMessages/_item", HFILL }},
1035     { &hf_crmf_certReq,
1036       { "certReq", "crmf.certReq",
1037         FT_NONE, BASE_NONE, NULL, 0,
1038         "CertReqMsg/certReq", HFILL }},
1039     { &hf_crmf_pop,
1040       { "pop", "crmf.pop",
1041         FT_UINT32, BASE_DEC, VALS(crmf_ProofOfPossession_vals), 0,
1042         "CertReqMsg/pop", HFILL }},
1043     { &hf_crmf_regInfo,
1044       { "regInfo", "crmf.regInfo",
1045         FT_UINT32, BASE_DEC, NULL, 0,
1046         "CertReqMsg/regInfo", HFILL }},
1047     { &hf_crmf_regInfo_item,
1048       { "Item", "crmf.regInfo_item",
1049         FT_NONE, BASE_NONE, NULL, 0,
1050         "CertReqMsg/regInfo/_item", HFILL }},
1051     { &hf_crmf_certReqId,
1052       { "certReqId", "crmf.certReqId",
1053         FT_INT32, BASE_DEC, NULL, 0,
1054         "CertRequest/certReqId", HFILL }},
1055     { &hf_crmf_certTemplate,
1056       { "certTemplate", "crmf.certTemplate",
1057         FT_NONE, BASE_NONE, NULL, 0,
1058         "CertRequest/certTemplate", HFILL }},
1059     { &hf_crmf_controls,
1060       { "controls", "crmf.controls",
1061         FT_UINT32, BASE_DEC, NULL, 0,
1062         "CertRequest/controls", HFILL }},
1063     { &hf_crmf_version,
1064       { "version", "crmf.version",
1065         FT_INT32, BASE_DEC, VALS(crmf_Version_vals), 0,
1066         "CertTemplate/version", HFILL }},
1067     { &hf_crmf_serialNumber,
1068       { "serialNumber", "crmf.serialNumber",
1069         FT_INT32, BASE_DEC, NULL, 0,
1070         "", HFILL }},
1071     { &hf_crmf_signingAlg,
1072       { "signingAlg", "crmf.signingAlg",
1073         FT_NONE, BASE_NONE, NULL, 0,
1074         "CertTemplate/signingAlg", HFILL }},
1075     { &hf_crmf_template_issuer,
1076       { "issuer", "crmf.issuer",
1077         FT_UINT32, BASE_DEC, NULL, 0,
1078         "CertTemplate/issuer", HFILL }},
1079     { &hf_crmf_validity,
1080       { "validity", "crmf.validity",
1081         FT_NONE, BASE_NONE, NULL, 0,
1082         "CertTemplate/validity", HFILL }},
1083     { &hf_crmf_subject,
1084       { "subject", "crmf.subject",
1085         FT_UINT32, BASE_DEC, NULL, 0,
1086         "CertTemplate/subject", HFILL }},
1087     { &hf_crmf_publicKey,
1088       { "publicKey", "crmf.publicKey",
1089         FT_NONE, BASE_NONE, NULL, 0,
1090         "", HFILL }},
1091     { &hf_crmf_issuerUID,
1092       { "issuerUID", "crmf.issuerUID",
1093         FT_BYTES, BASE_HEX, NULL, 0,
1094         "CertTemplate/issuerUID", HFILL }},
1095     { &hf_crmf_subjectUID,
1096       { "subjectUID", "crmf.subjectUID",
1097         FT_BYTES, BASE_HEX, NULL, 0,
1098         "CertTemplate/subjectUID", HFILL }},
1099     { &hf_crmf_extensions,
1100       { "extensions", "crmf.extensions",
1101         FT_UINT32, BASE_DEC, NULL, 0,
1102         "CertTemplate/extensions", HFILL }},
1103     { &hf_crmf_notBefore,
1104       { "notBefore", "crmf.notBefore",
1105         FT_UINT32, BASE_DEC, VALS(crmf_Time_vals), 0,
1106         "OptionalValidity/notBefore", HFILL }},
1107     { &hf_crmf_notAfter,
1108       { "notAfter", "crmf.notAfter",
1109         FT_UINT32, BASE_DEC, VALS(crmf_Time_vals), 0,
1110         "OptionalValidity/notAfter", HFILL }},
1111     { &hf_crmf_Controls_item,
1112       { "Item", "crmf.Controls_item",
1113         FT_NONE, BASE_NONE, NULL, 0,
1114         "Controls/_item", HFILL }},
1115     { &hf_crmf_type,
1116       { "type", "crmf.type",
1117         FT_STRING, BASE_NONE, NULL, 0,
1118         "AttributeTypeAndValue/type", HFILL }},
1119     { &hf_crmf_value,
1120       { "value", "crmf.value",
1121         FT_NONE, BASE_NONE, NULL, 0,
1122         "AttributeTypeAndValue/value", HFILL }},
1123     { &hf_crmf_raVerified,
1124       { "raVerified", "crmf.raVerified",
1125         FT_NONE, BASE_NONE, NULL, 0,
1126         "ProofOfPossession/raVerified", HFILL }},
1127     { &hf_crmf_signature,
1128       { "signature", "crmf.signature",
1129         FT_NONE, BASE_NONE, NULL, 0,
1130         "ProofOfPossession/signature", HFILL }},
1131     { &hf_crmf_keyEncipherment,
1132       { "keyEncipherment", "crmf.keyEncipherment",
1133         FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1134         "ProofOfPossession/keyEncipherment", HFILL }},
1135     { &hf_crmf_keyAgreement,
1136       { "keyAgreement", "crmf.keyAgreement",
1137         FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1138         "ProofOfPossession/keyAgreement", HFILL }},
1139     { &hf_crmf_poposkInput,
1140       { "poposkInput", "crmf.poposkInput",
1141         FT_NONE, BASE_NONE, NULL, 0,
1142         "POPOSigningKey/poposkInput", HFILL }},
1143     { &hf_crmf_algorithmIdentifier,
1144       { "algorithmIdentifier", "crmf.algorithmIdentifier",
1145         FT_NONE, BASE_NONE, NULL, 0,
1146         "POPOSigningKey/algorithmIdentifier", HFILL }},
1147     { &hf_crmf_sk_signature,
1148       { "signature", "crmf.signature",
1149         FT_BYTES, BASE_HEX, NULL, 0,
1150         "POPOSigningKey/signature", HFILL }},
1151     { &hf_crmf_authInfo,
1152       { "authInfo", "crmf.authInfo",
1153         FT_UINT32, BASE_DEC, VALS(crmf_T_authInfo_vals), 0,
1154         "POPOSigningKeyInput/authInfo", HFILL }},
1155     { &hf_crmf_sender,
1156       { "sender", "crmf.sender",
1157         FT_UINT32, BASE_DEC, NULL, 0,
1158         "POPOSigningKeyInput/authInfo/sender", HFILL }},
1159     { &hf_crmf_publicKeyMAC,
1160       { "publicKeyMAC", "crmf.publicKeyMAC",
1161         FT_NONE, BASE_NONE, NULL, 0,
1162         "POPOSigningKeyInput/authInfo/publicKeyMAC", HFILL }},
1163     { &hf_crmf_algId,
1164       { "algId", "crmf.algId",
1165         FT_NONE, BASE_NONE, NULL, 0,
1166         "PKMACValue/algId", HFILL }},
1167     { &hf_crmf_pkmac_value,
1168       { "value", "crmf.value",
1169         FT_BYTES, BASE_HEX, NULL, 0,
1170         "PKMACValue/value", HFILL }},
1171     { &hf_crmf_salt,
1172       { "salt", "crmf.salt",
1173         FT_BYTES, BASE_HEX, NULL, 0,
1174         "PBMParameter/salt", HFILL }},
1175     { &hf_crmf_owf,
1176       { "owf", "crmf.owf",
1177         FT_NONE, BASE_NONE, NULL, 0,
1178         "PBMParameter/owf", HFILL }},
1179     { &hf_crmf_iterationCount,
1180       { "iterationCount", "crmf.iterationCount",
1181         FT_INT32, BASE_DEC, NULL, 0,
1182         "PBMParameter/iterationCount", HFILL }},
1183     { &hf_crmf_mac,
1184       { "mac", "crmf.mac",
1185         FT_NONE, BASE_NONE, NULL, 0,
1186         "PBMParameter/mac", HFILL }},
1187     { &hf_crmf_thisMessage,
1188       { "thisMessage", "crmf.thisMessage",
1189         FT_BYTES, BASE_HEX, NULL, 0,
1190         "POPOPrivKey/thisMessage", HFILL }},
1191     { &hf_crmf_subsequentMessage,
1192       { "subsequentMessage", "crmf.subsequentMessage",
1193         FT_INT32, BASE_DEC, VALS(crmf_SubsequentMessage_vals), 0,
1194         "POPOPrivKey/subsequentMessage", HFILL }},
1195     { &hf_crmf_dhMAC,
1196       { "dhMAC", "crmf.dhMAC",
1197         FT_BYTES, BASE_HEX, NULL, 0,
1198         "POPOPrivKey/dhMAC", HFILL }},
1199     { &hf_crmf_action,
1200       { "action", "crmf.action",
1201         FT_INT32, BASE_DEC, VALS(crmf_T_action_vals), 0,
1202         "PKIPublicationInfo/action", HFILL }},
1203     { &hf_crmf_pubInfos,
1204       { "pubInfos", "crmf.pubInfos",
1205         FT_UINT32, BASE_DEC, NULL, 0,
1206         "PKIPublicationInfo/pubInfos", HFILL }},
1207     { &hf_crmf_pubInfos_item,
1208       { "Item", "crmf.pubInfos_item",
1209         FT_NONE, BASE_NONE, NULL, 0,
1210         "PKIPublicationInfo/pubInfos/_item", HFILL }},
1211     { &hf_crmf_pubMethod,
1212       { "pubMethod", "crmf.pubMethod",
1213         FT_INT32, BASE_DEC, VALS(crmf_T_pubMethod_vals), 0,
1214         "SinglePubInfo/pubMethod", HFILL }},
1215     { &hf_crmf_pubLocation,
1216       { "pubLocation", "crmf.pubLocation",
1217         FT_UINT32, BASE_DEC, NULL, 0,
1218         "SinglePubInfo/pubLocation", HFILL }},
1219     { &hf_crmf_encryptedPrivKey,
1220       { "encryptedPrivKey", "crmf.encryptedPrivKey",
1221         FT_UINT32, BASE_DEC, VALS(crmf_EncryptedKey_vals), 0,
1222         "PKIArchiveOptions/encryptedPrivKey", HFILL }},
1223     { &hf_crmf_keyGenParameters,
1224       { "keyGenParameters", "crmf.keyGenParameters",
1225         FT_BYTES, BASE_HEX, NULL, 0,
1226         "PKIArchiveOptions/keyGenParameters", HFILL }},
1227     { &hf_crmf_archiveRemGenPrivKey,
1228       { "archiveRemGenPrivKey", "crmf.archiveRemGenPrivKey",
1229         FT_BOOLEAN, 8, NULL, 0,
1230         "PKIArchiveOptions/archiveRemGenPrivKey", HFILL }},
1231     { &hf_crmf_encryptedValue,
1232       { "encryptedValue", "crmf.encryptedValue",
1233         FT_NONE, BASE_NONE, NULL, 0,
1234         "EncryptedKey/encryptedValue", HFILL }},
1235     { &hf_crmf_envelopedData,
1236       { "envelopedData", "crmf.envelopedData",
1237         FT_NONE, BASE_NONE, NULL, 0,
1238         "EncryptedKey/envelopedData", HFILL }},
1239     { &hf_crmf_intendedAlg,
1240       { "intendedAlg", "crmf.intendedAlg",
1241         FT_NONE, BASE_NONE, NULL, 0,
1242         "EncryptedValue/intendedAlg", HFILL }},
1243     { &hf_crmf_symmAlg,
1244       { "symmAlg", "crmf.symmAlg",
1245         FT_NONE, BASE_NONE, NULL, 0,
1246         "EncryptedValue/symmAlg", HFILL }},
1247     { &hf_crmf_encSymmKey,
1248       { "encSymmKey", "crmf.encSymmKey",
1249         FT_BYTES, BASE_HEX, NULL, 0,
1250         "EncryptedValue/encSymmKey", HFILL }},
1251     { &hf_crmf_keyAlg,
1252       { "keyAlg", "crmf.keyAlg",
1253         FT_NONE, BASE_NONE, NULL, 0,
1254         "EncryptedValue/keyAlg", HFILL }},
1255     { &hf_crmf_valueHint,
1256       { "valueHint", "crmf.valueHint",
1257         FT_BYTES, BASE_HEX, NULL, 0,
1258         "EncryptedValue/valueHint", HFILL }},
1259     { &hf_crmf_encValue,
1260       { "encValue", "crmf.encValue",
1261         FT_BYTES, BASE_HEX, NULL, 0,
1262         "EncryptedValue/encValue", HFILL }},
1263     { &hf_crmf_issuer,
1264       { "issuer", "crmf.issuer",
1265         FT_UINT32, BASE_DEC, NULL, 0,
1266         "CertId/issuer", HFILL }},
1267
1268 /*--- End of included file: packet-crmf-hfarr.c ---*/
1269
1270   };
1271
1272   /* List of subtrees */
1273   static gint *ett[] = {
1274
1275 /*--- Included file: packet-crmf-ettarr.c ---*/
1276
1277     &ett_crmf_Time,
1278     &ett_crmf_CertReqMessages,
1279     &ett_crmf_CertReqMsg,
1280     &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue,
1281     &ett_crmf_CertRequest,
1282     &ett_crmf_CertTemplate,
1283     &ett_crmf_OptionalValidity,
1284     &ett_crmf_Controls,
1285     &ett_crmf_AttributeTypeAndValue,
1286     &ett_crmf_ProofOfPossession,
1287     &ett_crmf_POPOSigningKey,
1288     &ett_crmf_POPOSigningKeyInput,
1289     &ett_crmf_T_authInfo,
1290     &ett_crmf_PKMACValue,
1291     &ett_crmf_PBMParameter,
1292     &ett_crmf_POPOPrivKey,
1293     &ett_crmf_PKIPublicationInfo,
1294     &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo,
1295     &ett_crmf_SinglePubInfo,
1296     &ett_crmf_PKIArchiveOptions,
1297     &ett_crmf_EncryptedKey,
1298     &ett_crmf_EncryptedValue,
1299     &ett_crmf_CertId,
1300
1301 /*--- End of included file: packet-crmf-ettarr.c ---*/
1302
1303   };
1304
1305   /* Register protocol */
1306   proto_crmf = proto_register_protocol(PNAME, PSNAME, PFNAME);
1307
1308   /* Register fields and subtrees */
1309   proto_register_field_array(proto_crmf, hf, array_length(hf));
1310   proto_register_subtree_array(ett, array_length(ett));
1311
1312 }
1313
1314
1315 /*--- proto_reg_handoff_crmf -------------------------------------------*/
1316 void proto_reg_handoff_crmf(void) {
1317
1318 /*--- Included file: packet-crmf-dis-tab.c ---*/
1319
1320   register_ber_oid_dissector("1.2.840.113533.7.66.13", dissect_PBMParameter_PDU, proto_crmf, "PasswordBasedMac");
1321
1322
1323 /*--- End of included file: packet-crmf-dis-tab.c ---*/
1324
1325 }
1326