few BER dissectors regenerated
[obnox/wireshark/wip.git] / epan / dissectors / packet-cmp.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* .\packet-cmp.c                                                             */
4 /* ../../tools/asn2wrs.py -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */
5
6 /* Input file: packet-cmp-template.c */
7
8 #line 1 "packet-cmp-template.c"
9 /* packet-cmp.c
10  * Routines for RFC2510 Certificate Management Protocol 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 <epan/asn1.h>
46 #include "packet-ber.h"
47 #include "packet-cmp.h"
48 #include "packet-crmf.h"
49 #include "packet-pkix1explicit.h"
50 #include "packet-pkix1implicit.h"
51 #include <epan/emem.h>
52 #include "packet-tcp.h"
53 #include <epan/prefs.h>
54 #include <epan/nstime.h>
55
56 #define PNAME  "Certificate Management Protocol"
57 #define PSNAME "CMP"
58 #define PFNAME "cmp"
59
60 #define TCP_PORT_CMP 829
61
62 /* desegmentation of CMP over TCP */
63 static gboolean cmp_desegment = TRUE;
64
65 /* Initialize the protocol and registered fields */
66 int proto_cmp = -1;
67 static int hf_cmp_type_oid = -1;
68 static int hf_cmp_rm = -1;
69 static int hf_cmp_type = -1;
70 static int hf_cmp_poll_ref = -1;
71 static int hf_cmp_next_poll_ref = -1;
72 static int hf_cmp_ttcb = -1;
73
74 /*--- Included file: packet-cmp-hf.c ---*/
75 #line 1 "packet-cmp-hf.c"
76 static int hf_cmp_header = -1;                    /* PKIHeader */
77 static int hf_cmp_body = -1;                      /* PKIBody */
78 static int hf_cmp_protection = -1;                /* PKIProtection */
79 static int hf_cmp_extraCerts = -1;                /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
80 static int hf_cmp_extraCerts_item = -1;           /* Certificate */
81 static int hf_cmp_pvno = -1;                      /* T_pvno */
82 static int hf_cmp_sender = -1;                    /* GeneralName */
83 static int hf_cmp_recipient = -1;                 /* GeneralName */
84 static int hf_cmp_messageTime = -1;               /* GeneralizedTime */
85 static int hf_cmp_protectionAlg = -1;             /* AlgorithmIdentifier */
86 static int hf_cmp_senderKID = -1;                 /* KeyIdentifier */
87 static int hf_cmp_recipKID = -1;                  /* KeyIdentifier */
88 static int hf_cmp_transactionID = -1;             /* OCTET_STRING */
89 static int hf_cmp_senderNonce = -1;               /* OCTET_STRING */
90 static int hf_cmp_recipNonce = -1;                /* OCTET_STRING */
91 static int hf_cmp_freeText = -1;                  /* PKIFreeText */
92 static int hf_cmp_generalInfo = -1;               /* SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue */
93 static int hf_cmp_generalInfo_item = -1;          /* InfoTypeAndValue */
94 static int hf_cmp_PKIFreeText_item = -1;          /* UTF8String */
95 static int hf_cmp_ir = -1;                        /* CertReqMessages */
96 static int hf_cmp_ip = -1;                        /* CertRepMessage */
97 static int hf_cmp_cr = -1;                        /* CertReqMessages */
98 static int hf_cmp_cp = -1;                        /* CertRepMessage */
99 static int hf_cmp_popdecc = -1;                   /* POPODecKeyChallContent */
100 static int hf_cmp_popdecr = -1;                   /* POPODecKeyRespContent */
101 static int hf_cmp_kur = -1;                       /* CertReqMessages */
102 static int hf_cmp_kup = -1;                       /* CertRepMessage */
103 static int hf_cmp_krr = -1;                       /* CertReqMessages */
104 static int hf_cmp_krp = -1;                       /* KeyRecRepContent */
105 static int hf_cmp_rr = -1;                        /* RevReqContent */
106 static int hf_cmp_rp = -1;                        /* RevRepContent */
107 static int hf_cmp_ccr = -1;                       /* CertReqMessages */
108 static int hf_cmp_ccp = -1;                       /* CertRepMessage */
109 static int hf_cmp_ckuann = -1;                    /* CAKeyUpdAnnContent */
110 static int hf_cmp_cann = -1;                      /* CertAnnContent */
111 static int hf_cmp_rann = -1;                      /* RevAnnContent */
112 static int hf_cmp_crlann = -1;                    /* CRLAnnContent */
113 static int hf_cmp_conf = -1;                      /* PKIConfirmContent */
114 static int hf_cmp_nested = -1;                    /* NestedMessageContent */
115 static int hf_cmp_genm = -1;                      /* GenMsgContent */
116 static int hf_cmp_genp = -1;                      /* GenRepContent */
117 static int hf_cmp_error = -1;                     /* ErrorMsgContent */
118 static int hf_cmp_salt = -1;                      /* OCTET_STRING */
119 static int hf_cmp_owf = -1;                       /* AlgorithmIdentifier */
120 static int hf_cmp_iterationCount = -1;            /* INTEGER */
121 static int hf_cmp_mac = -1;                       /* AlgorithmIdentifier */
122 static int hf_cmp_status = -1;                    /* PKIStatus */
123 static int hf_cmp_statusString = -1;              /* PKIFreeText */
124 static int hf_cmp_failInfo = -1;                  /* PKIFailureInfo */
125 static int hf_cmp_hashAlg = -1;                   /* AlgorithmIdentifier */
126 static int hf_cmp_certId = -1;                    /* CertId */
127 static int hf_cmp_hashVal = -1;                   /* BIT_STRING */
128 static int hf_cmp_POPODecKeyChallContent_item = -1;  /* Challenge */
129 static int hf_cmp_witness = -1;                   /* OCTET_STRING */
130 static int hf_cmp_challenge = -1;                 /* OCTET_STRING */
131 static int hf_cmp_POPODecKeyRespContent_item = -1;  /* INTEGER */
132 static int hf_cmp_caPubs = -1;                    /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
133 static int hf_cmp_caPubs_item = -1;               /* Certificate */
134 static int hf_cmp_response = -1;                  /* SEQUENCE_OF_CertResponse */
135 static int hf_cmp_response_item = -1;             /* CertResponse */
136 static int hf_cmp_certReqId = -1;                 /* INTEGER */
137 static int hf_cmp_status_01 = -1;                 /* PKIStatusInfo */
138 static int hf_cmp_certifiedKeyPair = -1;          /* CertifiedKeyPair */
139 static int hf_cmp_rspInfo = -1;                   /* OCTET_STRING */
140 static int hf_cmp_certOrEncCert = -1;             /* CertOrEncCert */
141 static int hf_cmp_privateKey = -1;                /* EncryptedValue */
142 static int hf_cmp_publicationInfo = -1;           /* PKIPublicationInfo */
143 static int hf_cmp_certificate = -1;               /* Certificate */
144 static int hf_cmp_encryptedCert = -1;             /* EncryptedValue */
145 static int hf_cmp_newSigCert = -1;                /* Certificate */
146 static int hf_cmp_caCerts = -1;                   /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
147 static int hf_cmp_caCerts_item = -1;              /* Certificate */
148 static int hf_cmp_keyPairHist = -1;               /* SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair */
149 static int hf_cmp_keyPairHist_item = -1;          /* CertifiedKeyPair */
150 static int hf_cmp_RevReqContent_item = -1;        /* RevDetails */
151 static int hf_cmp_certDetails = -1;               /* CertTemplate */
152 static int hf_cmp_revocationReason = -1;          /* ReasonFlags */
153 static int hf_cmp_badSinceDate = -1;              /* GeneralizedTime */
154 static int hf_cmp_crlEntryDetails = -1;           /* Extensions */
155 static int hf_cmp_status_02 = -1;                 /* SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo */
156 static int hf_cmp_status_item = -1;               /* PKIStatusInfo */
157 static int hf_cmp_revCerts = -1;                  /* SEQUENCE_SIZE_1_MAX_OF_CertId */
158 static int hf_cmp_revCerts_item = -1;             /* CertId */
159 static int hf_cmp_crls = -1;                      /* SEQUENCE_SIZE_1_MAX_OF_CertificateList */
160 static int hf_cmp_crls_item = -1;                 /* CertificateList */
161 static int hf_cmp_oldWithNew = -1;                /* Certificate */
162 static int hf_cmp_newWithOld = -1;                /* Certificate */
163 static int hf_cmp_newWithNew = -1;                /* Certificate */
164 static int hf_cmp_willBeRevokedAt = -1;           /* GeneralizedTime */
165 static int hf_cmp_crlDetails = -1;                /* Extensions */
166 static int hf_cmp_CRLAnnContent_item = -1;        /* CertificateList */
167 static int hf_cmp_infoType = -1;                  /* T_infoType */
168 static int hf_cmp_infoValue = -1;                 /* T_infoValue */
169 static int hf_cmp_GenMsgContent_item = -1;        /* InfoTypeAndValue */
170 static int hf_cmp_GenRepContent_item = -1;        /* InfoTypeAndValue */
171 static int hf_cmp_pKIStatusInfo = -1;             /* PKIStatusInfo */
172 static int hf_cmp_errorCode = -1;                 /* INTEGER */
173 static int hf_cmp_errorDetails = -1;              /* PKIFreeText */
174 /* named bits */
175 static int hf_cmp_PKIFailureInfo_badAlg = -1;
176 static int hf_cmp_PKIFailureInfo_badMessageCheck = -1;
177 static int hf_cmp_PKIFailureInfo_badRequest = -1;
178 static int hf_cmp_PKIFailureInfo_badTime = -1;
179 static int hf_cmp_PKIFailureInfo_badCertId = -1;
180 static int hf_cmp_PKIFailureInfo_badDataFormat = -1;
181 static int hf_cmp_PKIFailureInfo_wrongAuthority = -1;
182 static int hf_cmp_PKIFailureInfo_incorrectData = -1;
183 static int hf_cmp_PKIFailureInfo_missingTimeStamp = -1;
184 static int hf_cmp_PKIFailureInfo_badPOP = -1;
185
186 /*--- End of included file: packet-cmp-hf.c ---*/
187 #line 66 "packet-cmp-template.c"
188
189 /* Initialize the subtree pointers */
190 static gint ett_cmp = -1;
191
192 /*--- Included file: packet-cmp-ett.c ---*/
193 #line 1 "packet-cmp-ett.c"
194 static gint ett_cmp_PKIMessage = -1;
195 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate = -1;
196 static gint ett_cmp_PKIHeader = -1;
197 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue = -1;
198 static gint ett_cmp_PKIFreeText = -1;
199 static gint ett_cmp_PKIBody = -1;
200 static gint ett_cmp_ProtectedPart = -1;
201 static gint ett_cmp_PBMParameter = -1;
202 static gint ett_cmp_DHBMParameter = -1;
203 static gint ett_cmp_PKIFailureInfo = -1;
204 static gint ett_cmp_PKIStatusInfo = -1;
205 static gint ett_cmp_OOBCertHash = -1;
206 static gint ett_cmp_POPODecKeyChallContent = -1;
207 static gint ett_cmp_Challenge = -1;
208 static gint ett_cmp_POPODecKeyRespContent = -1;
209 static gint ett_cmp_CertRepMessage = -1;
210 static gint ett_cmp_SEQUENCE_OF_CertResponse = -1;
211 static gint ett_cmp_CertResponse = -1;
212 static gint ett_cmp_CertifiedKeyPair = -1;
213 static gint ett_cmp_CertOrEncCert = -1;
214 static gint ett_cmp_KeyRecRepContent = -1;
215 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair = -1;
216 static gint ett_cmp_RevReqContent = -1;
217 static gint ett_cmp_RevDetails = -1;
218 static gint ett_cmp_RevRepContent = -1;
219 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo = -1;
220 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId = -1;
221 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList = -1;
222 static gint ett_cmp_CAKeyUpdAnnContent = -1;
223 static gint ett_cmp_RevAnnContent = -1;
224 static gint ett_cmp_CRLAnnContent = -1;
225 static gint ett_cmp_InfoTypeAndValue = -1;
226 static gint ett_cmp_GenMsgContent = -1;
227 static gint ett_cmp_GenRepContent = -1;
228 static gint ett_cmp_ErrorMsgContent = -1;
229
230 /*--- End of included file: packet-cmp-ett.c ---*/
231 #line 70 "packet-cmp-template.c"
232
233 static const char *object_identifier_id;
234
235
236
237 /*--- Included file: packet-cmp-fn.c ---*/
238 #line 1 "packet-cmp-fn.c"
239 /*--- Cyclic dependencies ---*/
240
241 /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessage */
242 int dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
243
244
245
246 /*--- Fields for imported types ---*/
247
248 static int dissect_extraCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
249   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts_item);
250 }
251 static int dissect_sender(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
252   return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_sender);
253 }
254 static int dissect_recipient(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
255   return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_recipient);
256 }
257 static int dissect_protectionAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
258   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_protectionAlg);
259 }
260 static int dissect_ir(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
261   return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ir);
262 }
263 static int dissect_cr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
264   return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_cr);
265 }
266 static int dissect_kur(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
267   return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_kur);
268 }
269 static int dissect_krr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
270   return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_krr);
271 }
272 static int dissect_ccr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
273   return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ccr);
274 }
275 static int dissect_owf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
276   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_owf);
277 }
278 static int dissect_mac(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
279   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_mac);
280 }
281 static int dissect_hashAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
282   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_hashAlg);
283 }
284 static int dissect_certId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
285   return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_certId);
286 }
287 static int dissect_caPubs_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
288   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs_item);
289 }
290 static int dissect_privateKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
291   return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_privateKey);
292 }
293 static int dissect_publicationInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
294   return dissect_crmf_PKIPublicationInfo(FALSE, tvb, offset, actx, tree, hf_cmp_publicationInfo);
295 }
296 static int dissect_certificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
297   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_certificate);
298 }
299 static int dissect_encryptedCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
300   return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_encryptedCert);
301 }
302 static int dissect_newSigCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
303   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newSigCert);
304 }
305 static int dissect_caCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
306   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts_item);
307 }
308 static int dissect_certDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
309   return dissect_crmf_CertTemplate(FALSE, tvb, offset, actx, tree, hf_cmp_certDetails);
310 }
311 static int dissect_revocationReason(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
312   return dissect_pkix1implicit_ReasonFlags(FALSE, tvb, offset, actx, tree, hf_cmp_revocationReason);
313 }
314 static int dissect_crlEntryDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
315   return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlEntryDetails);
316 }
317 static int dissect_revCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
318   return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts_item);
319 }
320 static int dissect_crls_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
321   return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls_item);
322 }
323 static int dissect_oldWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
324   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_oldWithNew);
325 }
326 static int dissect_newWithOld(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
327   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithOld);
328 }
329 static int dissect_newWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
330   return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithNew);
331 }
332 static int dissect_crlDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
333   return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlDetails);
334 }
335 static int dissect_CRLAnnContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
336   return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_CRLAnnContent_item);
337 }
338
339
340
341 static int
342 dissect_cmp_KeyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
343   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
344                                        NULL);
345
346   return offset;
347 }
348 static int dissect_senderKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
349   return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_senderKID);
350 }
351 static int dissect_recipKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
352   return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_recipKID);
353 }
354
355
356 static const value_string cmp_T_pvno_vals[] = {
357   {   1, "ietf-version2" },
358   { 0, NULL }
359 };
360
361
362 static int
363 dissect_cmp_T_pvno(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
364   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
365                                   NULL);
366
367   return offset;
368 }
369 static int dissect_pvno(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
370   return dissect_cmp_T_pvno(FALSE, tvb, offset, actx, tree, hf_cmp_pvno);
371 }
372
373
374
375 static int
376 dissect_cmp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
377   offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
378
379   return offset;
380 }
381 static int dissect_messageTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
382   return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_messageTime);
383 }
384 static int dissect_badSinceDate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
385   return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_badSinceDate);
386 }
387 static int dissect_willBeRevokedAt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
388   return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_willBeRevokedAt);
389 }
390
391
392
393 static int
394 dissect_cmp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
395   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
396                                        NULL);
397
398   return offset;
399 }
400 static int dissect_transactionID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
401   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_transactionID);
402 }
403 static int dissect_senderNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
404   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_senderNonce);
405 }
406 static int dissect_recipNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
407   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_recipNonce);
408 }
409 static int dissect_salt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
410   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_salt);
411 }
412 static int dissect_witness(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
413   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_witness);
414 }
415 static int dissect_challenge(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
416   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_challenge);
417 }
418 static int dissect_rspInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
419   return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_rspInfo);
420 }
421
422
423
424 static int
425 dissect_cmp_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
426   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
427                                             actx, tree, tvb, offset, hf_index,
428                                             NULL);
429
430   return offset;
431 }
432 static int dissect_PKIFreeText_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
433   return dissect_cmp_UTF8String(FALSE, tvb, offset, actx, tree, hf_cmp_PKIFreeText_item);
434 }
435
436
437 static const ber_old_sequence_t PKIFreeText_sequence_of[1] = {
438   { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_PKIFreeText_item },
439 };
440
441 int
442 dissect_cmp_PKIFreeText(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
443   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
444                                           PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText);
445
446   return offset;
447 }
448 static int dissect_freeText(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
449   return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_freeText);
450 }
451 static int dissect_statusString(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
452   return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_statusString);
453 }
454 static int dissect_errorDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
455   return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_errorDetails);
456 }
457
458
459
460 static int
461 dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
462   offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, &object_identifier_id);
463
464   return offset;
465 }
466 static int dissect_infoType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
467   return dissect_cmp_T_infoType(FALSE, tvb, offset, actx, tree, hf_cmp_infoType);
468 }
469
470
471
472 static int
473 dissect_cmp_T_infoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
474 #line 66 "cmp.cnf"
475   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
476
477
478
479   return offset;
480 }
481 static int dissect_infoValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
482   return dissect_cmp_T_infoValue(FALSE, tvb, offset, actx, tree, hf_cmp_infoValue);
483 }
484
485
486 static const ber_old_sequence_t InfoTypeAndValue_sequence[] = {
487   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_infoType },
488   { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_infoValue },
489   { 0, 0, 0, NULL }
490 };
491
492 int
493 dissect_cmp_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
494   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
495                                        InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue);
496
497   return offset;
498 }
499 static int dissect_generalInfo_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
500   return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo_item);
501 }
502 static int dissect_GenMsgContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
503   return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenMsgContent_item);
504 }
505 static int dissect_GenRepContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
506   return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenRepContent_item);
507 }
508
509
510 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = {
511   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_generalInfo_item },
512 };
513
514 static int
515 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
516   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
517                                           SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue);
518
519   return offset;
520 }
521 static int dissect_generalInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
522   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo);
523 }
524
525
526 static const ber_old_sequence_t PKIHeader_sequence[] = {
527   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pvno },
528   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_sender },
529   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_recipient },
530   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_messageTime },
531   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_protectionAlg },
532   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_senderKID },
533   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_recipKID },
534   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_transactionID },
535   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_senderNonce },
536   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_recipNonce },
537   { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_freeText },
538   { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_generalInfo },
539   { 0, 0, 0, NULL }
540 };
541
542 int
543 dissect_cmp_PKIHeader(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
544   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
545                                        PKIHeader_sequence, hf_index, ett_cmp_PKIHeader);
546
547   return offset;
548 }
549 static int dissect_header(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
550   return dissect_cmp_PKIHeader(FALSE, tvb, offset, actx, tree, hf_cmp_header);
551 }
552
553
554 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of[1] = {
555   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_extraCerts_item },
556 };
557
558 static int
559 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
560   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
561                                           SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate);
562
563   return offset;
564 }
565 static int dissect_extraCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
566   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts);
567 }
568 static int dissect_caPubs(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
569   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs);
570 }
571 static int dissect_caCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
572   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts);
573 }
574
575
576
577 static int
578 dissect_cmp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
579   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
580                                   NULL);
581
582   return offset;
583 }
584 static int dissect_iterationCount(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
585   return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_iterationCount);
586 }
587 static int dissect_POPODecKeyRespContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
588   return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyRespContent_item);
589 }
590 static int dissect_certReqId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
591   return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_certReqId);
592 }
593 static int dissect_errorCode(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
594   return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_errorCode);
595 }
596
597
598 const value_string cmp_PKIStatus_vals[] = {
599   {   0, "granted" },
600   {   1, "grantedWithMods" },
601   {   2, "rejection" },
602   {   3, "waiting" },
603   {   4, "revocationWarning" },
604   {   5, "revocationNotification" },
605   {   6, "keyUpdateWarning" },
606   { 0, NULL }
607 };
608
609
610 int
611 dissect_cmp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
612   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
613                                   NULL);
614
615   return offset;
616 }
617 static int dissect_status(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
618   return dissect_cmp_PKIStatus(FALSE, tvb, offset, actx, tree, hf_cmp_status);
619 }
620
621
622 static const asn_namedbit PKIFailureInfo_bits[] = {
623   {  0, &hf_cmp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
624   {  1, &hf_cmp_PKIFailureInfo_badMessageCheck, -1, -1, "badMessageCheck", NULL },
625   {  2, &hf_cmp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
626   {  3, &hf_cmp_PKIFailureInfo_badTime, -1, -1, "badTime", NULL },
627   {  4, &hf_cmp_PKIFailureInfo_badCertId, -1, -1, "badCertId", NULL },
628   {  5, &hf_cmp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
629   {  6, &hf_cmp_PKIFailureInfo_wrongAuthority, -1, -1, "wrongAuthority", NULL },
630   {  7, &hf_cmp_PKIFailureInfo_incorrectData, -1, -1, "incorrectData", NULL },
631   {  8, &hf_cmp_PKIFailureInfo_missingTimeStamp, -1, -1, "missingTimeStamp", NULL },
632   {  9, &hf_cmp_PKIFailureInfo_badPOP, -1, -1, "badPOP", NULL },
633   { 0, NULL, 0, 0, NULL, NULL }
634 };
635
636 int
637 dissect_cmp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
638   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
639                                     PKIFailureInfo_bits, hf_index, ett_cmp_PKIFailureInfo,
640                                     NULL);
641
642   return offset;
643 }
644 static int dissect_failInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
645   return dissect_cmp_PKIFailureInfo(FALSE, tvb, offset, actx, tree, hf_cmp_failInfo);
646 }
647
648
649 static const ber_old_sequence_t PKIStatusInfo_sequence[] = {
650   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
651   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statusString },
652   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_failInfo },
653   { 0, 0, 0, NULL }
654 };
655
656 int
657 dissect_cmp_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
658   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
659                                        PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo);
660
661   return offset;
662 }
663 static int dissect_status_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
664   return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_01);
665 }
666 static int dissect_status_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
667   return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_item);
668 }
669 static int dissect_pKIStatusInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
670   return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_pKIStatusInfo);
671 }
672
673
674 const value_string cmp_CertOrEncCert_vals[] = {
675   {   0, "certificate" },
676   {   1, "encryptedCert" },
677   { 0, NULL }
678 };
679
680 static const ber_old_choice_t CertOrEncCert_choice[] = {
681   {   0, BER_CLASS_CON, 0, 0, dissect_certificate },
682   {   1, BER_CLASS_CON, 1, 0, dissect_encryptedCert },
683   { 0, 0, 0, 0, NULL }
684 };
685
686 int
687 dissect_cmp_CertOrEncCert(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
688   offset = dissect_ber_old_choice(actx, tree, tvb, offset,
689                                      CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert,
690                                      NULL);
691
692   return offset;
693 }
694 static int dissect_certOrEncCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
695   return dissect_cmp_CertOrEncCert(FALSE, tvb, offset, actx, tree, hf_cmp_certOrEncCert);
696 }
697
698
699 static const ber_old_sequence_t CertifiedKeyPair_sequence[] = {
700   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_certOrEncCert },
701   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_privateKey },
702   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_publicationInfo },
703   { 0, 0, 0, NULL }
704 };
705
706 int
707 dissect_cmp_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
708   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
709                                        CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair);
710
711   return offset;
712 }
713 static int dissect_certifiedKeyPair(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
714   return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_certifiedKeyPair);
715 }
716 static int dissect_keyPairHist_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
717   return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist_item);
718 }
719
720
721 static const ber_old_sequence_t CertResponse_sequence[] = {
722   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId },
723   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_01 },
724   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certifiedKeyPair },
725   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_rspInfo },
726   { 0, 0, 0, NULL }
727 };
728
729 int
730 dissect_cmp_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
731   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
732                                        CertResponse_sequence, hf_index, ett_cmp_CertResponse);
733
734   return offset;
735 }
736 static int dissect_response_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
737   return dissect_cmp_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response_item);
738 }
739
740
741 static const ber_old_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = {
742   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response_item },
743 };
744
745 static int
746 dissect_cmp_SEQUENCE_OF_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
747   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
748                                           SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse);
749
750   return offset;
751 }
752 static int dissect_response(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
753   return dissect_cmp_SEQUENCE_OF_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response);
754 }
755
756
757 static const ber_old_sequence_t CertRepMessage_sequence[] = {
758   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caPubs },
759   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response },
760   { 0, 0, 0, NULL }
761 };
762
763 int
764 dissect_cmp_CertRepMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
765   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
766                                        CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage);
767
768   return offset;
769 }
770 static int dissect_ip(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
771   return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ip);
772 }
773 static int dissect_cp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
774   return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_cp);
775 }
776 static int dissect_kup(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
777   return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_kup);
778 }
779 static int dissect_ccp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
780   return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ccp);
781 }
782
783
784 static const ber_old_sequence_t Challenge_sequence[] = {
785   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_owf },
786   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_witness },
787   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_challenge },
788   { 0, 0, 0, NULL }
789 };
790
791 int
792 dissect_cmp_Challenge(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
793   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
794                                        Challenge_sequence, hf_index, ett_cmp_Challenge);
795
796   return offset;
797 }
798 static int dissect_POPODecKeyChallContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
799   return dissect_cmp_Challenge(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyChallContent_item);
800 }
801
802
803 static const ber_old_sequence_t POPODecKeyChallContent_sequence_of[1] = {
804   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyChallContent_item },
805 };
806
807 int
808 dissect_cmp_POPODecKeyChallContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
809   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
810                                           POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent);
811
812   return offset;
813 }
814 static int dissect_popdecc(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
815   return dissect_cmp_POPODecKeyChallContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecc);
816 }
817
818
819 static const ber_old_sequence_t POPODecKeyRespContent_sequence_of[1] = {
820   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyRespContent_item },
821 };
822
823 int
824 dissect_cmp_POPODecKeyRespContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
825   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
826                                           POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent);
827
828   return offset;
829 }
830 static int dissect_popdecr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
831   return dissect_cmp_POPODecKeyRespContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecr);
832 }
833
834
835 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = {
836   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_keyPairHist_item },
837 };
838
839 static int
840 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
841   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
842                                           SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair);
843
844   return offset;
845 }
846 static int dissect_keyPairHist(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
847   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist);
848 }
849
850
851 static const ber_old_sequence_t KeyRecRepContent_sequence[] = {
852   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_01 },
853   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_newSigCert },
854   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caCerts },
855   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_keyPairHist },
856   { 0, 0, 0, NULL }
857 };
858
859 int
860 dissect_cmp_KeyRecRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
861   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
862                                        KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent);
863
864   return offset;
865 }
866 static int dissect_krp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
867   return dissect_cmp_KeyRecRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_krp);
868 }
869
870
871 static const ber_old_sequence_t RevDetails_sequence[] = {
872   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certDetails },
873   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_revocationReason },
874   { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
875   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlEntryDetails },
876   { 0, 0, 0, NULL }
877 };
878
879 int
880 dissect_cmp_RevDetails(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
881   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
882                                        RevDetails_sequence, hf_index, ett_cmp_RevDetails);
883
884   return offset;
885 }
886 static int dissect_RevReqContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
887   return dissect_cmp_RevDetails(FALSE, tvb, offset, actx, tree, hf_cmp_RevReqContent_item);
888 }
889
890
891 static const ber_old_sequence_t RevReqContent_sequence_of[1] = {
892   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RevReqContent_item },
893 };
894
895 int
896 dissect_cmp_RevReqContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
897   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
898                                           RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent);
899
900   return offset;
901 }
902 static int dissect_rr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
903   return dissect_cmp_RevReqContent(FALSE, tvb, offset, actx, tree, hf_cmp_rr);
904 }
905
906
907 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = {
908   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_item },
909 };
910
911 static int
912 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
913   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
914                                           SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo);
915
916   return offset;
917 }
918 static int dissect_status_02(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
919   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_02);
920 }
921
922
923 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = {
924   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_revCerts_item },
925 };
926
927 static int
928 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
929   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
930                                           SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId);
931
932   return offset;
933 }
934 static int dissect_revCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
935   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts);
936 }
937
938
939 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = {
940   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crls_item },
941 };
942
943 static int
944 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
945   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
946                                           SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList);
947
948   return offset;
949 }
950 static int dissect_crls(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
951   return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls);
952 }
953
954
955 static const ber_old_sequence_t RevRepContent_sequence[] = {
956   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_02 },
957   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_revCerts },
958   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crls },
959   { 0, 0, 0, NULL }
960 };
961
962 int
963 dissect_cmp_RevRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
964   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
965                                        RevRepContent_sequence, hf_index, ett_cmp_RevRepContent);
966
967   return offset;
968 }
969 static int dissect_rp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
970   return dissect_cmp_RevRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_rp);
971 }
972
973
974 static const ber_old_sequence_t CAKeyUpdAnnContent_sequence[] = {
975   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_oldWithNew },
976   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithOld },
977   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithNew },
978   { 0, 0, 0, NULL }
979 };
980
981 int
982 dissect_cmp_CAKeyUpdAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
983   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
984                                        CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent);
985
986   return offset;
987 }
988 static int dissect_ckuann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
989   return dissect_cmp_CAKeyUpdAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_ckuann);
990 }
991
992
993
994 int
995 dissect_cmp_CertAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
996   offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, actx, tree, hf_index);
997
998   return offset;
999 }
1000 static int dissect_cann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1001   return dissect_cmp_CertAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_cann);
1002 }
1003
1004
1005 static const ber_old_sequence_t RevAnnContent_sequence[] = {
1006   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
1007   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certId },
1008   { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_willBeRevokedAt },
1009   { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
1010   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlDetails },
1011   { 0, 0, 0, NULL }
1012 };
1013
1014 int
1015 dissect_cmp_RevAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1016   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1017                                        RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent);
1018
1019   return offset;
1020 }
1021 static int dissect_rann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1022   return dissect_cmp_RevAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_rann);
1023 }
1024
1025
1026 static const ber_old_sequence_t CRLAnnContent_sequence_of[1] = {
1027   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CRLAnnContent_item },
1028 };
1029
1030 int
1031 dissect_cmp_CRLAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1032   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1033                                           CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent);
1034
1035   return offset;
1036 }
1037 static int dissect_crlann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1038   return dissect_cmp_CRLAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_crlann);
1039 }
1040
1041
1042
1043 int
1044 dissect_cmp_PKIConfirmContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1045   offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
1046
1047   return offset;
1048 }
1049 static int dissect_conf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1050   return dissect_cmp_PKIConfirmContent(FALSE, tvb, offset, actx, tree, hf_cmp_conf);
1051 }
1052
1053
1054
1055 int
1056 dissect_cmp_NestedMessageContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1057   offset = dissect_cmp_PKIMessage(implicit_tag, tvb, offset, actx, tree, hf_index);
1058
1059   return offset;
1060 }
1061 static int dissect_nested(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1062   return dissect_cmp_NestedMessageContent(FALSE, tvb, offset, actx, tree, hf_cmp_nested);
1063 }
1064
1065
1066 static const ber_old_sequence_t GenMsgContent_sequence_of[1] = {
1067   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenMsgContent_item },
1068 };
1069
1070 int
1071 dissect_cmp_GenMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1072   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1073                                           GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent);
1074
1075   return offset;
1076 }
1077 static int dissect_genm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1078   return dissect_cmp_GenMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_genm);
1079 }
1080
1081
1082 static const ber_old_sequence_t GenRepContent_sequence_of[1] = {
1083   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenRepContent_item },
1084 };
1085
1086 int
1087 dissect_cmp_GenRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1088   offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1089                                           GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent);
1090
1091   return offset;
1092 }
1093 static int dissect_genp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1094   return dissect_cmp_GenRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_genp);
1095 }
1096
1097
1098 static const ber_old_sequence_t ErrorMsgContent_sequence[] = {
1099   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pKIStatusInfo },
1100   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorCode },
1101   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorDetails },
1102   { 0, 0, 0, NULL }
1103 };
1104
1105 int
1106 dissect_cmp_ErrorMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1107   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1108                                        ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent);
1109
1110   return offset;
1111 }
1112 static int dissect_error(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1113   return dissect_cmp_ErrorMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_error);
1114 }
1115
1116
1117 const value_string cmp_PKIBody_vals[] = {
1118   {   0, "ir" },
1119   {   1, "ip" },
1120   {   2, "cr" },
1121   {   3, "cp" },
1122   {   5, "popdecc" },
1123   {   6, "popdecr" },
1124   {   7, "kur" },
1125   {   8, "kup" },
1126   {   9, "krr" },
1127   {  10, "krp" },
1128   {  11, "rr" },
1129   {  12, "rp" },
1130   {  13, "ccr" },
1131   {  14, "ccp" },
1132   {  15, "ckuann" },
1133   {  16, "cann" },
1134   {  17, "rann" },
1135   {  18, "crlann" },
1136   {  19, "conf" },
1137   {  20, "nested" },
1138   {  21, "genm" },
1139   {  22, "genp" },
1140   {  23, "error" },
1141   { 0, NULL }
1142 };
1143
1144 static const ber_old_choice_t PKIBody_choice[] = {
1145   {   0, BER_CLASS_CON, 0, 0, dissect_ir },
1146   {   1, BER_CLASS_CON, 1, 0, dissect_ip },
1147   {   2, BER_CLASS_CON, 2, 0, dissect_cr },
1148   {   3, BER_CLASS_CON, 3, 0, dissect_cp },
1149   {   5, BER_CLASS_CON, 5, 0, dissect_popdecc },
1150   {   6, BER_CLASS_CON, 6, 0, dissect_popdecr },
1151   {   7, BER_CLASS_CON, 7, 0, dissect_kur },
1152   {   8, BER_CLASS_CON, 8, 0, dissect_kup },
1153   {   9, BER_CLASS_CON, 9, 0, dissect_krr },
1154   {  10, BER_CLASS_CON, 10, 0, dissect_krp },
1155   {  11, BER_CLASS_CON, 11, 0, dissect_rr },
1156   {  12, BER_CLASS_CON, 12, 0, dissect_rp },
1157   {  13, BER_CLASS_CON, 13, 0, dissect_ccr },
1158   {  14, BER_CLASS_CON, 14, 0, dissect_ccp },
1159   {  15, BER_CLASS_CON, 15, 0, dissect_ckuann },
1160   {  16, BER_CLASS_CON, 16, 0, dissect_cann },
1161   {  17, BER_CLASS_CON, 17, 0, dissect_rann },
1162   {  18, BER_CLASS_CON, 18, 0, dissect_crlann },
1163   {  19, BER_CLASS_CON, 19, 0, dissect_conf },
1164   {  20, BER_CLASS_CON, 20, 0, dissect_nested },
1165   {  21, BER_CLASS_CON, 21, 0, dissect_genm },
1166   {  22, BER_CLASS_CON, 22, 0, dissect_genp },
1167   {  23, BER_CLASS_CON, 23, 0, dissect_error },
1168   { 0, 0, 0, 0, NULL }
1169 };
1170
1171 int
1172 dissect_cmp_PKIBody(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1173   offset = dissect_ber_old_choice(actx, tree, tvb, offset,
1174                                      PKIBody_choice, hf_index, ett_cmp_PKIBody,
1175                                      NULL);
1176
1177   return offset;
1178 }
1179 static int dissect_body(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1180   return dissect_cmp_PKIBody(FALSE, tvb, offset, actx, tree, hf_cmp_body);
1181 }
1182
1183
1184
1185 int
1186 dissect_cmp_PKIProtection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1187   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1188                                     NULL, hf_index, -1,
1189                                     NULL);
1190
1191   return offset;
1192 }
1193 static int dissect_protection(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1194   return dissect_cmp_PKIProtection(FALSE, tvb, offset, actx, tree, hf_cmp_protection);
1195 }
1196
1197
1198 static const ber_old_sequence_t PKIMessage_sequence[] = {
1199   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1200   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1201   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_protection },
1202   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_extraCerts },
1203   { 0, 0, 0, NULL }
1204 };
1205
1206 int
1207 dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1208   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1209                                        PKIMessage_sequence, hf_index, ett_cmp_PKIMessage);
1210
1211   return offset;
1212 }
1213
1214
1215 static const ber_old_sequence_t ProtectedPart_sequence[] = {
1216   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1217   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1218   { 0, 0, 0, NULL }
1219 };
1220
1221 int
1222 dissect_cmp_ProtectedPart(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1223   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1224                                        ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart);
1225
1226   return offset;
1227 }
1228
1229
1230
1231 int
1232 dissect_cmp_PasswordBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1233   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1234
1235   return offset;
1236 }
1237
1238
1239 static const ber_old_sequence_t PBMParameter_sequence[] = {
1240   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt },
1241   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1242   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount },
1243   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1244   { 0, 0, 0, NULL }
1245 };
1246
1247 int
1248 dissect_cmp_PBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1249   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1250                                        PBMParameter_sequence, hf_index, ett_cmp_PBMParameter);
1251
1252   return offset;
1253 }
1254
1255
1256
1257 int
1258 dissect_cmp_DHBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1259   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1260
1261   return offset;
1262 }
1263
1264
1265 static const ber_old_sequence_t DHBMParameter_sequence[] = {
1266   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1267   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1268   { 0, 0, 0, NULL }
1269 };
1270
1271 int
1272 dissect_cmp_DHBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1273   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1274                                        DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter);
1275
1276   return offset;
1277 }
1278
1279
1280
1281 int
1282 dissect_cmp_OOBCert(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1283   offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1284
1285   return offset;
1286 }
1287
1288
1289
1290 static int
1291 dissect_cmp_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1292   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1293                                     NULL, hf_index, -1,
1294                                     NULL);
1295
1296   return offset;
1297 }
1298 static int dissect_hashVal(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1299   return dissect_cmp_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_hashVal);
1300 }
1301
1302
1303 static const ber_old_sequence_t OOBCertHash_sequence[] = {
1304   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_hashAlg },
1305   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_certId },
1306   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_hashVal },
1307   { 0, 0, 0, NULL }
1308 };
1309
1310 int
1311 dissect_cmp_OOBCertHash(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1312   offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1313                                        OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash);
1314
1315   return offset;
1316 }
1317
1318
1319 /*--- End of included file: packet-cmp-fn.c ---*/
1320 #line 75 "packet-cmp-template.c"
1321
1322 static int
1323 dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx)
1324 {
1325         return dissect_cmp_PKIMessage(FALSE, tvb, 0, actx,tree, -1);
1326 }
1327
1328 #define CMP_TYPE_PKIMSG         0
1329 #define CMP_TYPE_POLLREP        1
1330 #define CMP_TYPE_POLLREQ        2
1331 #define CMP_TYPE_NEGPOLLREP     3
1332 #define CMP_TYPE_PARTIALMSGREP  4
1333 #define CMP_TYPE_FINALMSGREP    5
1334 #define CMP_TYPE_ERRORMSGREP    6
1335 static const value_string cmp_pdu_types[] = {
1336         { CMP_TYPE_PKIMSG,              "pkiMsg" },
1337         { CMP_TYPE_POLLREP,             "pollRep" },
1338         { CMP_TYPE_POLLREQ,             "pollReq" },
1339         { CMP_TYPE_NEGPOLLREP,          "negPollRep" },
1340         { CMP_TYPE_PARTIALMSGREP,       "partialMsgRep" },
1341         { CMP_TYPE_FINALMSGREP,         "finalMsgRep" },
1342         { CMP_TYPE_ERRORMSGREP,         "errorMsgRep" },
1343         { 0, NULL },
1344 };
1345
1346 static void dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1347 {
1348         tvbuff_t   *next_tvb;
1349         guint32 pdu_len;
1350         guint8 pdu_type;
1351         nstime_t        ts;
1352         proto_item *item=NULL;
1353         proto_tree *tree=NULL;
1354         asn1_ctx_t asn1_ctx;
1355
1356         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1357
1358         if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
1359                 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1360
1361         if (check_col(pinfo->cinfo, COL_INFO)) {
1362                 col_clear(pinfo->cinfo, COL_INFO);
1363                 
1364                 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1365         }
1366
1367
1368         if(parent_tree){
1369                 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1370                 tree = proto_item_add_subtree(item, ett_cmp);
1371         }
1372
1373         pdu_len=tvb_get_ntohl(tvb, 0);
1374         pdu_type=tvb_get_guint8(tvb, 4);
1375
1376         proto_tree_add_uint(tree, hf_cmp_rm, tvb, 0, 4, pdu_len);
1377         proto_tree_add_uint(tree, hf_cmp_type, tvb, 4, 1, pdu_type);
1378
1379         if (check_col (pinfo->cinfo, COL_INFO)) {
1380             col_set_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x"));
1381         }
1382
1383         switch(pdu_type){
1384         case CMP_TYPE_PKIMSG:
1385                 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1386                 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1387                 break;
1388         case CMP_TYPE_POLLREP:
1389                 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1390
1391                 ts.secs = tvb_get_ntohl(tvb, 4);
1392                 ts.nsecs = 0;
1393                 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1394                 break;
1395         case CMP_TYPE_POLLREQ:
1396                 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1397                 break;
1398         case CMP_TYPE_NEGPOLLREP:
1399                 break;
1400         case CMP_TYPE_PARTIALMSGREP:
1401                 proto_tree_add_item(tree, hf_cmp_next_poll_ref, tvb, 0, 4, FALSE);
1402
1403                 ts.secs = tvb_get_ntohl(tvb, 4);
1404                 ts.nsecs = 0;
1405                 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1406
1407                 next_tvb = tvb_new_subset(tvb, 13, tvb_length_remaining(tvb, 13), pdu_len);
1408                 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1409                 break;
1410         case CMP_TYPE_FINALMSGREP:
1411                 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1412                 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1413                 break;
1414         case CMP_TYPE_ERRORMSGREP:
1415                 /*XXX to be added*/
1416                 break;
1417         }
1418
1419 }
1420
1421 static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1422 {
1423   guint32 plen;
1424
1425   /*
1426    * Get the length of the CMP-over-TCP packet.
1427    */
1428   plen = tvb_get_ntohl(tvb, offset);
1429
1430   return plen+4;
1431 }
1432
1433 /* CMP over TCP    RFC2510 section 5.2 */
1434 static int
1435 dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1436 {
1437         guint32 pdu_len;
1438         guint8 pdu_type;
1439
1440         /* only attempt to dissect it as CMP over TCP if we have
1441          * at least 5 bytes.
1442          */
1443         if (!tvb_bytes_exist(tvb, 0, 5)) {
1444                 return 0;
1445         }
1446
1447         pdu_len=tvb_get_ntohl(tvb, 0);
1448         pdu_type=tvb_get_guint8(tvb, 4);
1449
1450         /* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes 
1451          * in size.
1452          * It is definitely at least 1 byte to accomodate the flags byte 
1453          */
1454         if((pdu_len<=0)||(pdu_len>10000)){
1455                 return 0;
1456         }
1457         /* type is between 0 and 6 */
1458         if(pdu_type>6){
1459                 return 0;
1460         }
1461         /* type 0 contains a PKI message and must therefore be >= 3 bytes 
1462          * long (flags + BER TAG + BER LENGTH
1463          */
1464         if((pdu_type==0)&&(pdu_len<3)){
1465                 return 0;
1466         }
1467
1468         tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, 4, get_cmp_pdu_len,
1469                 dissect_cmp_tcp_pdu);
1470
1471         return tvb_length(tvb);
1472 }
1473
1474 static int
1475 dissect_cmp_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1476 {
1477         proto_item *item=NULL;
1478         proto_tree *tree=NULL;
1479         asn1_ctx_t asn1_ctx;
1480
1481         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1482
1483         if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
1484                 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1485
1486         if (check_col(pinfo->cinfo, COL_INFO)) {
1487                 col_clear(pinfo->cinfo, COL_INFO);
1488                 
1489                 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1490         }
1491
1492
1493         if(parent_tree){
1494                 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1495                 tree = proto_item_add_subtree(item, ett_cmp);
1496         }
1497
1498         return dissect_cmp_pdu(tvb, tree, &asn1_ctx);
1499 }
1500
1501
1502 /*--- proto_register_cmp ----------------------------------------------*/
1503 void proto_register_cmp(void) {
1504
1505   /* List of fields */
1506   static hf_register_info hf[] = {
1507     { &hf_cmp_type_oid,
1508       { "InfoType", "cmp.type.oid",
1509         FT_STRING, BASE_NONE, NULL, 0,
1510         "Type of InfoTypeAndValue", HFILL }},
1511     { &hf_cmp_rm,
1512       { "Record Marker", "cmp.rm",
1513         FT_UINT32, BASE_DEC, NULL, 0,
1514         "Record Marker  length of PDU in bytes", HFILL }},
1515     { &hf_cmp_type,
1516       { "Type", "cmp.type",
1517         FT_UINT8, BASE_DEC, VALS(cmp_pdu_types), 0,
1518         "PDU Type", HFILL }},
1519     { &hf_cmp_poll_ref,
1520       { "Polling Reference", "cmp.poll_ref",
1521         FT_UINT32, BASE_HEX, NULL, 0,
1522         "", HFILL }},
1523     { &hf_cmp_next_poll_ref,
1524       { "Next Polling Reference", "cmp.next_poll_ref",
1525         FT_UINT32, BASE_HEX, NULL, 0,
1526         "", HFILL }},
1527     { &hf_cmp_ttcb,
1528       { "Time to check Back", "cmp.ttcb",
1529         FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0,
1530         "", HFILL }},
1531
1532 /*--- Included file: packet-cmp-hfarr.c ---*/
1533 #line 1 "packet-cmp-hfarr.c"
1534     { &hf_cmp_header,
1535       { "header", "cmp.header",
1536         FT_NONE, BASE_NONE, NULL, 0,
1537         "cmp.PKIHeader", HFILL }},
1538     { &hf_cmp_body,
1539       { "body", "cmp.body",
1540         FT_UINT32, BASE_DEC, VALS(cmp_PKIBody_vals), 0,
1541         "cmp.PKIBody", HFILL }},
1542     { &hf_cmp_protection,
1543       { "protection", "cmp.protection",
1544         FT_BYTES, BASE_HEX, NULL, 0,
1545         "cmp.PKIProtection", HFILL }},
1546     { &hf_cmp_extraCerts,
1547       { "extraCerts", "cmp.extraCerts",
1548         FT_UINT32, BASE_DEC, NULL, 0,
1549         "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1550     { &hf_cmp_extraCerts_item,
1551       { "Item", "cmp.extraCerts_item",
1552         FT_NONE, BASE_NONE, NULL, 0,
1553         "pkix1explicit.Certificate", HFILL }},
1554     { &hf_cmp_pvno,
1555       { "pvno", "cmp.pvno",
1556         FT_INT32, BASE_DEC, VALS(cmp_T_pvno_vals), 0,
1557         "cmp.T_pvno", HFILL }},
1558     { &hf_cmp_sender,
1559       { "sender", "cmp.sender",
1560         FT_UINT32, BASE_DEC, NULL, 0,
1561         "pkix1implicit.GeneralName", HFILL }},
1562     { &hf_cmp_recipient,
1563       { "recipient", "cmp.recipient",
1564         FT_UINT32, BASE_DEC, NULL, 0,
1565         "pkix1implicit.GeneralName", HFILL }},
1566     { &hf_cmp_messageTime,
1567       { "messageTime", "cmp.messageTime",
1568         FT_STRING, BASE_NONE, NULL, 0,
1569         "cmp.GeneralizedTime", HFILL }},
1570     { &hf_cmp_protectionAlg,
1571       { "protectionAlg", "cmp.protectionAlg",
1572         FT_NONE, BASE_NONE, NULL, 0,
1573         "pkix1explicit.AlgorithmIdentifier", HFILL }},
1574     { &hf_cmp_senderKID,
1575       { "senderKID", "cmp.senderKID",
1576         FT_BYTES, BASE_HEX, NULL, 0,
1577         "cmp.KeyIdentifier", HFILL }},
1578     { &hf_cmp_recipKID,
1579       { "recipKID", "cmp.recipKID",
1580         FT_BYTES, BASE_HEX, NULL, 0,
1581         "cmp.KeyIdentifier", HFILL }},
1582     { &hf_cmp_transactionID,
1583       { "transactionID", "cmp.transactionID",
1584         FT_BYTES, BASE_HEX, NULL, 0,
1585         "cmp.OCTET_STRING", HFILL }},
1586     { &hf_cmp_senderNonce,
1587       { "senderNonce", "cmp.senderNonce",
1588         FT_BYTES, BASE_HEX, NULL, 0,
1589         "cmp.OCTET_STRING", HFILL }},
1590     { &hf_cmp_recipNonce,
1591       { "recipNonce", "cmp.recipNonce",
1592         FT_BYTES, BASE_HEX, NULL, 0,
1593         "cmp.OCTET_STRING", HFILL }},
1594     { &hf_cmp_freeText,
1595       { "freeText", "cmp.freeText",
1596         FT_UINT32, BASE_DEC, NULL, 0,
1597         "cmp.PKIFreeText", HFILL }},
1598     { &hf_cmp_generalInfo,
1599       { "generalInfo", "cmp.generalInfo",
1600         FT_UINT32, BASE_DEC, NULL, 0,
1601         "cmp.SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue", HFILL }},
1602     { &hf_cmp_generalInfo_item,
1603       { "Item", "cmp.generalInfo_item",
1604         FT_NONE, BASE_NONE, NULL, 0,
1605         "cmp.InfoTypeAndValue", HFILL }},
1606     { &hf_cmp_PKIFreeText_item,
1607       { "Item", "cmp.PKIFreeText_item",
1608         FT_STRING, BASE_NONE, NULL, 0,
1609         "cmp.UTF8String", HFILL }},
1610     { &hf_cmp_ir,
1611       { "ir", "cmp.ir",
1612         FT_UINT32, BASE_DEC, NULL, 0,
1613         "crmf.CertReqMessages", HFILL }},
1614     { &hf_cmp_ip,
1615       { "ip", "cmp.ip",
1616         FT_NONE, BASE_NONE, NULL, 0,
1617         "cmp.CertRepMessage", HFILL }},
1618     { &hf_cmp_cr,
1619       { "cr", "cmp.cr",
1620         FT_UINT32, BASE_DEC, NULL, 0,
1621         "crmf.CertReqMessages", HFILL }},
1622     { &hf_cmp_cp,
1623       { "cp", "cmp.cp",
1624         FT_NONE, BASE_NONE, NULL, 0,
1625         "cmp.CertRepMessage", HFILL }},
1626     { &hf_cmp_popdecc,
1627       { "popdecc", "cmp.popdecc",
1628         FT_UINT32, BASE_DEC, NULL, 0,
1629         "cmp.POPODecKeyChallContent", HFILL }},
1630     { &hf_cmp_popdecr,
1631       { "popdecr", "cmp.popdecr",
1632         FT_UINT32, BASE_DEC, NULL, 0,
1633         "cmp.POPODecKeyRespContent", HFILL }},
1634     { &hf_cmp_kur,
1635       { "kur", "cmp.kur",
1636         FT_UINT32, BASE_DEC, NULL, 0,
1637         "crmf.CertReqMessages", HFILL }},
1638     { &hf_cmp_kup,
1639       { "kup", "cmp.kup",
1640         FT_NONE, BASE_NONE, NULL, 0,
1641         "cmp.CertRepMessage", HFILL }},
1642     { &hf_cmp_krr,
1643       { "krr", "cmp.krr",
1644         FT_UINT32, BASE_DEC, NULL, 0,
1645         "crmf.CertReqMessages", HFILL }},
1646     { &hf_cmp_krp,
1647       { "krp", "cmp.krp",
1648         FT_NONE, BASE_NONE, NULL, 0,
1649         "cmp.KeyRecRepContent", HFILL }},
1650     { &hf_cmp_rr,
1651       { "rr", "cmp.rr",
1652         FT_UINT32, BASE_DEC, NULL, 0,
1653         "cmp.RevReqContent", HFILL }},
1654     { &hf_cmp_rp,
1655       { "rp", "cmp.rp",
1656         FT_NONE, BASE_NONE, NULL, 0,
1657         "cmp.RevRepContent", HFILL }},
1658     { &hf_cmp_ccr,
1659       { "ccr", "cmp.ccr",
1660         FT_UINT32, BASE_DEC, NULL, 0,
1661         "crmf.CertReqMessages", HFILL }},
1662     { &hf_cmp_ccp,
1663       { "ccp", "cmp.ccp",
1664         FT_NONE, BASE_NONE, NULL, 0,
1665         "cmp.CertRepMessage", HFILL }},
1666     { &hf_cmp_ckuann,
1667       { "ckuann", "cmp.ckuann",
1668         FT_NONE, BASE_NONE, NULL, 0,
1669         "cmp.CAKeyUpdAnnContent", HFILL }},
1670     { &hf_cmp_cann,
1671       { "cann", "cmp.cann",
1672         FT_NONE, BASE_NONE, NULL, 0,
1673         "cmp.CertAnnContent", HFILL }},
1674     { &hf_cmp_rann,
1675       { "rann", "cmp.rann",
1676         FT_NONE, BASE_NONE, NULL, 0,
1677         "cmp.RevAnnContent", HFILL }},
1678     { &hf_cmp_crlann,
1679       { "crlann", "cmp.crlann",
1680         FT_UINT32, BASE_DEC, NULL, 0,
1681         "cmp.CRLAnnContent", HFILL }},
1682     { &hf_cmp_conf,
1683       { "conf", "cmp.conf",
1684         FT_NONE, BASE_NONE, NULL, 0,
1685         "cmp.PKIConfirmContent", HFILL }},
1686     { &hf_cmp_nested,
1687       { "nested", "cmp.nested",
1688         FT_NONE, BASE_NONE, NULL, 0,
1689         "cmp.NestedMessageContent", HFILL }},
1690     { &hf_cmp_genm,
1691       { "genm", "cmp.genm",
1692         FT_UINT32, BASE_DEC, NULL, 0,
1693         "cmp.GenMsgContent", HFILL }},
1694     { &hf_cmp_genp,
1695       { "genp", "cmp.genp",
1696         FT_UINT32, BASE_DEC, NULL, 0,
1697         "cmp.GenRepContent", HFILL }},
1698     { &hf_cmp_error,
1699       { "error", "cmp.error",
1700         FT_NONE, BASE_NONE, NULL, 0,
1701         "cmp.ErrorMsgContent", HFILL }},
1702     { &hf_cmp_salt,
1703       { "salt", "cmp.salt",
1704         FT_BYTES, BASE_HEX, NULL, 0,
1705         "cmp.OCTET_STRING", HFILL }},
1706     { &hf_cmp_owf,
1707       { "owf", "cmp.owf",
1708         FT_NONE, BASE_NONE, NULL, 0,
1709         "pkix1explicit.AlgorithmIdentifier", HFILL }},
1710     { &hf_cmp_iterationCount,
1711       { "iterationCount", "cmp.iterationCount",
1712         FT_INT32, BASE_DEC, NULL, 0,
1713         "cmp.INTEGER", HFILL }},
1714     { &hf_cmp_mac,
1715       { "mac", "cmp.mac",
1716         FT_NONE, BASE_NONE, NULL, 0,
1717         "pkix1explicit.AlgorithmIdentifier", HFILL }},
1718     { &hf_cmp_status,
1719       { "status", "cmp.status",
1720         FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
1721         "cmp.PKIStatus", HFILL }},
1722     { &hf_cmp_statusString,
1723       { "statusString", "cmp.statusString",
1724         FT_UINT32, BASE_DEC, NULL, 0,
1725         "cmp.PKIFreeText", HFILL }},
1726     { &hf_cmp_failInfo,
1727       { "failInfo", "cmp.failInfo",
1728         FT_BYTES, BASE_HEX, NULL, 0,
1729         "cmp.PKIFailureInfo", HFILL }},
1730     { &hf_cmp_hashAlg,
1731       { "hashAlg", "cmp.hashAlg",
1732         FT_NONE, BASE_NONE, NULL, 0,
1733         "pkix1explicit.AlgorithmIdentifier", HFILL }},
1734     { &hf_cmp_certId,
1735       { "certId", "cmp.certId",
1736         FT_NONE, BASE_NONE, NULL, 0,
1737         "crmf.CertId", HFILL }},
1738     { &hf_cmp_hashVal,
1739       { "hashVal", "cmp.hashVal",
1740         FT_BYTES, BASE_HEX, NULL, 0,
1741         "cmp.BIT_STRING", HFILL }},
1742     { &hf_cmp_POPODecKeyChallContent_item,
1743       { "Item", "cmp.POPODecKeyChallContent_item",
1744         FT_NONE, BASE_NONE, NULL, 0,
1745         "cmp.Challenge", HFILL }},
1746     { &hf_cmp_witness,
1747       { "witness", "cmp.witness",
1748         FT_BYTES, BASE_HEX, NULL, 0,
1749         "cmp.OCTET_STRING", HFILL }},
1750     { &hf_cmp_challenge,
1751       { "challenge", "cmp.challenge",
1752         FT_BYTES, BASE_HEX, NULL, 0,
1753         "cmp.OCTET_STRING", HFILL }},
1754     { &hf_cmp_POPODecKeyRespContent_item,
1755       { "Item", "cmp.POPODecKeyRespContent_item",
1756         FT_INT32, BASE_DEC, NULL, 0,
1757         "cmp.INTEGER", HFILL }},
1758     { &hf_cmp_caPubs,
1759       { "caPubs", "cmp.caPubs",
1760         FT_UINT32, BASE_DEC, NULL, 0,
1761         "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1762     { &hf_cmp_caPubs_item,
1763       { "Item", "cmp.caPubs_item",
1764         FT_NONE, BASE_NONE, NULL, 0,
1765         "pkix1explicit.Certificate", HFILL }},
1766     { &hf_cmp_response,
1767       { "response", "cmp.response",
1768         FT_UINT32, BASE_DEC, NULL, 0,
1769         "cmp.SEQUENCE_OF_CertResponse", HFILL }},
1770     { &hf_cmp_response_item,
1771       { "Item", "cmp.response_item",
1772         FT_NONE, BASE_NONE, NULL, 0,
1773         "cmp.CertResponse", HFILL }},
1774     { &hf_cmp_certReqId,
1775       { "certReqId", "cmp.certReqId",
1776         FT_INT32, BASE_DEC, NULL, 0,
1777         "cmp.INTEGER", HFILL }},
1778     { &hf_cmp_status_01,
1779       { "status", "cmp.status",
1780         FT_NONE, BASE_NONE, NULL, 0,
1781         "cmp.PKIStatusInfo", HFILL }},
1782     { &hf_cmp_certifiedKeyPair,
1783       { "certifiedKeyPair", "cmp.certifiedKeyPair",
1784         FT_NONE, BASE_NONE, NULL, 0,
1785         "cmp.CertifiedKeyPair", HFILL }},
1786     { &hf_cmp_rspInfo,
1787       { "rspInfo", "cmp.rspInfo",
1788         FT_BYTES, BASE_HEX, NULL, 0,
1789         "cmp.OCTET_STRING", HFILL }},
1790     { &hf_cmp_certOrEncCert,
1791       { "certOrEncCert", "cmp.certOrEncCert",
1792         FT_UINT32, BASE_DEC, VALS(cmp_CertOrEncCert_vals), 0,
1793         "cmp.CertOrEncCert", HFILL }},
1794     { &hf_cmp_privateKey,
1795       { "privateKey", "cmp.privateKey",
1796         FT_NONE, BASE_NONE, NULL, 0,
1797         "crmf.EncryptedValue", HFILL }},
1798     { &hf_cmp_publicationInfo,
1799       { "publicationInfo", "cmp.publicationInfo",
1800         FT_NONE, BASE_NONE, NULL, 0,
1801         "crmf.PKIPublicationInfo", HFILL }},
1802     { &hf_cmp_certificate,
1803       { "certificate", "cmp.certificate",
1804         FT_NONE, BASE_NONE, NULL, 0,
1805         "pkix1explicit.Certificate", HFILL }},
1806     { &hf_cmp_encryptedCert,
1807       { "encryptedCert", "cmp.encryptedCert",
1808         FT_NONE, BASE_NONE, NULL, 0,
1809         "crmf.EncryptedValue", HFILL }},
1810     { &hf_cmp_newSigCert,
1811       { "newSigCert", "cmp.newSigCert",
1812         FT_NONE, BASE_NONE, NULL, 0,
1813         "pkix1explicit.Certificate", HFILL }},
1814     { &hf_cmp_caCerts,
1815       { "caCerts", "cmp.caCerts",
1816         FT_UINT32, BASE_DEC, NULL, 0,
1817         "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1818     { &hf_cmp_caCerts_item,
1819       { "Item", "cmp.caCerts_item",
1820         FT_NONE, BASE_NONE, NULL, 0,
1821         "pkix1explicit.Certificate", HFILL }},
1822     { &hf_cmp_keyPairHist,
1823       { "keyPairHist", "cmp.keyPairHist",
1824         FT_UINT32, BASE_DEC, NULL, 0,
1825         "cmp.SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair", HFILL }},
1826     { &hf_cmp_keyPairHist_item,
1827       { "Item", "cmp.keyPairHist_item",
1828         FT_NONE, BASE_NONE, NULL, 0,
1829         "cmp.CertifiedKeyPair", HFILL }},
1830     { &hf_cmp_RevReqContent_item,
1831       { "Item", "cmp.RevReqContent_item",
1832         FT_NONE, BASE_NONE, NULL, 0,
1833         "cmp.RevDetails", HFILL }},
1834     { &hf_cmp_certDetails,
1835       { "certDetails", "cmp.certDetails",
1836         FT_NONE, BASE_NONE, NULL, 0,
1837         "crmf.CertTemplate", HFILL }},
1838     { &hf_cmp_revocationReason,
1839       { "revocationReason", "cmp.revocationReason",
1840         FT_BYTES, BASE_HEX, NULL, 0,
1841         "pkix1implicit.ReasonFlags", HFILL }},
1842     { &hf_cmp_badSinceDate,
1843       { "badSinceDate", "cmp.badSinceDate",
1844         FT_STRING, BASE_NONE, NULL, 0,
1845         "cmp.GeneralizedTime", HFILL }},
1846     { &hf_cmp_crlEntryDetails,
1847       { "crlEntryDetails", "cmp.crlEntryDetails",
1848         FT_UINT32, BASE_DEC, NULL, 0,
1849         "pkix1explicit.Extensions", HFILL }},
1850     { &hf_cmp_status_02,
1851       { "status", "cmp.status",
1852         FT_UINT32, BASE_DEC, NULL, 0,
1853         "cmp.SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo", HFILL }},
1854     { &hf_cmp_status_item,
1855       { "Item", "cmp.status_item",
1856         FT_NONE, BASE_NONE, NULL, 0,
1857         "cmp.PKIStatusInfo", HFILL }},
1858     { &hf_cmp_revCerts,
1859       { "revCerts", "cmp.revCerts",
1860         FT_UINT32, BASE_DEC, NULL, 0,
1861         "cmp.SEQUENCE_SIZE_1_MAX_OF_CertId", HFILL }},
1862     { &hf_cmp_revCerts_item,
1863       { "Item", "cmp.revCerts_item",
1864         FT_NONE, BASE_NONE, NULL, 0,
1865         "crmf.CertId", HFILL }},
1866     { &hf_cmp_crls,
1867       { "crls", "cmp.crls",
1868         FT_UINT32, BASE_DEC, NULL, 0,
1869         "cmp.SEQUENCE_SIZE_1_MAX_OF_CertificateList", HFILL }},
1870     { &hf_cmp_crls_item,
1871       { "Item", "cmp.crls_item",
1872         FT_NONE, BASE_NONE, NULL, 0,
1873         "pkix1explicit.CertificateList", HFILL }},
1874     { &hf_cmp_oldWithNew,
1875       { "oldWithNew", "cmp.oldWithNew",
1876         FT_NONE, BASE_NONE, NULL, 0,
1877         "pkix1explicit.Certificate", HFILL }},
1878     { &hf_cmp_newWithOld,
1879       { "newWithOld", "cmp.newWithOld",
1880         FT_NONE, BASE_NONE, NULL, 0,
1881         "pkix1explicit.Certificate", HFILL }},
1882     { &hf_cmp_newWithNew,
1883       { "newWithNew", "cmp.newWithNew",
1884         FT_NONE, BASE_NONE, NULL, 0,
1885         "pkix1explicit.Certificate", HFILL }},
1886     { &hf_cmp_willBeRevokedAt,
1887       { "willBeRevokedAt", "cmp.willBeRevokedAt",
1888         FT_STRING, BASE_NONE, NULL, 0,
1889         "cmp.GeneralizedTime", HFILL }},
1890     { &hf_cmp_crlDetails,
1891       { "crlDetails", "cmp.crlDetails",
1892         FT_UINT32, BASE_DEC, NULL, 0,
1893         "pkix1explicit.Extensions", HFILL }},
1894     { &hf_cmp_CRLAnnContent_item,
1895       { "Item", "cmp.CRLAnnContent_item",
1896         FT_NONE, BASE_NONE, NULL, 0,
1897         "pkix1explicit.CertificateList", HFILL }},
1898     { &hf_cmp_infoType,
1899       { "infoType", "cmp.infoType",
1900         FT_OID, BASE_NONE, NULL, 0,
1901         "cmp.T_infoType", HFILL }},
1902     { &hf_cmp_infoValue,
1903       { "infoValue", "cmp.infoValue",
1904         FT_NONE, BASE_NONE, NULL, 0,
1905         "cmp.T_infoValue", HFILL }},
1906     { &hf_cmp_GenMsgContent_item,
1907       { "Item", "cmp.GenMsgContent_item",
1908         FT_NONE, BASE_NONE, NULL, 0,
1909         "cmp.InfoTypeAndValue", HFILL }},
1910     { &hf_cmp_GenRepContent_item,
1911       { "Item", "cmp.GenRepContent_item",
1912         FT_NONE, BASE_NONE, NULL, 0,
1913         "cmp.InfoTypeAndValue", HFILL }},
1914     { &hf_cmp_pKIStatusInfo,
1915       { "pKIStatusInfo", "cmp.pKIStatusInfo",
1916         FT_NONE, BASE_NONE, NULL, 0,
1917         "cmp.PKIStatusInfo", HFILL }},
1918     { &hf_cmp_errorCode,
1919       { "errorCode", "cmp.errorCode",
1920         FT_INT32, BASE_DEC, NULL, 0,
1921         "cmp.INTEGER", HFILL }},
1922     { &hf_cmp_errorDetails,
1923       { "errorDetails", "cmp.errorDetails",
1924         FT_UINT32, BASE_DEC, NULL, 0,
1925         "cmp.PKIFreeText", HFILL }},
1926     { &hf_cmp_PKIFailureInfo_badAlg,
1927       { "badAlg", "cmp.badAlg",
1928         FT_BOOLEAN, 8, NULL, 0x80,
1929         "", HFILL }},
1930     { &hf_cmp_PKIFailureInfo_badMessageCheck,
1931       { "badMessageCheck", "cmp.badMessageCheck",
1932         FT_BOOLEAN, 8, NULL, 0x40,
1933         "", HFILL }},
1934     { &hf_cmp_PKIFailureInfo_badRequest,
1935       { "badRequest", "cmp.badRequest",
1936         FT_BOOLEAN, 8, NULL, 0x20,
1937         "", HFILL }},
1938     { &hf_cmp_PKIFailureInfo_badTime,
1939       { "badTime", "cmp.badTime",
1940         FT_BOOLEAN, 8, NULL, 0x10,
1941         "", HFILL }},
1942     { &hf_cmp_PKIFailureInfo_badCertId,
1943       { "badCertId", "cmp.badCertId",
1944         FT_BOOLEAN, 8, NULL, 0x08,
1945         "", HFILL }},
1946     { &hf_cmp_PKIFailureInfo_badDataFormat,
1947       { "badDataFormat", "cmp.badDataFormat",
1948         FT_BOOLEAN, 8, NULL, 0x04,
1949         "", HFILL }},
1950     { &hf_cmp_PKIFailureInfo_wrongAuthority,
1951       { "wrongAuthority", "cmp.wrongAuthority",
1952         FT_BOOLEAN, 8, NULL, 0x02,
1953         "", HFILL }},
1954     { &hf_cmp_PKIFailureInfo_incorrectData,
1955       { "incorrectData", "cmp.incorrectData",
1956         FT_BOOLEAN, 8, NULL, 0x01,
1957         "", HFILL }},
1958     { &hf_cmp_PKIFailureInfo_missingTimeStamp,
1959       { "missingTimeStamp", "cmp.missingTimeStamp",
1960         FT_BOOLEAN, 8, NULL, 0x80,
1961         "", HFILL }},
1962     { &hf_cmp_PKIFailureInfo_badPOP,
1963       { "badPOP", "cmp.badPOP",
1964         FT_BOOLEAN, 8, NULL, 0x40,
1965         "", HFILL }},
1966
1967 /*--- End of included file: packet-cmp-hfarr.c ---*/
1968 #line 286 "packet-cmp-template.c"
1969   };
1970
1971   /* List of subtrees */
1972   static gint *ett[] = {
1973     &ett_cmp,
1974
1975 /*--- Included file: packet-cmp-ettarr.c ---*/
1976 #line 1 "packet-cmp-ettarr.c"
1977     &ett_cmp_PKIMessage,
1978     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate,
1979     &ett_cmp_PKIHeader,
1980     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue,
1981     &ett_cmp_PKIFreeText,
1982     &ett_cmp_PKIBody,
1983     &ett_cmp_ProtectedPart,
1984     &ett_cmp_PBMParameter,
1985     &ett_cmp_DHBMParameter,
1986     &ett_cmp_PKIFailureInfo,
1987     &ett_cmp_PKIStatusInfo,
1988     &ett_cmp_OOBCertHash,
1989     &ett_cmp_POPODecKeyChallContent,
1990     &ett_cmp_Challenge,
1991     &ett_cmp_POPODecKeyRespContent,
1992     &ett_cmp_CertRepMessage,
1993     &ett_cmp_SEQUENCE_OF_CertResponse,
1994     &ett_cmp_CertResponse,
1995     &ett_cmp_CertifiedKeyPair,
1996     &ett_cmp_CertOrEncCert,
1997     &ett_cmp_KeyRecRepContent,
1998     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair,
1999     &ett_cmp_RevReqContent,
2000     &ett_cmp_RevDetails,
2001     &ett_cmp_RevRepContent,
2002     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo,
2003     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId,
2004     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList,
2005     &ett_cmp_CAKeyUpdAnnContent,
2006     &ett_cmp_RevAnnContent,
2007     &ett_cmp_CRLAnnContent,
2008     &ett_cmp_InfoTypeAndValue,
2009     &ett_cmp_GenMsgContent,
2010     &ett_cmp_GenRepContent,
2011     &ett_cmp_ErrorMsgContent,
2012
2013 /*--- End of included file: packet-cmp-ettarr.c ---*/
2014 #line 292 "packet-cmp-template.c"
2015   };
2016   module_t *cmp_module;
2017
2018   /* Register protocol */
2019   proto_cmp = proto_register_protocol(PNAME, PSNAME, PFNAME);
2020
2021   /* Register fields and subtrees */
2022   proto_register_field_array(proto_cmp, hf, array_length(hf));
2023   proto_register_subtree_array(ett, array_length(ett));
2024
2025   cmp_module = prefs_register_protocol(proto_cmp, NULL);
2026   prefs_register_bool_preference(cmp_module, "desegment",
2027                 "Reassemble CMP-over-TCP messages spanning multiple TCP segments",
2028                 "Whether the CMP-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
2029                 "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2030                 &cmp_desegment);
2031 }
2032
2033
2034 /*--- proto_reg_handoff_cmp -------------------------------------------*/
2035 void proto_reg_handoff_cmp(void) {
2036         dissector_handle_t cmp_http_handle;
2037         dissector_handle_t cmp_tcp_handle;
2038
2039         cmp_http_handle = new_create_dissector_handle(dissect_cmp_http, proto_cmp);
2040         dissector_add_string("media_type", "application/pkixcmp", cmp_http_handle);
2041
2042         cmp_tcp_handle = new_create_dissector_handle(dissect_cmp_tcp, proto_cmp);
2043         dissector_add("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
2044
2045 /*#include "packet-cmp-dis-tab.c"*/
2046 }
2047