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