1 /* Do not modify this file. Changes will be overwritten.                      */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
3 /* packet-cmp.c                                                               */
4 /* asn2wrs.py -b -p cmp -c ./cmp.cnf -s ./packet-cmp-template -D . -O ../.. CMP.asn */
5 
6 /* Input file: packet-cmp-template.c */
7 
8 #line 1 "./asn1/cmp/packet-cmp-template.c"
9 /* packet-cmp.c
10  *
11  * Routines for RFC2510 Certificate Management Protocol packet dissection
12  *   Ronnie Sahlberg 2004
13  * Updated to RFC4210 CMPv2 and associated "Transport Protocols for CMP" draft
14  *   Martin Peylo 2008
15  *
16  * Wireshark - Network traffic analyzer
17  * By Gerald Combs <gerald@wireshark.org>
18  * Copyright 1998 Gerald Combs
19  *
20  * SPDX-License-Identifier: GPL-2.0-or-later
21  */
22 
23 #include "config.h"
24 
25 #include <epan/packet.h>
26 
27 #include <epan/oids.h>
28 #include <epan/asn1.h>
29 #include "packet-ber.h"
30 #include "packet-cmp.h"
31 #include "packet-crmf.h"
32 #include "packet-pkix1explicit.h"
33 #include "packet-pkix1implicit.h"
34 #include "packet-pkcs10.h"
35 #include "packet-tcp.h"
36 #include "packet-http.h"
37 #include <epan/prefs.h>
38 
39 #define PNAME  "Certificate Management Protocol"
40 #define PSNAME "CMP"
41 #define PFNAME "cmp"
42 
43 #define TCP_PORT_CMP 829
44 
45 void proto_register_cmp(void);
46 
47 /* desegmentation of CMP over TCP */
48 static gboolean cmp_desegment = TRUE;
49 
50 static guint cmp_alternate_http_port = 0;
51 static guint cmp_alternate_tcp_style_http_port = 0;
52 
53 /* Initialize the protocol and registered fields */
54 static int proto_cmp = -1;
55 static int hf_cmp_type_oid = -1;
56 static int hf_cmp_tcptrans_len = -1;
57 static int hf_cmp_tcptrans_type = -1;
58 static int hf_cmp_tcptrans_poll_ref = -1;
59 static int hf_cmp_tcptrans_next_poll_ref = -1;
60 static int hf_cmp_tcptrans_ttcb = -1;
61 static int hf_cmp_tcptrans10_version = -1;
62 static int hf_cmp_tcptrans10_flags = -1;
63 
64 /*--- Included file: packet-cmp-hf.c ---*/
65 #line 1 "./asn1/cmp/packet-cmp-hf.c"
66 static int hf_cmp_PBMParameter_PDU = -1;          /* PBMParameter */
67 static int hf_cmp_DHBMParameter_PDU = -1;         /* DHBMParameter */
68 static int hf_cmp_CAProtEncCertValue_PDU = -1;    /* CAProtEncCertValue */
69 static int hf_cmp_SignKeyPairTypesValue_PDU = -1;  /* SignKeyPairTypesValue */
70 static int hf_cmp_EncKeyPairTypesValue_PDU = -1;  /* EncKeyPairTypesValue */
71 static int hf_cmp_PreferredSymmAlgValue_PDU = -1;  /* PreferredSymmAlgValue */
72 static int hf_cmp_CAKeyUpdateInfoValue_PDU = -1;  /* CAKeyUpdateInfoValue */
73 static int hf_cmp_CurrentCRLValue_PDU = -1;       /* CurrentCRLValue */
74 static int hf_cmp_UnsupportedOIDsValue_PDU = -1;  /* UnsupportedOIDsValue */
75 static int hf_cmp_KeyPairParamReqValue_PDU = -1;  /* KeyPairParamReqValue */
76 static int hf_cmp_KeyPairParamRepValue_PDU = -1;  /* KeyPairParamRepValue */
77 static int hf_cmp_RevPassphraseValue_PDU = -1;    /* RevPassphraseValue */
78 static int hf_cmp_ImplicitConfirmValue_PDU = -1;  /* ImplicitConfirmValue */
79 static int hf_cmp_ConfirmWaitTimeValue_PDU = -1;  /* ConfirmWaitTimeValue */
80 static int hf_cmp_OrigPKIMessageValue_PDU = -1;   /* OrigPKIMessageValue */
81 static int hf_cmp_SuppLangTagsValue_PDU = -1;     /* SuppLangTagsValue */
82 static int hf_cmp_x509v3PKCert = -1;              /* Certificate */
83 static int hf_cmp_header = -1;                    /* PKIHeader */
84 static int hf_cmp_body = -1;                      /* PKIBody */
85 static int hf_cmp_protection = -1;                /* PKIProtection */
86 static int hf_cmp_extraCerts = -1;                /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
87 static int hf_cmp_extraCerts_item = -1;           /* CMPCertificate */
88 static int hf_cmp_PKIMessages_item = -1;          /* PKIMessage */
89 static int hf_cmp_pvno = -1;                      /* T_pvno */
90 static int hf_cmp_sender = -1;                    /* GeneralName */
91 static int hf_cmp_recipient = -1;                 /* GeneralName */
92 static int hf_cmp_messageTime = -1;               /* GeneralizedTime */
93 static int hf_cmp_protectionAlg = -1;             /* AlgorithmIdentifier */
94 static int hf_cmp_senderKID = -1;                 /* KeyIdentifier */
95 static int hf_cmp_recipKID = -1;                  /* KeyIdentifier */
96 static int hf_cmp_transactionID = -1;             /* OCTET_STRING */
97 static int hf_cmp_senderNonce = -1;               /* OCTET_STRING */
98 static int hf_cmp_recipNonce = -1;                /* OCTET_STRING */
99 static int hf_cmp_freeText = -1;                  /* PKIFreeText */
100 static int hf_cmp_generalInfo = -1;               /* SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue */
101 static int hf_cmp_generalInfo_item = -1;          /* InfoTypeAndValue */
102 static int hf_cmp_PKIFreeText_item = -1;          /* UTF8String */
103 static int hf_cmp_ir = -1;                        /* CertReqMessages */
104 static int hf_cmp_ip = -1;                        /* CertRepMessage */
105 static int hf_cmp_cr = -1;                        /* CertReqMessages */
106 static int hf_cmp_cp = -1;                        /* CertRepMessage */
107 static int hf_cmp_p10cr = -1;                     /* CertificationRequest */
108 static int hf_cmp_popdecc = -1;                   /* POPODecKeyChallContent */
109 static int hf_cmp_popdecr = -1;                   /* POPODecKeyRespContent */
110 static int hf_cmp_kur = -1;                       /* CertReqMessages */
111 static int hf_cmp_kup = -1;                       /* CertRepMessage */
112 static int hf_cmp_krr = -1;                       /* CertReqMessages */
113 static int hf_cmp_krp = -1;                       /* KeyRecRepContent */
114 static int hf_cmp_rr = -1;                        /* RevReqContent */
115 static int hf_cmp_rp = -1;                        /* RevRepContent */
116 static int hf_cmp_ccr = -1;                       /* CertReqMessages */
117 static int hf_cmp_ccp = -1;                       /* CertRepMessage */
118 static int hf_cmp_ckuann = -1;                    /* CAKeyUpdAnnContent */
119 static int hf_cmp_cann = -1;                      /* CertAnnContent */
120 static int hf_cmp_rann = -1;                      /* RevAnnContent */
121 static int hf_cmp_crlann = -1;                    /* CRLAnnContent */
122 static int hf_cmp_pkiconf = -1;                   /* PKIConfirmContent */
123 static int hf_cmp_nested = -1;                    /* NestedMessageContent */
124 static int hf_cmp_genm = -1;                      /* GenMsgContent */
125 static int hf_cmp_genp = -1;                      /* GenRepContent */
126 static int hf_cmp_error = -1;                     /* ErrorMsgContent */
127 static int hf_cmp_certConf = -1;                  /* CertConfirmContent */
128 static int hf_cmp_pollReq = -1;                   /* PollReqContent */
129 static int hf_cmp_pollRep = -1;                   /* PollRepContent */
130 static int hf_cmp_salt = -1;                      /* OCTET_STRING */
131 static int hf_cmp_owf = -1;                       /* AlgorithmIdentifier */
132 static int hf_cmp_iterationCount = -1;            /* INTEGER */
133 static int hf_cmp_mac = -1;                       /* AlgorithmIdentifier */
134 static int hf_cmp_pkistatus = -1;                 /* PKIStatus */
135 static int hf_cmp_statusString = -1;              /* PKIFreeText */
136 static int hf_cmp_failInfo = -1;                  /* PKIFailureInfo */
137 static int hf_cmp_hashAlg = -1;                   /* AlgorithmIdentifier */
138 static int hf_cmp_certId = -1;                    /* CertId */
139 static int hf_cmp_hashVal = -1;                   /* BIT_STRING */
140 static int hf_cmp_POPODecKeyChallContent_item = -1;  /* Challenge */
141 static int hf_cmp_witness = -1;                   /* OCTET_STRING */
142 static int hf_cmp_challenge = -1;                 /* OCTET_STRING */
143 static int hf_cmp_POPODecKeyRespContent_item = -1;  /* INTEGER */
144 static int hf_cmp_caPubs = -1;                    /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
145 static int hf_cmp_caPubs_item = -1;               /* CMPCertificate */
146 static int hf_cmp_response = -1;                  /* SEQUENCE_OF_CertResponse */
147 static int hf_cmp_response_item = -1;             /* CertResponse */
148 static int hf_cmp_certReqId = -1;                 /* INTEGER */
149 static int hf_cmp_pkistatusinf = -1;              /* PKIStatusInfo */
150 static int hf_cmp_certifiedKeyPair = -1;          /* CertifiedKeyPair */
151 static int hf_cmp_rspInfo = -1;                   /* OCTET_STRING */
152 static int hf_cmp_certOrEncCert = -1;             /* CertOrEncCert */
153 static int hf_cmp_privateKey = -1;                /* EncryptedValue */
154 static int hf_cmp_publicationInfo = -1;           /* PKIPublicationInfo */
155 static int hf_cmp_certificate = -1;               /* CMPCertificate */
156 static int hf_cmp_encryptedCert = -1;             /* EncryptedValue */
157 static int hf_cmp_newSigCert = -1;                /* CMPCertificate */
158 static int hf_cmp_caCerts = -1;                   /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
159 static int hf_cmp_caCerts_item = -1;              /* CMPCertificate */
160 static int hf_cmp_keyPairHist = -1;               /* SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair */
161 static int hf_cmp_keyPairHist_item = -1;          /* CertifiedKeyPair */
162 static int hf_cmp_RevReqContent_item = -1;        /* RevDetails */
163 static int hf_cmp_certDetails = -1;               /* CertTemplate */
164 static int hf_cmp_crlEntryDetails = -1;           /* Extensions */
165 static int hf_cmp_rvrpcnt_status = -1;            /* SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo */
166 static int hf_cmp_rvrpcnt_status_item = -1;       /* PKIStatusInfo */
167 static int hf_cmp_revCerts = -1;                  /* SEQUENCE_SIZE_1_MAX_OF_CertId */
168 static int hf_cmp_revCerts_item = -1;             /* CertId */
169 static int hf_cmp_crls = -1;                      /* SEQUENCE_SIZE_1_MAX_OF_CertificateList */
170 static int hf_cmp_crls_item = -1;                 /* CertificateList */
171 static int hf_cmp_oldWithNew = -1;                /* CMPCertificate */
172 static int hf_cmp_newWithOld = -1;                /* CMPCertificate */
173 static int hf_cmp_newWithNew = -1;                /* CMPCertificate */
174 static int hf_cmp_pkistatus_01 = -1;              /* PKIStatus */
175 static int hf_cmp_willBeRevokedAt = -1;           /* GeneralizedTime */
176 static int hf_cmp_badSinceDate = -1;              /* GeneralizedTime */
177 static int hf_cmp_crlDetails = -1;                /* Extensions */
178 static int hf_cmp_CRLAnnContent_item = -1;        /* CertificateList */
179 static int hf_cmp_CertConfirmContent_item = -1;   /* CertStatus */
180 static int hf_cmp_certHash = -1;                  /* OCTET_STRING */
181 static int hf_cmp_statusInfo = -1;                /* PKIStatusInfo */
182 static int hf_cmp_infoType = -1;                  /* T_infoType */
183 static int hf_cmp_infoValue = -1;                 /* T_infoValue */
184 static int hf_cmp_SignKeyPairTypesValue_item = -1;  /* AlgorithmIdentifier */
185 static int hf_cmp_EncKeyPairTypesValue_item = -1;  /* AlgorithmIdentifier */
186 static int hf_cmp_UnsupportedOIDsValue_item = -1;  /* OBJECT_IDENTIFIER */
187 static int hf_cmp_SuppLangTagsValue_item = -1;    /* UTF8String */
188 static int hf_cmp_GenMsgContent_item = -1;        /* InfoTypeAndValue */
189 static int hf_cmp_GenRepContent_item = -1;        /* InfoTypeAndValue */
190 static int hf_cmp_pKIStatusInfo = -1;             /* PKIStatusInfo */
191 static int hf_cmp_errorCode = -1;                 /* INTEGER */
192 static int hf_cmp_errorDetails = -1;              /* PKIFreeText */
193 static int hf_cmp_PollReqContent_item = -1;       /* PollReqContent_item */
194 static int hf_cmp_PollRepContent_item = -1;       /* PollRepContent_item */
195 static int hf_cmp_checkAfter = -1;                /* INTEGER */
196 static int hf_cmp_reason = -1;                    /* PKIFreeText */
197 /* named bits */
198 static int hf_cmp_PKIFailureInfo_badAlg = -1;
199 static int hf_cmp_PKIFailureInfo_badMessageCheck = -1;
200 static int hf_cmp_PKIFailureInfo_badRequest = -1;
201 static int hf_cmp_PKIFailureInfo_badTime = -1;
202 static int hf_cmp_PKIFailureInfo_badCertId = -1;
203 static int hf_cmp_PKIFailureInfo_badDataFormat = -1;
204 static int hf_cmp_PKIFailureInfo_wrongAuthority = -1;
205 static int hf_cmp_PKIFailureInfo_incorrectData = -1;
206 static int hf_cmp_PKIFailureInfo_missingTimeStamp = -1;
207 static int hf_cmp_PKIFailureInfo_badPOP = -1;
208 static int hf_cmp_PKIFailureInfo_certRevoked = -1;
209 static int hf_cmp_PKIFailureInfo_certConfirmed = -1;
210 static int hf_cmp_PKIFailureInfo_wrongIntegrity = -1;
211 static int hf_cmp_PKIFailureInfo_badRecipientNonce = -1;
212 static int hf_cmp_PKIFailureInfo_timeNotAvailable = -1;
213 static int hf_cmp_PKIFailureInfo_unacceptedPolicy = -1;
214 static int hf_cmp_PKIFailureInfo_unacceptedExtension = -1;
215 static int hf_cmp_PKIFailureInfo_addInfoNotAvailable = -1;
216 static int hf_cmp_PKIFailureInfo_badSenderNonce = -1;
217 static int hf_cmp_PKIFailureInfo_badCertTemplate = -1;
218 static int hf_cmp_PKIFailureInfo_signerNotTrusted = -1;
219 static int hf_cmp_PKIFailureInfo_transactionIdInUse = -1;
220 static int hf_cmp_PKIFailureInfo_unsupportedVersion = -1;
221 static int hf_cmp_PKIFailureInfo_notAuthorized = -1;
222 static int hf_cmp_PKIFailureInfo_systemUnavail = -1;
223 static int hf_cmp_PKIFailureInfo_systemFailure = -1;
224 static int hf_cmp_PKIFailureInfo_duplicateCertReq = -1;
225 
226 /*--- End of included file: packet-cmp-hf.c ---*/
227 #line 56 "./asn1/cmp/packet-cmp-template.c"
228 
229 /* Initialize the subtree pointers */
230 static gint ett_cmp = -1;
231 
232 /*--- Included file: packet-cmp-ett.c ---*/
233 #line 1 "./asn1/cmp/packet-cmp-ett.c"
234 static gint ett_cmp_CMPCertificate = -1;
235 static gint ett_cmp_PKIMessage = -1;
236 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate = -1;
237 static gint ett_cmp_PKIMessages = -1;
238 static gint ett_cmp_PKIHeader = -1;
239 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue = -1;
240 static gint ett_cmp_PKIFreeText = -1;
241 static gint ett_cmp_PKIBody = -1;
242 static gint ett_cmp_ProtectedPart = -1;
243 static gint ett_cmp_PBMParameter = -1;
244 static gint ett_cmp_DHBMParameter = -1;
245 static gint ett_cmp_PKIFailureInfo = -1;
246 static gint ett_cmp_PKIStatusInfo = -1;
247 static gint ett_cmp_OOBCertHash = -1;
248 static gint ett_cmp_POPODecKeyChallContent = -1;
249 static gint ett_cmp_Challenge = -1;
250 static gint ett_cmp_POPODecKeyRespContent = -1;
251 static gint ett_cmp_CertRepMessage = -1;
252 static gint ett_cmp_SEQUENCE_OF_CertResponse = -1;
253 static gint ett_cmp_CertResponse = -1;
254 static gint ett_cmp_CertifiedKeyPair = -1;
255 static gint ett_cmp_CertOrEncCert = -1;
256 static gint ett_cmp_KeyRecRepContent = -1;
257 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair = -1;
258 static gint ett_cmp_RevReqContent = -1;
259 static gint ett_cmp_RevDetails = -1;
260 static gint ett_cmp_RevRepContent = -1;
261 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo = -1;
262 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId = -1;
263 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList = -1;
264 static gint ett_cmp_CAKeyUpdAnnContent = -1;
265 static gint ett_cmp_RevAnnContent = -1;
266 static gint ett_cmp_CRLAnnContent = -1;
267 static gint ett_cmp_CertConfirmContent = -1;
268 static gint ett_cmp_CertStatus = -1;
269 static gint ett_cmp_InfoTypeAndValue = -1;
270 static gint ett_cmp_SignKeyPairTypesValue = -1;
271 static gint ett_cmp_EncKeyPairTypesValue = -1;
272 static gint ett_cmp_UnsupportedOIDsValue = -1;
273 static gint ett_cmp_SuppLangTagsValue = -1;
274 static gint ett_cmp_GenMsgContent = -1;
275 static gint ett_cmp_GenRepContent = -1;
276 static gint ett_cmp_ErrorMsgContent = -1;
277 static gint ett_cmp_PollReqContent = -1;
278 static gint ett_cmp_PollReqContent_item = -1;
279 static gint ett_cmp_PollRepContent = -1;
280 static gint ett_cmp_PollRepContent_item = -1;
281 
282 /*--- End of included file: packet-cmp-ett.c ---*/
283 #line 60 "./asn1/cmp/packet-cmp-template.c"
284 
285 /*--- Included file: packet-cmp-fn.c ---*/
286 #line 1 "./asn1/cmp/packet-cmp-fn.c"
287 /*--- Cyclic dependencies ---*/
288 
289 /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessages -> PKIMessage */
290 /*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_);*/
291 
292 
293 
294 static const value_string cmp_CMPCertificate_vals[] = {
295   {   0, "x509v3PKCert" },
296   { 0, NULL }
297 };
298 
299 static const ber_choice_t CMPCertificate_choice[] = {
300   {   0, &hf_cmp_x509v3PKCert    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Certificate },
301   { 0, NULL, 0, 0, 0, NULL }
302 };
303 
304 static int
dissect_cmp_CMPCertificate(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)305 dissect_cmp_CMPCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
306   offset = dissect_ber_choice(actx, tree, tvb, offset,
307                                  CMPCertificate_choice, hf_index, ett_cmp_CMPCertificate,
308                                  NULL);
309 
310   return offset;
311 }
312 
313 
314 static const value_string cmp_T_pvno_vals[] = {
315   {   1, "cmp1999" },
316   {   2, "cmp2000" },
317   { 0, NULL }
318 };
319 
320 
321 static int
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_)322 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_) {
323   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
324                                                 NULL);
325 
326   return offset;
327 }
328 
329 
330 
331 static int
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_)332 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_) {
333   offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
334 
335   return offset;
336 }
337 
338 
339 
340 static int
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_)341 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_) {
342   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
343                                        NULL);
344 
345   return offset;
346 }
347 
348 
349 
350 static int
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_)351 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_) {
352   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
353                                             actx, tree, tvb, offset, hf_index,
354                                             NULL);
355 
356   return offset;
357 }
358 
359 
360 static const ber_sequence_t PKIFreeText_sequence_of[1] = {
361   { &hf_cmp_PKIFreeText_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String },
362 };
363 
364 static int
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_)365 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_) {
366   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
367                                       PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText);
368 
369   return offset;
370 }
371 
372 
373 
374 static int
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_)375 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_) {
376   offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, &actx->external.direct_reference);
377 
378   return offset;
379 }
380 
381 
382 
383 static int
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_)384 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_) {
385 #line 56 "./asn1/cmp/cmp.cnf"
386   offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
387 
388 
389 
390   return offset;
391 }
392 
393 
394 static const ber_sequence_t InfoTypeAndValue_sequence[] = {
395   { &hf_cmp_infoType        , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoType },
396   { &hf_cmp_infoValue       , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoValue },
397   { NULL, 0, 0, 0, NULL }
398 };
399 
400 static int
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_)401 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_) {
402   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
403                                    InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue);
404 
405   return offset;
406 }
407 
408 
409 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = {
410   { &hf_cmp_generalInfo_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
411 };
412 
413 static int
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_)414 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_) {
415   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
416                                       SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue);
417 
418   return offset;
419 }
420 
421 
422 static const ber_sequence_t PKIHeader_sequence[] = {
423   { &hf_cmp_pvno            , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_T_pvno },
424   { &hf_cmp_sender          , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
425   { &hf_cmp_recipient       , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
426   { &hf_cmp_messageTime     , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_GeneralizedTime },
427   { &hf_cmp_protectionAlg   , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier },
428   { &hf_cmp_senderKID       , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier },
429   { &hf_cmp_recipKID        , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier },
430   { &hf_cmp_transactionID   , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
431   { &hf_cmp_senderNonce     , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
432   { &hf_cmp_recipNonce      , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
433   { &hf_cmp_freeText        , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_cmp_PKIFreeText },
434   { &hf_cmp_generalInfo     , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue },
435   { NULL, 0, 0, 0, NULL }
436 };
437 
438 static int
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_)439 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_) {
440   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
441                                    PKIHeader_sequence, hf_index, ett_cmp_PKIHeader);
442 
443   return offset;
444 }
445 
446 
447 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of[1] = {
448   { &hf_cmp_extraCerts_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
449 };
450 
451 static int
dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)452 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
453   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
454                                       SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate);
455 
456   return offset;
457 }
458 
459 
460 
461 static int
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_)462 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_) {
463   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
464                                                 NULL);
465 
466   return offset;
467 }
468 
469 
470 static const value_string cmp_PKIStatus_vals[] = {
471   {   0, "accepted" },
472   {   1, "grantedWithMods" },
473   {   2, "rejection" },
474   {   3, "waiting" },
475   {   4, "revocationWarning" },
476   {   5, "revocationNotification" },
477   {   6, "keyUpdateWarning" },
478   { 0, NULL }
479 };
480 
481 
482 static int
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_)483 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_) {
484 #line 72 "./asn1/cmp/cmp.cnf"
485   guint32 value;
486 
487     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
488                                                 &value);
489 
490 
491   col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Status=%s", val_to_str(value, cmp_PKIStatus_vals, "unknown"));
492 
493 
494 
495   return offset;
496 }
497 
498 
499 static int * const PKIFailureInfo_bits[] = {
500   &hf_cmp_PKIFailureInfo_badAlg,
501   &hf_cmp_PKIFailureInfo_badMessageCheck,
502   &hf_cmp_PKIFailureInfo_badRequest,
503   &hf_cmp_PKIFailureInfo_badTime,
504   &hf_cmp_PKIFailureInfo_badCertId,
505   &hf_cmp_PKIFailureInfo_badDataFormat,
506   &hf_cmp_PKIFailureInfo_wrongAuthority,
507   &hf_cmp_PKIFailureInfo_incorrectData,
508   &hf_cmp_PKIFailureInfo_missingTimeStamp,
509   &hf_cmp_PKIFailureInfo_badPOP,
510   &hf_cmp_PKIFailureInfo_certRevoked,
511   &hf_cmp_PKIFailureInfo_certConfirmed,
512   &hf_cmp_PKIFailureInfo_wrongIntegrity,
513   &hf_cmp_PKIFailureInfo_badRecipientNonce,
514   &hf_cmp_PKIFailureInfo_timeNotAvailable,
515   &hf_cmp_PKIFailureInfo_unacceptedPolicy,
516   &hf_cmp_PKIFailureInfo_unacceptedExtension,
517   &hf_cmp_PKIFailureInfo_addInfoNotAvailable,
518   &hf_cmp_PKIFailureInfo_badSenderNonce,
519   &hf_cmp_PKIFailureInfo_badCertTemplate,
520   &hf_cmp_PKIFailureInfo_signerNotTrusted,
521   &hf_cmp_PKIFailureInfo_transactionIdInUse,
522   &hf_cmp_PKIFailureInfo_unsupportedVersion,
523   &hf_cmp_PKIFailureInfo_notAuthorized,
524   &hf_cmp_PKIFailureInfo_systemUnavail,
525   &hf_cmp_PKIFailureInfo_systemFailure,
526   &hf_cmp_PKIFailureInfo_duplicateCertReq,
527   NULL
528 };
529 
530 static int
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_)531 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_) {
532   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
533                                     PKIFailureInfo_bits, 27, hf_index, ett_cmp_PKIFailureInfo,
534                                     NULL);
535 
536   return offset;
537 }
538 
539 
540 static const ber_sequence_t PKIStatusInfo_sequence[] = {
541   { &hf_cmp_pkistatus       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus },
542   { &hf_cmp_statusString    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
543   { &hf_cmp_failInfo        , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFailureInfo },
544   { NULL, 0, 0, 0, NULL }
545 };
546 
547 static int
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_)548 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_) {
549   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
550                                    PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo);
551 
552   return offset;
553 }
554 
555 
556 static const value_string cmp_CertOrEncCert_vals[] = {
557   {   0, "certificate" },
558   {   1, "encryptedCert" },
559   { 0, NULL }
560 };
561 
562 static const ber_choice_t CertOrEncCert_choice[] = {
563   {   0, &hf_cmp_certificate     , BER_CLASS_CON, 0, 0, dissect_cmp_CMPCertificate },
564   {   1, &hf_cmp_encryptedCert   , BER_CLASS_CON, 1, 0, dissect_crmf_EncryptedValue },
565   { 0, NULL, 0, 0, 0, NULL }
566 };
567 
568 static int
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_)569 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_) {
570   offset = dissect_ber_choice(actx, tree, tvb, offset,
571                                  CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert,
572                                  NULL);
573 
574   return offset;
575 }
576 
577 
578 static const ber_sequence_t CertifiedKeyPair_sequence[] = {
579   { &hf_cmp_certOrEncCert   , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CertOrEncCert },
580   { &hf_cmp_privateKey      , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_crmf_EncryptedValue },
581   { &hf_cmp_publicationInfo , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_PKIPublicationInfo },
582   { NULL, 0, 0, 0, NULL }
583 };
584 
585 static int
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_)586 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_) {
587   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
588                                    CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair);
589 
590   return offset;
591 }
592 
593 
594 static const ber_sequence_t CertResponse_sequence[] = {
595   { &hf_cmp_certReqId       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
596   { &hf_cmp_pkistatusinf    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
597   { &hf_cmp_certifiedKeyPair, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair },
598   { &hf_cmp_rspInfo         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
599   { NULL, 0, 0, 0, NULL }
600 };
601 
602 static int
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_)603 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_) {
604   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
605                                    CertResponse_sequence, hf_index, ett_cmp_CertResponse);
606 
607   return offset;
608 }
609 
610 
611 static const ber_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = {
612   { &hf_cmp_response_item   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertResponse },
613 };
614 
615 static int
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_)616 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_) {
617   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
618                                       SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse);
619 
620   return offset;
621 }
622 
623 
624 static const ber_sequence_t CertRepMessage_sequence[] = {
625   { &hf_cmp_caPubs          , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
626   { &hf_cmp_response        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_OF_CertResponse },
627   { NULL, 0, 0, 0, NULL }
628 };
629 
630 static int
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_)631 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_) {
632   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
633                                    CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage);
634 
635   return offset;
636 }
637 
638 
639 static const ber_sequence_t Challenge_sequence[] = {
640   { &hf_cmp_owf             , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
641   { &hf_cmp_witness         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
642   { &hf_cmp_challenge       , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
643   { NULL, 0, 0, 0, NULL }
644 };
645 
646 static int
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_)647 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_) {
648   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
649                                    Challenge_sequence, hf_index, ett_cmp_Challenge);
650 
651   return offset;
652 }
653 
654 
655 static const ber_sequence_t POPODecKeyChallContent_sequence_of[1] = {
656   { &hf_cmp_POPODecKeyChallContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_Challenge },
657 };
658 
659 static int
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_)660 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_) {
661   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
662                                       POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent);
663 
664   return offset;
665 }
666 
667 
668 static const ber_sequence_t POPODecKeyRespContent_sequence_of[1] = {
669   { &hf_cmp_POPODecKeyRespContent_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
670 };
671 
672 static int
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_)673 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_) {
674   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
675                                       POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent);
676 
677   return offset;
678 }
679 
680 
681 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = {
682   { &hf_cmp_keyPairHist_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair },
683 };
684 
685 static int
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_)686 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_) {
687   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
688                                       SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair);
689 
690   return offset;
691 }
692 
693 
694 static const ber_sequence_t KeyRecRepContent_sequence[] = {
695   { &hf_cmp_pkistatusinf    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
696   { &hf_cmp_newSigCert      , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
697   { &hf_cmp_caCerts         , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
698   { &hf_cmp_keyPairHist     , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair },
699   { NULL, 0, 0, 0, NULL }
700 };
701 
702 static int
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_)703 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_) {
704   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
705                                    KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent);
706 
707   return offset;
708 }
709 
710 
711 static const ber_sequence_t RevDetails_sequence[] = {
712   { &hf_cmp_certDetails     , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertTemplate },
713   { &hf_cmp_crlEntryDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions },
714   { NULL, 0, 0, 0, NULL }
715 };
716 
717 static int
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_)718 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_) {
719   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
720                                    RevDetails_sequence, hf_index, ett_cmp_RevDetails);
721 
722   return offset;
723 }
724 
725 
726 static const ber_sequence_t RevReqContent_sequence_of[1] = {
727   { &hf_cmp_RevReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_RevDetails },
728 };
729 
730 static int
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_)731 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_) {
732   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
733                                       RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent);
734 
735   return offset;
736 }
737 
738 
739 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = {
740   { &hf_cmp_rvrpcnt_status_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
741 };
742 
743 static int
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_)744 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_) {
745   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
746                                       SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo);
747 
748   return offset;
749 }
750 
751 
752 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = {
753   { &hf_cmp_revCerts_item   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId },
754 };
755 
756 static int
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_)757 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_) {
758   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
759                                       SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId);
760 
761   return offset;
762 }
763 
764 
765 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = {
766   { &hf_cmp_crls_item       , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList },
767 };
768 
769 static int
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_)770 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_) {
771   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
772                                       SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList);
773 
774   return offset;
775 }
776 
777 
778 static const ber_sequence_t RevRepContent_sequence[] = {
779   { &hf_cmp_rvrpcnt_status  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo },
780   { &hf_cmp_revCerts        , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId },
781   { &hf_cmp_crls            , BER_CLASS_CON, 1, 0, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList },
782   { NULL, 0, 0, 0, NULL }
783 };
784 
785 static int
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_)786 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_) {
787   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
788                                    RevRepContent_sequence, hf_index, ett_cmp_RevRepContent);
789 
790   return offset;
791 }
792 
793 
794 static const ber_sequence_t CAKeyUpdAnnContent_sequence[] = {
795   { &hf_cmp_oldWithNew      , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
796   { &hf_cmp_newWithOld      , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
797   { &hf_cmp_newWithNew      , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
798   { NULL, 0, 0, 0, NULL }
799 };
800 
801 static int
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_)802 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_) {
803   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
804                                    CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent);
805 
806   return offset;
807 }
808 
809 
810 
811 static int
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_)812 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_) {
813   offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
814 
815   return offset;
816 }
817 
818 
819 static const ber_sequence_t RevAnnContent_sequence[] = {
820   { &hf_cmp_pkistatus_01    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus },
821   { &hf_cmp_certId          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId },
822   { &hf_cmp_willBeRevokedAt , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime },
823   { &hf_cmp_badSinceDate    , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime },
824   { &hf_cmp_crlDetails      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions },
825   { NULL, 0, 0, 0, NULL }
826 };
827 
828 static int
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_)829 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_) {
830   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
831                                    RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent);
832 
833   return offset;
834 }
835 
836 
837 static const ber_sequence_t CRLAnnContent_sequence_of[1] = {
838   { &hf_cmp_CRLAnnContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList },
839 };
840 
841 static int
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_)842 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_) {
843   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
844                                       CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent);
845 
846   return offset;
847 }
848 
849 
850 
851 static int
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_)852 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_) {
853   offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
854 
855   return offset;
856 }
857 
858 
859 static const ber_sequence_t PKIMessages_sequence_of[1] = {
860   { &hf_cmp_PKIMessages_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIMessage },
861 };
862 
863 static int
dissect_cmp_PKIMessages(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)864 dissect_cmp_PKIMessages(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
865   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
866                                       PKIMessages_sequence_of, hf_index, ett_cmp_PKIMessages);
867 
868   return offset;
869 }
870 
871 
872 
873 static int
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_)874 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_) {
875   offset = dissect_cmp_PKIMessages(implicit_tag, tvb, offset, actx, tree, hf_index);
876 
877   return offset;
878 }
879 
880 
881 static const ber_sequence_t GenMsgContent_sequence_of[1] = {
882   { &hf_cmp_GenMsgContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
883 };
884 
885 static int
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_)886 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_) {
887   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
888                                       GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent);
889 
890   return offset;
891 }
892 
893 
894 static const ber_sequence_t GenRepContent_sequence_of[1] = {
895   { &hf_cmp_GenRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
896 };
897 
898 static int
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_)899 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_) {
900   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
901                                       GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent);
902 
903   return offset;
904 }
905 
906 
907 static const ber_sequence_t ErrorMsgContent_sequence[] = {
908   { &hf_cmp_pKIStatusInfo   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
909   { &hf_cmp_errorCode       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
910   { &hf_cmp_errorDetails    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
911   { NULL, 0, 0, 0, NULL }
912 };
913 
914 static int
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_)915 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_) {
916   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
917                                    ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent);
918 
919   return offset;
920 }
921 
922 
923 static const ber_sequence_t CertStatus_sequence[] = {
924   { &hf_cmp_certHash        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
925   { &hf_cmp_certReqId       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
926   { &hf_cmp_statusInfo      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
927   { NULL, 0, 0, 0, NULL }
928 };
929 
930 static int
dissect_cmp_CertStatus(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)931 dissect_cmp_CertStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
932   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
933                                    CertStatus_sequence, hf_index, ett_cmp_CertStatus);
934 
935   return offset;
936 }
937 
938 
939 static const ber_sequence_t CertConfirmContent_sequence_of[1] = {
940   { &hf_cmp_CertConfirmContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertStatus },
941 };
942 
943 static int
dissect_cmp_CertConfirmContent(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)944 dissect_cmp_CertConfirmContent(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_sequence_of(implicit_tag, actx, tree, tvb, offset,
946                                       CertConfirmContent_sequence_of, hf_index, ett_cmp_CertConfirmContent);
947 
948   return offset;
949 }
950 
951 
952 static const ber_sequence_t PollReqContent_item_sequence[] = {
953   { &hf_cmp_certReqId       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
954   { NULL, 0, 0, 0, NULL }
955 };
956 
957 static int
dissect_cmp_PollReqContent_item(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)958 dissect_cmp_PollReqContent_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
959   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
960                                    PollReqContent_item_sequence, hf_index, ett_cmp_PollReqContent_item);
961 
962   return offset;
963 }
964 
965 
966 static const ber_sequence_t PollReqContent_sequence_of[1] = {
967   { &hf_cmp_PollReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollReqContent_item },
968 };
969 
970 static int
dissect_cmp_PollReqContent(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)971 dissect_cmp_PollReqContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
972   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
973                                       PollReqContent_sequence_of, hf_index, ett_cmp_PollReqContent);
974 
975   return offset;
976 }
977 
978 
979 static const ber_sequence_t PollRepContent_item_sequence[] = {
980   { &hf_cmp_certReqId       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
981   { &hf_cmp_checkAfter      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
982   { &hf_cmp_reason          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
983   { NULL, 0, 0, 0, NULL }
984 };
985 
986 static int
dissect_cmp_PollRepContent_item(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)987 dissect_cmp_PollRepContent_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
988   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
989                                    PollRepContent_item_sequence, hf_index, ett_cmp_PollRepContent_item);
990 
991   return offset;
992 }
993 
994 
995 static const ber_sequence_t PollRepContent_sequence_of[1] = {
996   { &hf_cmp_PollRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollRepContent_item },
997 };
998 
999 static int
dissect_cmp_PollRepContent(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1000 dissect_cmp_PollRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1001   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1002                                       PollRepContent_sequence_of, hf_index, ett_cmp_PollRepContent);
1003 
1004   return offset;
1005 }
1006 
1007 
1008 static const value_string cmp_PKIBody_vals[] = {
1009   {   0, "ir" },
1010   {   1, "ip" },
1011   {   2, "cr" },
1012   {   3, "cp" },
1013   {   4, "p10cr" },
1014   {   5, "popdecc" },
1015   {   6, "popdecr" },
1016   {   7, "kur" },
1017   {   8, "kup" },
1018   {   9, "krr" },
1019   {  10, "krp" },
1020   {  11, "rr" },
1021   {  12, "rp" },
1022   {  13, "ccr" },
1023   {  14, "ccp" },
1024   {  15, "ckuann" },
1025   {  16, "cann" },
1026   {  17, "rann" },
1027   {  18, "crlann" },
1028   {  19, "pkiconf" },
1029   {  20, "nested" },
1030   {  21, "genm" },
1031   {  22, "genp" },
1032   {  23, "error" },
1033   {  24, "certConf" },
1034   {  25, "pollReq" },
1035   {  26, "pollRep" },
1036   { 0, NULL }
1037 };
1038 
1039 static const ber_choice_t PKIBody_choice[] = {
1040   {   0, &hf_cmp_ir              , BER_CLASS_CON, 0, 0, dissect_crmf_CertReqMessages },
1041   {   1, &hf_cmp_ip              , BER_CLASS_CON, 1, 0, dissect_cmp_CertRepMessage },
1042   {   2, &hf_cmp_cr              , BER_CLASS_CON, 2, 0, dissect_crmf_CertReqMessages },
1043   {   3, &hf_cmp_cp              , BER_CLASS_CON, 3, 0, dissect_cmp_CertRepMessage },
1044   {   4, &hf_cmp_p10cr           , BER_CLASS_CON, 4, 0, dissect_pkcs10_CertificationRequest },
1045   {   5, &hf_cmp_popdecc         , BER_CLASS_CON, 5, 0, dissect_cmp_POPODecKeyChallContent },
1046   {   6, &hf_cmp_popdecr         , BER_CLASS_CON, 6, 0, dissect_cmp_POPODecKeyRespContent },
1047   {   7, &hf_cmp_kur             , BER_CLASS_CON, 7, 0, dissect_crmf_CertReqMessages },
1048   {   8, &hf_cmp_kup             , BER_CLASS_CON, 8, 0, dissect_cmp_CertRepMessage },
1049   {   9, &hf_cmp_krr             , BER_CLASS_CON, 9, 0, dissect_crmf_CertReqMessages },
1050   {  10, &hf_cmp_krp             , BER_CLASS_CON, 10, 0, dissect_cmp_KeyRecRepContent },
1051   {  11, &hf_cmp_rr              , BER_CLASS_CON, 11, 0, dissect_cmp_RevReqContent },
1052   {  12, &hf_cmp_rp              , BER_CLASS_CON, 12, 0, dissect_cmp_RevRepContent },
1053   {  13, &hf_cmp_ccr             , BER_CLASS_CON, 13, 0, dissect_crmf_CertReqMessages },
1054   {  14, &hf_cmp_ccp             , BER_CLASS_CON, 14, 0, dissect_cmp_CertRepMessage },
1055   {  15, &hf_cmp_ckuann          , BER_CLASS_CON, 15, 0, dissect_cmp_CAKeyUpdAnnContent },
1056   {  16, &hf_cmp_cann            , BER_CLASS_CON, 16, 0, dissect_cmp_CertAnnContent },
1057   {  17, &hf_cmp_rann            , BER_CLASS_CON, 17, 0, dissect_cmp_RevAnnContent },
1058   {  18, &hf_cmp_crlann          , BER_CLASS_CON, 18, 0, dissect_cmp_CRLAnnContent },
1059   {  19, &hf_cmp_pkiconf         , BER_CLASS_CON, 19, 0, dissect_cmp_PKIConfirmContent },
1060   {  20, &hf_cmp_nested          , BER_CLASS_CON, 20, 0, dissect_cmp_NestedMessageContent },
1061   {  21, &hf_cmp_genm            , BER_CLASS_CON, 21, 0, dissect_cmp_GenMsgContent },
1062   {  22, &hf_cmp_genp            , BER_CLASS_CON, 22, 0, dissect_cmp_GenRepContent },
1063   {  23, &hf_cmp_error           , BER_CLASS_CON, 23, 0, dissect_cmp_ErrorMsgContent },
1064   {  24, &hf_cmp_certConf        , BER_CLASS_CON, 24, 0, dissect_cmp_CertConfirmContent },
1065   {  25, &hf_cmp_pollReq         , BER_CLASS_CON, 25, 0, dissect_cmp_PollReqContent },
1066   {  26, &hf_cmp_pollRep         , BER_CLASS_CON, 26, 0, dissect_cmp_PollRepContent },
1067   { 0, NULL, 0, 0, 0, NULL }
1068 };
1069 
1070 static int
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_)1071 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_) {
1072 #line 62 "./asn1/cmp/cmp.cnf"
1073   gint branch_taken;
1074 
1075     offset = dissect_ber_choice(actx, tree, tvb, offset,
1076                                  PKIBody_choice, hf_index, ett_cmp_PKIBody,
1077                                  &branch_taken);
1078 
1079 
1080   col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Body=%s", val_to_str(branch_taken, cmp_PKIBody_vals, "unknown"));
1081 
1082 
1083 
1084   return offset;
1085 }
1086 
1087 
1088 
1089 static int
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_)1090 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_) {
1091   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1092                                     NULL, 0, hf_index, -1,
1093                                     NULL);
1094 
1095   return offset;
1096 }
1097 
1098 
1099 static const ber_sequence_t PKIMessage_sequence[] = {
1100   { &hf_cmp_header          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader },
1101   { &hf_cmp_body            , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody },
1102   { &hf_cmp_protection      , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_PKIProtection },
1103   { &hf_cmp_extraCerts      , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
1104   { NULL, 0, 0, 0, NULL }
1105 };
1106 
1107 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_)1108 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_) {
1109   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1110                                    PKIMessage_sequence, hf_index, ett_cmp_PKIMessage);
1111 
1112   return offset;
1113 }
1114 
1115 
1116 static const ber_sequence_t ProtectedPart_sequence[] = {
1117   { &hf_cmp_header          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader },
1118   { &hf_cmp_body            , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody },
1119   { NULL, 0, 0, 0, NULL }
1120 };
1121 
1122 int
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_)1123 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_) {
1124   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1125                                    ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart);
1126 
1127   return offset;
1128 }
1129 
1130 
1131 static const ber_sequence_t PBMParameter_sequence[] = {
1132   { &hf_cmp_salt            , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
1133   { &hf_cmp_owf             , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1134   { &hf_cmp_iterationCount  , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
1135   { &hf_cmp_mac             , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1136   { NULL, 0, 0, 0, NULL }
1137 };
1138 
1139 static int
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_)1140 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_) {
1141   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1142                                    PBMParameter_sequence, hf_index, ett_cmp_PBMParameter);
1143 
1144   return offset;
1145 }
1146 
1147 
1148 static const ber_sequence_t DHBMParameter_sequence[] = {
1149   { &hf_cmp_owf             , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1150   { &hf_cmp_mac             , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1151   { NULL, 0, 0, 0, NULL }
1152 };
1153 
1154 static int
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_)1155 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_) {
1156   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1157                                    DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter);
1158 
1159   return offset;
1160 }
1161 
1162 
1163 
1164 int
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_)1165 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_) {
1166   offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1167 
1168   return offset;
1169 }
1170 
1171 
1172 
1173 static int
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_)1174 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_) {
1175   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1176                                     NULL, 0, hf_index, -1,
1177                                     NULL);
1178 
1179   return offset;
1180 }
1181 
1182 
1183 static const ber_sequence_t OOBCertHash_sequence[] = {
1184   { &hf_cmp_hashAlg         , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier },
1185   { &hf_cmp_certId          , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_CertId },
1186   { &hf_cmp_hashVal         , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_BIT_STRING },
1187   { NULL, 0, 0, 0, NULL }
1188 };
1189 
1190 int
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_)1191 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_) {
1192   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1193                                    OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash);
1194 
1195   return offset;
1196 }
1197 
1198 
1199 
1200 static int
dissect_cmp_CAProtEncCertValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1201 dissect_cmp_CAProtEncCertValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1202   offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1203 
1204   return offset;
1205 }
1206 
1207 
1208 static const ber_sequence_t SignKeyPairTypesValue_sequence_of[1] = {
1209   { &hf_cmp_SignKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1210 };
1211 
1212 static int
dissect_cmp_SignKeyPairTypesValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1213 dissect_cmp_SignKeyPairTypesValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1214   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1215                                       SignKeyPairTypesValue_sequence_of, hf_index, ett_cmp_SignKeyPairTypesValue);
1216 
1217   return offset;
1218 }
1219 
1220 
1221 static const ber_sequence_t EncKeyPairTypesValue_sequence_of[1] = {
1222   { &hf_cmp_EncKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1223 };
1224 
1225 static int
dissect_cmp_EncKeyPairTypesValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1226 dissect_cmp_EncKeyPairTypesValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1227   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1228                                       EncKeyPairTypesValue_sequence_of, hf_index, ett_cmp_EncKeyPairTypesValue);
1229 
1230   return offset;
1231 }
1232 
1233 
1234 
1235 static int
dissect_cmp_PreferredSymmAlgValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1236 dissect_cmp_PreferredSymmAlgValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1237   offset = dissect_pkix1explicit_AlgorithmIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
1238 
1239   return offset;
1240 }
1241 
1242 
1243 
1244 static int
dissect_cmp_CAKeyUpdateInfoValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1245 dissect_cmp_CAKeyUpdateInfoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1246   offset = dissect_cmp_CAKeyUpdAnnContent(implicit_tag, tvb, offset, actx, tree, hf_index);
1247 
1248   return offset;
1249 }
1250 
1251 
1252 
1253 static int
dissect_cmp_CurrentCRLValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1254 dissect_cmp_CurrentCRLValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1255   offset = dissect_pkix1explicit_CertificateList(implicit_tag, tvb, offset, actx, tree, hf_index);
1256 
1257   return offset;
1258 }
1259 
1260 
1261 
1262 static int
dissect_cmp_OBJECT_IDENTIFIER(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1263 dissect_cmp_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1264   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1265 
1266   return offset;
1267 }
1268 
1269 
1270 static const ber_sequence_t UnsupportedOIDsValue_sequence_of[1] = {
1271   { &hf_cmp_UnsupportedOIDsValue_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_OBJECT_IDENTIFIER },
1272 };
1273 
1274 static int
dissect_cmp_UnsupportedOIDsValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1275 dissect_cmp_UnsupportedOIDsValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1276   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1277                                       UnsupportedOIDsValue_sequence_of, hf_index, ett_cmp_UnsupportedOIDsValue);
1278 
1279   return offset;
1280 }
1281 
1282 
1283 
1284 static int
dissect_cmp_KeyPairParamReqValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1285 dissect_cmp_KeyPairParamReqValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1286   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1287 
1288   return offset;
1289 }
1290 
1291 
1292 
1293 static int
dissect_cmp_KeyPairParamRepValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1294 dissect_cmp_KeyPairParamRepValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1295   offset = dissect_pkix1explicit_AlgorithmIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
1296 
1297   return offset;
1298 }
1299 
1300 
1301 
1302 static int
dissect_cmp_RevPassphraseValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1303 dissect_cmp_RevPassphraseValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1304   offset = dissect_crmf_EncryptedValue(implicit_tag, tvb, offset, actx, tree, hf_index);
1305 
1306   return offset;
1307 }
1308 
1309 
1310 
1311 static int
dissect_cmp_ImplicitConfirmValue(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 dissect_cmp_ImplicitConfirmValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1313   offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
1314 
1315   return offset;
1316 }
1317 
1318 
1319 
1320 static int
dissect_cmp_ConfirmWaitTimeValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1321 dissect_cmp_ConfirmWaitTimeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1322   offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
1323 
1324   return offset;
1325 }
1326 
1327 
1328 
1329 static int
dissect_cmp_OrigPKIMessageValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1330 dissect_cmp_OrigPKIMessageValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1331   offset = dissect_cmp_PKIMessages(implicit_tag, tvb, offset, actx, tree, hf_index);
1332 
1333   return offset;
1334 }
1335 
1336 
1337 static const ber_sequence_t SuppLangTagsValue_sequence_of[1] = {
1338   { &hf_cmp_SuppLangTagsValue_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String },
1339 };
1340 
1341 static int
dissect_cmp_SuppLangTagsValue(gboolean implicit_tag _U_,tvbuff_t * tvb _U_,int offset _U_,asn1_ctx_t * actx _U_,proto_tree * tree _U_,int hf_index _U_)1342 dissect_cmp_SuppLangTagsValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1343   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1344                                       SuppLangTagsValue_sequence_of, hf_index, ett_cmp_SuppLangTagsValue);
1345 
1346   return offset;
1347 }
1348 
1349 /*--- PDUs ---*/
1350 
dissect_PBMParameter_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1351 static int dissect_PBMParameter_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1352   int offset = 0;
1353   asn1_ctx_t asn1_ctx;
1354   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1355   offset = dissect_cmp_PBMParameter(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_PBMParameter_PDU);
1356   return offset;
1357 }
dissect_DHBMParameter_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1358 static int dissect_DHBMParameter_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1359   int offset = 0;
1360   asn1_ctx_t asn1_ctx;
1361   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1362   offset = dissect_cmp_DHBMParameter(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_DHBMParameter_PDU);
1363   return offset;
1364 }
dissect_CAProtEncCertValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1365 static int dissect_CAProtEncCertValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1366   int offset = 0;
1367   asn1_ctx_t asn1_ctx;
1368   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1369   offset = dissect_cmp_CAProtEncCertValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_CAProtEncCertValue_PDU);
1370   return offset;
1371 }
dissect_SignKeyPairTypesValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1372 static int dissect_SignKeyPairTypesValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1373   int offset = 0;
1374   asn1_ctx_t asn1_ctx;
1375   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1376   offset = dissect_cmp_SignKeyPairTypesValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_SignKeyPairTypesValue_PDU);
1377   return offset;
1378 }
dissect_EncKeyPairTypesValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1379 static int dissect_EncKeyPairTypesValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1380   int offset = 0;
1381   asn1_ctx_t asn1_ctx;
1382   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1383   offset = dissect_cmp_EncKeyPairTypesValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_EncKeyPairTypesValue_PDU);
1384   return offset;
1385 }
dissect_PreferredSymmAlgValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1386 static int dissect_PreferredSymmAlgValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1387   int offset = 0;
1388   asn1_ctx_t asn1_ctx;
1389   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1390   offset = dissect_cmp_PreferredSymmAlgValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_PreferredSymmAlgValue_PDU);
1391   return offset;
1392 }
dissect_CAKeyUpdateInfoValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1393 static int dissect_CAKeyUpdateInfoValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1394   int offset = 0;
1395   asn1_ctx_t asn1_ctx;
1396   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1397   offset = dissect_cmp_CAKeyUpdateInfoValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_CAKeyUpdateInfoValue_PDU);
1398   return offset;
1399 }
dissect_CurrentCRLValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1400 static int dissect_CurrentCRLValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1401   int offset = 0;
1402   asn1_ctx_t asn1_ctx;
1403   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1404   offset = dissect_cmp_CurrentCRLValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_CurrentCRLValue_PDU);
1405   return offset;
1406 }
dissect_UnsupportedOIDsValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1407 static int dissect_UnsupportedOIDsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1408   int offset = 0;
1409   asn1_ctx_t asn1_ctx;
1410   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1411   offset = dissect_cmp_UnsupportedOIDsValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_UnsupportedOIDsValue_PDU);
1412   return offset;
1413 }
dissect_KeyPairParamReqValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1414 static int dissect_KeyPairParamReqValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1415   int offset = 0;
1416   asn1_ctx_t asn1_ctx;
1417   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1418   offset = dissect_cmp_KeyPairParamReqValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_KeyPairParamReqValue_PDU);
1419   return offset;
1420 }
dissect_KeyPairParamRepValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1421 static int dissect_KeyPairParamRepValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1422   int offset = 0;
1423   asn1_ctx_t asn1_ctx;
1424   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1425   offset = dissect_cmp_KeyPairParamRepValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_KeyPairParamRepValue_PDU);
1426   return offset;
1427 }
dissect_RevPassphraseValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1428 static int dissect_RevPassphraseValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1429   int offset = 0;
1430   asn1_ctx_t asn1_ctx;
1431   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1432   offset = dissect_cmp_RevPassphraseValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_RevPassphraseValue_PDU);
1433   return offset;
1434 }
dissect_ImplicitConfirmValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1435 static int dissect_ImplicitConfirmValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1436   int offset = 0;
1437   asn1_ctx_t asn1_ctx;
1438   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1439   offset = dissect_cmp_ImplicitConfirmValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_ImplicitConfirmValue_PDU);
1440   return offset;
1441 }
dissect_ConfirmWaitTimeValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1442 static int dissect_ConfirmWaitTimeValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1443   int offset = 0;
1444   asn1_ctx_t asn1_ctx;
1445   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1446   offset = dissect_cmp_ConfirmWaitTimeValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_ConfirmWaitTimeValue_PDU);
1447   return offset;
1448 }
dissect_OrigPKIMessageValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1449 static int dissect_OrigPKIMessageValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1450   int offset = 0;
1451   asn1_ctx_t asn1_ctx;
1452   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1453   offset = dissect_cmp_OrigPKIMessageValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_OrigPKIMessageValue_PDU);
1454   return offset;
1455 }
dissect_SuppLangTagsValue_PDU(tvbuff_t * tvb _U_,packet_info * pinfo _U_,proto_tree * tree _U_,void * data _U_)1456 static int dissect_SuppLangTagsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1457   int offset = 0;
1458   asn1_ctx_t asn1_ctx;
1459   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1460   offset = dissect_cmp_SuppLangTagsValue(FALSE, tvb, offset, &asn1_ctx, tree, hf_cmp_SuppLangTagsValue_PDU);
1461   return offset;
1462 }
1463 
1464 
1465 /*--- End of included file: packet-cmp-fn.c ---*/
1466 #line 61 "./asn1/cmp/packet-cmp-template.c"
1467 
1468 static int
dissect_cmp_pdu(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)1469 dissect_cmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
1470 {
1471 	asn1_ctx_t asn1_ctx;
1472 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1473 
1474 	return dissect_cmp_PKIMessage(FALSE, tvb, 0, &asn1_ctx, tree, -1);
1475 }
1476 
1477 #define CMP_TYPE_PKIMSG		0
1478 #define CMP_TYPE_POLLREP	1
1479 #define CMP_TYPE_POLLREQ	2
1480 #define CMP_TYPE_NEGPOLLREP	3
1481 #define CMP_TYPE_PARTIALMSGREP	4
1482 #define CMP_TYPE_FINALMSGREP	5
1483 #define CMP_TYPE_ERRORMSGREP	6
1484 static const value_string cmp_pdu_types[] = {
1485 	{ CMP_TYPE_PKIMSG,		"pkiMsg" },
1486 	{ CMP_TYPE_POLLREP,		"pollRep" },
1487 	{ CMP_TYPE_POLLREQ,		"pollReq" },
1488 	{ CMP_TYPE_NEGPOLLREP,		"negPollRep" },
1489 	{ CMP_TYPE_PARTIALMSGREP,	"partialMsgRep" },
1490 	{ CMP_TYPE_FINALMSGREP,		"finalMsgRep" },
1491 	{ CMP_TYPE_ERRORMSGREP,		"errorMsgRep" },
1492 	{ 0, NULL },
1493 };
1494 
1495 
dissect_cmp_tcp_pdu(tvbuff_t * tvb,packet_info * pinfo,proto_tree * parent_tree,void * data _U_)1496 static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
1497 {
1498 	tvbuff_t   *next_tvb;
1499 	guint32    pdu_len;
1500 	guint8     pdu_type;
1501 	proto_item *item=NULL;
1502 	proto_item *ti=NULL;
1503 	proto_tree *tree=NULL;
1504 	proto_tree *tcptrans_tree=NULL;
1505 	int offset=0;
1506 
1507 	col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1508 	col_set_str(pinfo->cinfo, COL_INFO, "PKIXCMP");
1509 
1510 	if(parent_tree){
1511 		item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, ENC_NA);
1512 		tree = proto_item_add_subtree(item, ett_cmp);
1513 	}
1514 
1515 	pdu_len=tvb_get_ntohl(tvb, 0);
1516 	pdu_type=tvb_get_guint8(tvb, 4);
1517 
1518 	if (pdu_type < 10) {
1519 		/* RFC2510 TCP transport */
1520 		ti = proto_tree_add_item(tree, proto_cmp, tvb, offset, 5, ENC_NA);
1521 		tcptrans_tree = proto_item_add_subtree(ti, ett_cmp);
1522 		proto_tree_add_item(tree, hf_cmp_tcptrans_len, tvb, offset, 4, ENC_BIG_ENDIAN);
1523 		offset += 4;
1524 		proto_tree_add_item(tree, hf_cmp_tcptrans_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
1525 	} else {
1526 		/* post RFC2510 TCP transport - the former "type" field is now "version" */
1527 		tcptrans_tree = proto_tree_add_subtree(tree, tvb, offset, 7, ett_cmp, NULL, "TCP transport");
1528 		pdu_type=tvb_get_guint8(tvb, 6);
1529 		proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_len, tvb, offset, 4, ENC_BIG_ENDIAN);
1530 		offset += 4;
1531 		proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans10_version, tvb, offset++, 1, ENC_BIG_ENDIAN);
1532 		proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans10_flags, tvb, offset++, 1, ENC_BIG_ENDIAN);
1533 		proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
1534 	}
1535 
1536 	col_add_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x"));
1537 
1538 	switch(pdu_type){
1539 		case CMP_TYPE_PKIMSG:
1540 			next_tvb = tvb_new_subset_length_caplen(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
1541 			dissect_cmp_pdu(next_tvb, pinfo, tree, NULL);
1542 			offset += tvb_reported_length_remaining(tvb, offset);
1543 			break;
1544 		case CMP_TYPE_POLLREP:
1545 			proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
1546 			offset += 4;
1547 
1548 			proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, ENC_TIME_SECS|ENC_BIG_ENDIAN);
1549 			offset += 4;
1550 			break;
1551 		case CMP_TYPE_POLLREQ:
1552 			proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
1553 			offset += 4;
1554 			break;
1555 		case CMP_TYPE_NEGPOLLREP:
1556 			break;
1557 		case CMP_TYPE_PARTIALMSGREP:
1558 			proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_next_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
1559 			offset += 4;
1560 
1561 			proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, ENC_TIME_SECS|ENC_BIG_ENDIAN);
1562 			offset += 4;
1563 
1564 			next_tvb = tvb_new_subset_length_caplen(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
1565 			dissect_cmp_pdu(next_tvb, pinfo, tree, NULL);
1566 			offset += tvb_reported_length_remaining(tvb, offset);
1567 			break;
1568 		case CMP_TYPE_FINALMSGREP:
1569 			next_tvb = tvb_new_subset_length_caplen(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
1570 			dissect_cmp_pdu(next_tvb, pinfo, tree, NULL);
1571 			offset += tvb_reported_length_remaining(tvb, offset);
1572 			break;
1573 		case CMP_TYPE_ERRORMSGREP:
1574 			/*XXX to be added*/
1575 			break;
1576 	}
1577 
1578 	return offset;
1579 }
1580 
get_cmp_pdu_len(packet_info * pinfo _U_,tvbuff_t * tvb,int offset,void * data _U_)1581 static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
1582                              int offset, void *data _U_)
1583 {
1584 	guint32 plen;
1585 
1586 	/*
1587 	 * Get the length of the CMP-over-TCP packet.
1588 	 */
1589 	plen = tvb_get_ntohl(tvb, offset);
1590 
1591 	return plen+4;
1592 }
1593 
1594 
1595 /* CMP over TCP: RFC2510 section 5.2 and "Transport Protocols for CMP" draft */
1596 static int
dissect_cmp_tcp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * parent_tree,void * data)1597 dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
1598 {
1599 	guint32 pdu_len;
1600 	guint8 pdu_type;
1601 	int offset=4; /* RFC2510 TCP transport header length */
1602 
1603 	/* only attempt to dissect it as CMP over TCP if we have
1604 	 * at least 5 bytes.
1605 	 */
1606 	if (!tvb_bytes_exist(tvb, 0, 5)) {
1607 		return 0;
1608 	}
1609 
1610 	pdu_len=tvb_get_ntohl(tvb, 0);
1611 	pdu_type=tvb_get_guint8(tvb, 4);
1612 
1613 	if(pdu_type == 10) {
1614 		/* post RFC2510 TCP transport */
1615 		pdu_type = tvb_get_guint8(tvb, 7);
1616 		offset = 7; /* post RFC2510 TCP transport header length */
1617 		/* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1618 		 * in size.
1619 		 * It is definitely at least 3 byte for post RFC2510 TCP transport
1620 		 */
1621 		if((pdu_len<=2)||(pdu_len>10000)){
1622 			return 0;
1623 		}
1624 	} else {
1625 		/* RFC2510 TCP transport */
1626 		/* type is between 0 and 6 */
1627 		if(pdu_type>6){
1628 			return 0;
1629 		}
1630 		/* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1631 		 * in size.
1632 		 * It is definitely at least 1 byte to accommodate the flags byte
1633 		 */
1634 		if((pdu_len<=0)||(pdu_len>10000)){
1635 			return 0;
1636 		}
1637 	}
1638 
1639 	/* type 0 contains a PKI message and must therefore be >= 3 bytes
1640 	 * long (flags + BER TAG + BER LENGTH
1641 	 */
1642 	if((pdu_type==0)&&(pdu_len<3)){
1643 		return 0;
1644 	}
1645 
1646 	tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, offset, get_cmp_pdu_len,
1647 			dissect_cmp_tcp_pdu, data);
1648 
1649 	return tvb_captured_length(tvb);
1650 }
1651 
1652 
1653 static int
dissect_cmp_http(tvbuff_t * tvb,packet_info * pinfo,proto_tree * parent_tree,void * data _U_)1654 dissect_cmp_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
1655 {
1656 	proto_item *item=NULL;
1657 	proto_tree *tree=NULL;
1658 
1659 	col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1660 	col_set_str(pinfo->cinfo, COL_INFO, "PKIXCMP");
1661 
1662 	if(parent_tree){
1663 		item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, ENC_NA);
1664 		tree = proto_item_add_subtree(item, ett_cmp);
1665 	}
1666 
1667 	return dissect_cmp_pdu(tvb, pinfo, tree, NULL);
1668 }
1669 
1670 
1671 /*--- proto_register_cmp ----------------------------------------------*/
proto_register_cmp(void)1672 void proto_register_cmp(void) {
1673 
1674 	/* List of fields */
1675 	static hf_register_info hf[] = {
1676 		{ &hf_cmp_type_oid,
1677 			{ "InfoType", "cmp.type.oid",
1678 				FT_STRING, BASE_NONE, NULL, 0,
1679 				"Type of InfoTypeAndValue", HFILL }},
1680 		{ &hf_cmp_tcptrans_len,
1681 			{ "Length", "cmp.tcptrans.length",
1682 				FT_UINT32, BASE_DEC, NULL, 0,
1683 				"TCP transport Length of PDU in bytes", HFILL }},
1684 		{ &hf_cmp_tcptrans_type,
1685 			{ "Type", "cmp.tcptrans.type",
1686 				FT_UINT8, BASE_DEC, VALS(cmp_pdu_types), 0,
1687 				"TCP transport PDU Type", HFILL }},
1688 		{ &hf_cmp_tcptrans_poll_ref,
1689 			{ "Polling Reference", "cmp.tcptrans.poll_ref",
1690 				FT_UINT32, BASE_HEX, NULL, 0,
1691 				"TCP transport Polling Reference", HFILL }},
1692 		{ &hf_cmp_tcptrans_next_poll_ref,
1693 			{ "Next Polling Reference", "cmp.tcptrans.next_poll_ref",
1694 				FT_UINT32, BASE_HEX, NULL, 0,
1695 				"TCP transport Next Polling Reference", HFILL }},
1696 		{ &hf_cmp_tcptrans_ttcb,
1697 			{ "Time to check Back", "cmp.tcptrans.ttcb",
1698 				FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
1699 				"TCP transport Time to check Back", HFILL }},
1700 		{ &hf_cmp_tcptrans10_version,
1701 			{ "Version", "cmp.tcptrans10.version",
1702 				FT_UINT8, BASE_DEC, NULL, 0,
1703 				"TCP transport version", HFILL }},
1704 		{ &hf_cmp_tcptrans10_flags,
1705 			{ "Flags", "cmp.tcptrans10.flags",
1706 				FT_UINT8, BASE_DEC, NULL, 0,
1707 				"TCP transport flags", HFILL }},
1708 
1709 /*--- Included file: packet-cmp-hfarr.c ---*/
1710 #line 1 "./asn1/cmp/packet-cmp-hfarr.c"
1711     { &hf_cmp_PBMParameter_PDU,
1712       { "PBMParameter", "cmp.PBMParameter_element",
1713         FT_NONE, BASE_NONE, NULL, 0,
1714         NULL, HFILL }},
1715     { &hf_cmp_DHBMParameter_PDU,
1716       { "DHBMParameter", "cmp.DHBMParameter_element",
1717         FT_NONE, BASE_NONE, NULL, 0,
1718         NULL, HFILL }},
1719     { &hf_cmp_CAProtEncCertValue_PDU,
1720       { "CAProtEncCertValue", "cmp.CAProtEncCertValue",
1721         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1722         NULL, HFILL }},
1723     { &hf_cmp_SignKeyPairTypesValue_PDU,
1724       { "SignKeyPairTypesValue", "cmp.SignKeyPairTypesValue",
1725         FT_UINT32, BASE_DEC, NULL, 0,
1726         NULL, HFILL }},
1727     { &hf_cmp_EncKeyPairTypesValue_PDU,
1728       { "EncKeyPairTypesValue", "cmp.EncKeyPairTypesValue",
1729         FT_UINT32, BASE_DEC, NULL, 0,
1730         NULL, HFILL }},
1731     { &hf_cmp_PreferredSymmAlgValue_PDU,
1732       { "PreferredSymmAlgValue", "cmp.PreferredSymmAlgValue_element",
1733         FT_NONE, BASE_NONE, NULL, 0,
1734         NULL, HFILL }},
1735     { &hf_cmp_CAKeyUpdateInfoValue_PDU,
1736       { "CAKeyUpdateInfoValue", "cmp.CAKeyUpdateInfoValue_element",
1737         FT_NONE, BASE_NONE, NULL, 0,
1738         NULL, HFILL }},
1739     { &hf_cmp_CurrentCRLValue_PDU,
1740       { "CurrentCRLValue", "cmp.CurrentCRLValue_element",
1741         FT_NONE, BASE_NONE, NULL, 0,
1742         NULL, HFILL }},
1743     { &hf_cmp_UnsupportedOIDsValue_PDU,
1744       { "UnsupportedOIDsValue", "cmp.UnsupportedOIDsValue",
1745         FT_UINT32, BASE_DEC, NULL, 0,
1746         NULL, HFILL }},
1747     { &hf_cmp_KeyPairParamReqValue_PDU,
1748       { "KeyPairParamReqValue", "cmp.KeyPairParamReqValue",
1749         FT_OID, BASE_NONE, NULL, 0,
1750         NULL, HFILL }},
1751     { &hf_cmp_KeyPairParamRepValue_PDU,
1752       { "KeyPairParamRepValue", "cmp.KeyPairParamRepValue_element",
1753         FT_NONE, BASE_NONE, NULL, 0,
1754         NULL, HFILL }},
1755     { &hf_cmp_RevPassphraseValue_PDU,
1756       { "RevPassphraseValue", "cmp.RevPassphraseValue_element",
1757         FT_NONE, BASE_NONE, NULL, 0,
1758         NULL, HFILL }},
1759     { &hf_cmp_ImplicitConfirmValue_PDU,
1760       { "ImplicitConfirmValue", "cmp.ImplicitConfirmValue_element",
1761         FT_NONE, BASE_NONE, NULL, 0,
1762         NULL, HFILL }},
1763     { &hf_cmp_ConfirmWaitTimeValue_PDU,
1764       { "ConfirmWaitTimeValue", "cmp.ConfirmWaitTimeValue",
1765         FT_STRING, BASE_NONE, NULL, 0,
1766         NULL, HFILL }},
1767     { &hf_cmp_OrigPKIMessageValue_PDU,
1768       { "OrigPKIMessageValue", "cmp.OrigPKIMessageValue",
1769         FT_UINT32, BASE_DEC, NULL, 0,
1770         NULL, HFILL }},
1771     { &hf_cmp_SuppLangTagsValue_PDU,
1772       { "SuppLangTagsValue", "cmp.SuppLangTagsValue",
1773         FT_UINT32, BASE_DEC, NULL, 0,
1774         NULL, HFILL }},
1775     { &hf_cmp_x509v3PKCert,
1776       { "x509v3PKCert", "cmp.x509v3PKCert_element",
1777         FT_NONE, BASE_NONE, NULL, 0,
1778         "Certificate", HFILL }},
1779     { &hf_cmp_header,
1780       { "header", "cmp.header_element",
1781         FT_NONE, BASE_NONE, NULL, 0,
1782         "PKIHeader", HFILL }},
1783     { &hf_cmp_body,
1784       { "body", "cmp.body",
1785         FT_UINT32, BASE_DEC, VALS(cmp_PKIBody_vals), 0,
1786         "PKIBody", HFILL }},
1787     { &hf_cmp_protection,
1788       { "protection", "cmp.protection",
1789         FT_BYTES, BASE_NONE, NULL, 0,
1790         "PKIProtection", HFILL }},
1791     { &hf_cmp_extraCerts,
1792       { "extraCerts", "cmp.extraCerts",
1793         FT_UINT32, BASE_DEC, NULL, 0,
1794         "SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
1795     { &hf_cmp_extraCerts_item,
1796       { "CMPCertificate", "cmp.CMPCertificate",
1797         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1798         NULL, HFILL }},
1799     { &hf_cmp_PKIMessages_item,
1800       { "PKIMessage", "cmp.PKIMessage_element",
1801         FT_NONE, BASE_NONE, NULL, 0,
1802         NULL, HFILL }},
1803     { &hf_cmp_pvno,
1804       { "pvno", "cmp.pvno",
1805         FT_INT32, BASE_DEC, VALS(cmp_T_pvno_vals), 0,
1806         NULL, HFILL }},
1807     { &hf_cmp_sender,
1808       { "sender", "cmp.sender",
1809         FT_UINT32, BASE_DEC, NULL, 0,
1810         "GeneralName", HFILL }},
1811     { &hf_cmp_recipient,
1812       { "recipient", "cmp.recipient",
1813         FT_UINT32, BASE_DEC, NULL, 0,
1814         "GeneralName", HFILL }},
1815     { &hf_cmp_messageTime,
1816       { "messageTime", "cmp.messageTime",
1817         FT_STRING, BASE_NONE, NULL, 0,
1818         "GeneralizedTime", HFILL }},
1819     { &hf_cmp_protectionAlg,
1820       { "protectionAlg", "cmp.protectionAlg_element",
1821         FT_NONE, BASE_NONE, NULL, 0,
1822         "AlgorithmIdentifier", HFILL }},
1823     { &hf_cmp_senderKID,
1824       { "senderKID", "cmp.senderKID",
1825         FT_BYTES, BASE_NONE, NULL, 0,
1826         "KeyIdentifier", HFILL }},
1827     { &hf_cmp_recipKID,
1828       { "recipKID", "cmp.recipKID",
1829         FT_BYTES, BASE_NONE, NULL, 0,
1830         "KeyIdentifier", HFILL }},
1831     { &hf_cmp_transactionID,
1832       { "transactionID", "cmp.transactionID",
1833         FT_BYTES, BASE_NONE, NULL, 0,
1834         "OCTET_STRING", HFILL }},
1835     { &hf_cmp_senderNonce,
1836       { "senderNonce", "cmp.senderNonce",
1837         FT_BYTES, BASE_NONE, NULL, 0,
1838         "OCTET_STRING", HFILL }},
1839     { &hf_cmp_recipNonce,
1840       { "recipNonce", "cmp.recipNonce",
1841         FT_BYTES, BASE_NONE, NULL, 0,
1842         "OCTET_STRING", HFILL }},
1843     { &hf_cmp_freeText,
1844       { "freeText", "cmp.freeText",
1845         FT_UINT32, BASE_DEC, NULL, 0,
1846         "PKIFreeText", HFILL }},
1847     { &hf_cmp_generalInfo,
1848       { "generalInfo", "cmp.generalInfo",
1849         FT_UINT32, BASE_DEC, NULL, 0,
1850         "SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue", HFILL }},
1851     { &hf_cmp_generalInfo_item,
1852       { "InfoTypeAndValue", "cmp.InfoTypeAndValue_element",
1853         FT_NONE, BASE_NONE, NULL, 0,
1854         NULL, HFILL }},
1855     { &hf_cmp_PKIFreeText_item,
1856       { "PKIFreeText item", "cmp.PKIFreeText_item",
1857         FT_STRING, BASE_NONE, NULL, 0,
1858         "UTF8String", HFILL }},
1859     { &hf_cmp_ir,
1860       { "ir", "cmp.ir",
1861         FT_UINT32, BASE_DEC, NULL, 0,
1862         "CertReqMessages", HFILL }},
1863     { &hf_cmp_ip,
1864       { "ip", "cmp.ip_element",
1865         FT_NONE, BASE_NONE, NULL, 0,
1866         "CertRepMessage", HFILL }},
1867     { &hf_cmp_cr,
1868       { "cr", "cmp.cr",
1869         FT_UINT32, BASE_DEC, NULL, 0,
1870         "CertReqMessages", HFILL }},
1871     { &hf_cmp_cp,
1872       { "cp", "cmp.cp_element",
1873         FT_NONE, BASE_NONE, NULL, 0,
1874         "CertRepMessage", HFILL }},
1875     { &hf_cmp_p10cr,
1876       { "p10cr", "cmp.p10cr_element",
1877         FT_NONE, BASE_NONE, NULL, 0,
1878         "CertificationRequest", HFILL }},
1879     { &hf_cmp_popdecc,
1880       { "popdecc", "cmp.popdecc",
1881         FT_UINT32, BASE_DEC, NULL, 0,
1882         "POPODecKeyChallContent", HFILL }},
1883     { &hf_cmp_popdecr,
1884       { "popdecr", "cmp.popdecr",
1885         FT_UINT32, BASE_DEC, NULL, 0,
1886         "POPODecKeyRespContent", HFILL }},
1887     { &hf_cmp_kur,
1888       { "kur", "cmp.kur",
1889         FT_UINT32, BASE_DEC, NULL, 0,
1890         "CertReqMessages", HFILL }},
1891     { &hf_cmp_kup,
1892       { "kup", "cmp.kup_element",
1893         FT_NONE, BASE_NONE, NULL, 0,
1894         "CertRepMessage", HFILL }},
1895     { &hf_cmp_krr,
1896       { "krr", "cmp.krr",
1897         FT_UINT32, BASE_DEC, NULL, 0,
1898         "CertReqMessages", HFILL }},
1899     { &hf_cmp_krp,
1900       { "krp", "cmp.krp_element",
1901         FT_NONE, BASE_NONE, NULL, 0,
1902         "KeyRecRepContent", HFILL }},
1903     { &hf_cmp_rr,
1904       { "rr", "cmp.rr",
1905         FT_UINT32, BASE_DEC, NULL, 0,
1906         "RevReqContent", HFILL }},
1907     { &hf_cmp_rp,
1908       { "rp", "cmp.rp_element",
1909         FT_NONE, BASE_NONE, NULL, 0,
1910         "RevRepContent", HFILL }},
1911     { &hf_cmp_ccr,
1912       { "ccr", "cmp.ccr",
1913         FT_UINT32, BASE_DEC, NULL, 0,
1914         "CertReqMessages", HFILL }},
1915     { &hf_cmp_ccp,
1916       { "ccp", "cmp.ccp_element",
1917         FT_NONE, BASE_NONE, NULL, 0,
1918         "CertRepMessage", HFILL }},
1919     { &hf_cmp_ckuann,
1920       { "ckuann", "cmp.ckuann_element",
1921         FT_NONE, BASE_NONE, NULL, 0,
1922         "CAKeyUpdAnnContent", HFILL }},
1923     { &hf_cmp_cann,
1924       { "cann", "cmp.cann",
1925         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1926         "CertAnnContent", HFILL }},
1927     { &hf_cmp_rann,
1928       { "rann", "cmp.rann_element",
1929         FT_NONE, BASE_NONE, NULL, 0,
1930         "RevAnnContent", HFILL }},
1931     { &hf_cmp_crlann,
1932       { "crlann", "cmp.crlann",
1933         FT_UINT32, BASE_DEC, NULL, 0,
1934         "CRLAnnContent", HFILL }},
1935     { &hf_cmp_pkiconf,
1936       { "pkiconf", "cmp.pkiconf_element",
1937         FT_NONE, BASE_NONE, NULL, 0,
1938         "PKIConfirmContent", HFILL }},
1939     { &hf_cmp_nested,
1940       { "nested", "cmp.nested",
1941         FT_UINT32, BASE_DEC, NULL, 0,
1942         "NestedMessageContent", HFILL }},
1943     { &hf_cmp_genm,
1944       { "genm", "cmp.genm",
1945         FT_UINT32, BASE_DEC, NULL, 0,
1946         "GenMsgContent", HFILL }},
1947     { &hf_cmp_genp,
1948       { "genp", "cmp.genp",
1949         FT_UINT32, BASE_DEC, NULL, 0,
1950         "GenRepContent", HFILL }},
1951     { &hf_cmp_error,
1952       { "error", "cmp.error_element",
1953         FT_NONE, BASE_NONE, NULL, 0,
1954         "ErrorMsgContent", HFILL }},
1955     { &hf_cmp_certConf,
1956       { "certConf", "cmp.certConf",
1957         FT_UINT32, BASE_DEC, NULL, 0,
1958         "CertConfirmContent", HFILL }},
1959     { &hf_cmp_pollReq,
1960       { "pollReq", "cmp.pollReq",
1961         FT_UINT32, BASE_DEC, NULL, 0,
1962         "PollReqContent", HFILL }},
1963     { &hf_cmp_pollRep,
1964       { "pollRep", "cmp.pollRep",
1965         FT_UINT32, BASE_DEC, NULL, 0,
1966         "PollRepContent", HFILL }},
1967     { &hf_cmp_salt,
1968       { "salt", "cmp.salt",
1969         FT_BYTES, BASE_NONE, NULL, 0,
1970         "OCTET_STRING", HFILL }},
1971     { &hf_cmp_owf,
1972       { "owf", "cmp.owf_element",
1973         FT_NONE, BASE_NONE, NULL, 0,
1974         "AlgorithmIdentifier", HFILL }},
1975     { &hf_cmp_iterationCount,
1976       { "iterationCount", "cmp.iterationCount",
1977         FT_INT32, BASE_DEC, NULL, 0,
1978         "INTEGER", HFILL }},
1979     { &hf_cmp_mac,
1980       { "mac", "cmp.mac_element",
1981         FT_NONE, BASE_NONE, NULL, 0,
1982         "AlgorithmIdentifier", HFILL }},
1983     { &hf_cmp_pkistatus,
1984       { "status", "cmp.pkistatus",
1985         FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
1986         "PKIStatus", HFILL }},
1987     { &hf_cmp_statusString,
1988       { "statusString", "cmp.statusString",
1989         FT_UINT32, BASE_DEC, NULL, 0,
1990         "PKIFreeText", HFILL }},
1991     { &hf_cmp_failInfo,
1992       { "failInfo", "cmp.failInfo",
1993         FT_BYTES, BASE_NONE, NULL, 0,
1994         "PKIFailureInfo", HFILL }},
1995     { &hf_cmp_hashAlg,
1996       { "hashAlg", "cmp.hashAlg_element",
1997         FT_NONE, BASE_NONE, NULL, 0,
1998         "AlgorithmIdentifier", HFILL }},
1999     { &hf_cmp_certId,
2000       { "certId", "cmp.certId_element",
2001         FT_NONE, BASE_NONE, NULL, 0,
2002         NULL, HFILL }},
2003     { &hf_cmp_hashVal,
2004       { "hashVal", "cmp.hashVal",
2005         FT_BYTES, BASE_NONE, NULL, 0,
2006         "BIT_STRING", HFILL }},
2007     { &hf_cmp_POPODecKeyChallContent_item,
2008       { "Challenge", "cmp.Challenge_element",
2009         FT_NONE, BASE_NONE, NULL, 0,
2010         NULL, HFILL }},
2011     { &hf_cmp_witness,
2012       { "witness", "cmp.witness",
2013         FT_BYTES, BASE_NONE, NULL, 0,
2014         "OCTET_STRING", HFILL }},
2015     { &hf_cmp_challenge,
2016       { "challenge", "cmp.challenge",
2017         FT_BYTES, BASE_NONE, NULL, 0,
2018         "OCTET_STRING", HFILL }},
2019     { &hf_cmp_POPODecKeyRespContent_item,
2020       { "POPODecKeyRespContent item", "cmp.POPODecKeyRespContent_item",
2021         FT_INT32, BASE_DEC, NULL, 0,
2022         "INTEGER", HFILL }},
2023     { &hf_cmp_caPubs,
2024       { "caPubs", "cmp.caPubs",
2025         FT_UINT32, BASE_DEC, NULL, 0,
2026         "SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
2027     { &hf_cmp_caPubs_item,
2028       { "CMPCertificate", "cmp.CMPCertificate",
2029         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2030         NULL, HFILL }},
2031     { &hf_cmp_response,
2032       { "response", "cmp.response",
2033         FT_UINT32, BASE_DEC, NULL, 0,
2034         "SEQUENCE_OF_CertResponse", HFILL }},
2035     { &hf_cmp_response_item,
2036       { "CertResponse", "cmp.CertResponse_element",
2037         FT_NONE, BASE_NONE, NULL, 0,
2038         NULL, HFILL }},
2039     { &hf_cmp_certReqId,
2040       { "certReqId", "cmp.certReqId",
2041         FT_INT32, BASE_DEC, NULL, 0,
2042         "INTEGER", HFILL }},
2043     { &hf_cmp_pkistatusinf,
2044       { "status", "cmp.status_element",
2045         FT_NONE, BASE_NONE, NULL, 0,
2046         "PKIStatusInfo", HFILL }},
2047     { &hf_cmp_certifiedKeyPair,
2048       { "certifiedKeyPair", "cmp.certifiedKeyPair_element",
2049         FT_NONE, BASE_NONE, NULL, 0,
2050         NULL, HFILL }},
2051     { &hf_cmp_rspInfo,
2052       { "rspInfo", "cmp.rspInfo",
2053         FT_BYTES, BASE_NONE, NULL, 0,
2054         "OCTET_STRING", HFILL }},
2055     { &hf_cmp_certOrEncCert,
2056       { "certOrEncCert", "cmp.certOrEncCert",
2057         FT_UINT32, BASE_DEC, VALS(cmp_CertOrEncCert_vals), 0,
2058         NULL, HFILL }},
2059     { &hf_cmp_privateKey,
2060       { "privateKey", "cmp.privateKey_element",
2061         FT_NONE, BASE_NONE, NULL, 0,
2062         "EncryptedValue", HFILL }},
2063     { &hf_cmp_publicationInfo,
2064       { "publicationInfo", "cmp.publicationInfo_element",
2065         FT_NONE, BASE_NONE, NULL, 0,
2066         "PKIPublicationInfo", HFILL }},
2067     { &hf_cmp_certificate,
2068       { "certificate", "cmp.certificate",
2069         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2070         "CMPCertificate", HFILL }},
2071     { &hf_cmp_encryptedCert,
2072       { "encryptedCert", "cmp.encryptedCert_element",
2073         FT_NONE, BASE_NONE, NULL, 0,
2074         "EncryptedValue", HFILL }},
2075     { &hf_cmp_newSigCert,
2076       { "newSigCert", "cmp.newSigCert",
2077         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2078         "CMPCertificate", HFILL }},
2079     { &hf_cmp_caCerts,
2080       { "caCerts", "cmp.caCerts",
2081         FT_UINT32, BASE_DEC, NULL, 0,
2082         "SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
2083     { &hf_cmp_caCerts_item,
2084       { "CMPCertificate", "cmp.CMPCertificate",
2085         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2086         NULL, HFILL }},
2087     { &hf_cmp_keyPairHist,
2088       { "keyPairHist", "cmp.keyPairHist",
2089         FT_UINT32, BASE_DEC, NULL, 0,
2090         "SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair", HFILL }},
2091     { &hf_cmp_keyPairHist_item,
2092       { "CertifiedKeyPair", "cmp.CertifiedKeyPair_element",
2093         FT_NONE, BASE_NONE, NULL, 0,
2094         NULL, HFILL }},
2095     { &hf_cmp_RevReqContent_item,
2096       { "RevDetails", "cmp.RevDetails_element",
2097         FT_NONE, BASE_NONE, NULL, 0,
2098         NULL, HFILL }},
2099     { &hf_cmp_certDetails,
2100       { "certDetails", "cmp.certDetails_element",
2101         FT_NONE, BASE_NONE, NULL, 0,
2102         "CertTemplate", HFILL }},
2103     { &hf_cmp_crlEntryDetails,
2104       { "crlEntryDetails", "cmp.crlEntryDetails",
2105         FT_UINT32, BASE_DEC, NULL, 0,
2106         "Extensions", HFILL }},
2107     { &hf_cmp_rvrpcnt_status,
2108       { "status", "cmp.rvrpcnt_status",
2109         FT_UINT32, BASE_DEC, NULL, 0,
2110         "SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo", HFILL }},
2111     { &hf_cmp_rvrpcnt_status_item,
2112       { "PKIStatusInfo", "cmp.PKIStatusInfo_element",
2113         FT_NONE, BASE_NONE, NULL, 0,
2114         NULL, HFILL }},
2115     { &hf_cmp_revCerts,
2116       { "revCerts", "cmp.revCerts",
2117         FT_UINT32, BASE_DEC, NULL, 0,
2118         "SEQUENCE_SIZE_1_MAX_OF_CertId", HFILL }},
2119     { &hf_cmp_revCerts_item,
2120       { "CertId", "cmp.CertId_element",
2121         FT_NONE, BASE_NONE, NULL, 0,
2122         NULL, HFILL }},
2123     { &hf_cmp_crls,
2124       { "crls", "cmp.crls",
2125         FT_UINT32, BASE_DEC, NULL, 0,
2126         "SEQUENCE_SIZE_1_MAX_OF_CertificateList", HFILL }},
2127     { &hf_cmp_crls_item,
2128       { "CertificateList", "cmp.CertificateList_element",
2129         FT_NONE, BASE_NONE, NULL, 0,
2130         NULL, HFILL }},
2131     { &hf_cmp_oldWithNew,
2132       { "oldWithNew", "cmp.oldWithNew",
2133         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2134         "CMPCertificate", HFILL }},
2135     { &hf_cmp_newWithOld,
2136       { "newWithOld", "cmp.newWithOld",
2137         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2138         "CMPCertificate", HFILL }},
2139     { &hf_cmp_newWithNew,
2140       { "newWithNew", "cmp.newWithNew",
2141         FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2142         "CMPCertificate", HFILL }},
2143     { &hf_cmp_pkistatus_01,
2144       { "status", "cmp.status",
2145         FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
2146         "PKIStatus", HFILL }},
2147     { &hf_cmp_willBeRevokedAt,
2148       { "willBeRevokedAt", "cmp.willBeRevokedAt",
2149         FT_STRING, BASE_NONE, NULL, 0,
2150         "GeneralizedTime", HFILL }},
2151     { &hf_cmp_badSinceDate,
2152       { "badSinceDate", "cmp.badSinceDate",
2153         FT_STRING, BASE_NONE, NULL, 0,
2154         "GeneralizedTime", HFILL }},
2155     { &hf_cmp_crlDetails,
2156       { "crlDetails", "cmp.crlDetails",
2157         FT_UINT32, BASE_DEC, NULL, 0,
2158         "Extensions", HFILL }},
2159     { &hf_cmp_CRLAnnContent_item,
2160       { "CertificateList", "cmp.CertificateList_element",
2161         FT_NONE, BASE_NONE, NULL, 0,
2162         NULL, HFILL }},
2163     { &hf_cmp_CertConfirmContent_item,
2164       { "CertStatus", "cmp.CertStatus_element",
2165         FT_NONE, BASE_NONE, NULL, 0,
2166         NULL, HFILL }},
2167     { &hf_cmp_certHash,
2168       { "certHash", "cmp.certHash",
2169         FT_BYTES, BASE_NONE, NULL, 0,
2170         "OCTET_STRING", HFILL }},
2171     { &hf_cmp_statusInfo,
2172       { "statusInfo", "cmp.statusInfo_element",
2173         FT_NONE, BASE_NONE, NULL, 0,
2174         "PKIStatusInfo", HFILL }},
2175     { &hf_cmp_infoType,
2176       { "infoType", "cmp.infoType",
2177         FT_OID, BASE_NONE, NULL, 0,
2178         NULL, HFILL }},
2179     { &hf_cmp_infoValue,
2180       { "infoValue", "cmp.infoValue_element",
2181         FT_NONE, BASE_NONE, NULL, 0,
2182         NULL, HFILL }},
2183     { &hf_cmp_SignKeyPairTypesValue_item,
2184       { "AlgorithmIdentifier", "cmp.AlgorithmIdentifier_element",
2185         FT_NONE, BASE_NONE, NULL, 0,
2186         NULL, HFILL }},
2187     { &hf_cmp_EncKeyPairTypesValue_item,
2188       { "AlgorithmIdentifier", "cmp.AlgorithmIdentifier_element",
2189         FT_NONE, BASE_NONE, NULL, 0,
2190         NULL, HFILL }},
2191     { &hf_cmp_UnsupportedOIDsValue_item,
2192       { "UnsupportedOIDsValue item", "cmp.UnsupportedOIDsValue_item",
2193         FT_OID, BASE_NONE, NULL, 0,
2194         "OBJECT_IDENTIFIER", HFILL }},
2195     { &hf_cmp_SuppLangTagsValue_item,
2196       { "SuppLangTagsValue item", "cmp.SuppLangTagsValue_item",
2197         FT_STRING, BASE_NONE, NULL, 0,
2198         "UTF8String", HFILL }},
2199     { &hf_cmp_GenMsgContent_item,
2200       { "InfoTypeAndValue", "cmp.InfoTypeAndValue_element",
2201         FT_NONE, BASE_NONE, NULL, 0,
2202         NULL, HFILL }},
2203     { &hf_cmp_GenRepContent_item,
2204       { "InfoTypeAndValue", "cmp.InfoTypeAndValue_element",
2205         FT_NONE, BASE_NONE, NULL, 0,
2206         NULL, HFILL }},
2207     { &hf_cmp_pKIStatusInfo,
2208       { "pKIStatusInfo", "cmp.pKIStatusInfo_element",
2209         FT_NONE, BASE_NONE, NULL, 0,
2210         NULL, HFILL }},
2211     { &hf_cmp_errorCode,
2212       { "errorCode", "cmp.errorCode",
2213         FT_INT32, BASE_DEC, NULL, 0,
2214         "INTEGER", HFILL }},
2215     { &hf_cmp_errorDetails,
2216       { "errorDetails", "cmp.errorDetails",
2217         FT_UINT32, BASE_DEC, NULL, 0,
2218         "PKIFreeText", HFILL }},
2219     { &hf_cmp_PollReqContent_item,
2220       { "PollReqContent item", "cmp.PollReqContent_item_element",
2221         FT_NONE, BASE_NONE, NULL, 0,
2222         NULL, HFILL }},
2223     { &hf_cmp_PollRepContent_item,
2224       { "PollRepContent item", "cmp.PollRepContent_item_element",
2225         FT_NONE, BASE_NONE, NULL, 0,
2226         NULL, HFILL }},
2227     { &hf_cmp_checkAfter,
2228       { "checkAfter", "cmp.checkAfter",
2229         FT_INT32, BASE_DEC, NULL, 0,
2230         "INTEGER", HFILL }},
2231     { &hf_cmp_reason,
2232       { "reason", "cmp.reason",
2233         FT_UINT32, BASE_DEC, NULL, 0,
2234         "PKIFreeText", HFILL }},
2235     { &hf_cmp_PKIFailureInfo_badAlg,
2236       { "badAlg", "cmp.PKIFailureInfo.badAlg",
2237         FT_BOOLEAN, 8, NULL, 0x80,
2238         NULL, HFILL }},
2239     { &hf_cmp_PKIFailureInfo_badMessageCheck,
2240       { "badMessageCheck", "cmp.PKIFailureInfo.badMessageCheck",
2241         FT_BOOLEAN, 8, NULL, 0x40,
2242         NULL, HFILL }},
2243     { &hf_cmp_PKIFailureInfo_badRequest,
2244       { "badRequest", "cmp.PKIFailureInfo.badRequest",
2245         FT_BOOLEAN, 8, NULL, 0x20,
2246         NULL, HFILL }},
2247     { &hf_cmp_PKIFailureInfo_badTime,
2248       { "badTime", "cmp.PKIFailureInfo.badTime",
2249         FT_BOOLEAN, 8, NULL, 0x10,
2250         NULL, HFILL }},
2251     { &hf_cmp_PKIFailureInfo_badCertId,
2252       { "badCertId", "cmp.PKIFailureInfo.badCertId",
2253         FT_BOOLEAN, 8, NULL, 0x08,
2254         NULL, HFILL }},
2255     { &hf_cmp_PKIFailureInfo_badDataFormat,
2256       { "badDataFormat", "cmp.PKIFailureInfo.badDataFormat",
2257         FT_BOOLEAN, 8, NULL, 0x04,
2258         NULL, HFILL }},
2259     { &hf_cmp_PKIFailureInfo_wrongAuthority,
2260       { "wrongAuthority", "cmp.PKIFailureInfo.wrongAuthority",
2261         FT_BOOLEAN, 8, NULL, 0x02,
2262         NULL, HFILL }},
2263     { &hf_cmp_PKIFailureInfo_incorrectData,
2264       { "incorrectData", "cmp.PKIFailureInfo.incorrectData",
2265         FT_BOOLEAN, 8, NULL, 0x01,
2266         NULL, HFILL }},
2267     { &hf_cmp_PKIFailureInfo_missingTimeStamp,
2268       { "missingTimeStamp", "cmp.PKIFailureInfo.missingTimeStamp",
2269         FT_BOOLEAN, 8, NULL, 0x80,
2270         NULL, HFILL }},
2271     { &hf_cmp_PKIFailureInfo_badPOP,
2272       { "badPOP", "cmp.PKIFailureInfo.badPOP",
2273         FT_BOOLEAN, 8, NULL, 0x40,
2274         NULL, HFILL }},
2275     { &hf_cmp_PKIFailureInfo_certRevoked,
2276       { "certRevoked", "cmp.PKIFailureInfo.certRevoked",
2277         FT_BOOLEAN, 8, NULL, 0x20,
2278         NULL, HFILL }},
2279     { &hf_cmp_PKIFailureInfo_certConfirmed,
2280       { "certConfirmed", "cmp.PKIFailureInfo.certConfirmed",
2281         FT_BOOLEAN, 8, NULL, 0x10,
2282         NULL, HFILL }},
2283     { &hf_cmp_PKIFailureInfo_wrongIntegrity,
2284       { "wrongIntegrity", "cmp.PKIFailureInfo.wrongIntegrity",
2285         FT_BOOLEAN, 8, NULL, 0x08,
2286         NULL, HFILL }},
2287     { &hf_cmp_PKIFailureInfo_badRecipientNonce,
2288       { "badRecipientNonce", "cmp.PKIFailureInfo.badRecipientNonce",
2289         FT_BOOLEAN, 8, NULL, 0x04,
2290         NULL, HFILL }},
2291     { &hf_cmp_PKIFailureInfo_timeNotAvailable,
2292       { "timeNotAvailable", "cmp.PKIFailureInfo.timeNotAvailable",
2293         FT_BOOLEAN, 8, NULL, 0x02,
2294         NULL, HFILL }},
2295     { &hf_cmp_PKIFailureInfo_unacceptedPolicy,
2296       { "unacceptedPolicy", "cmp.PKIFailureInfo.unacceptedPolicy",
2297         FT_BOOLEAN, 8, NULL, 0x01,
2298         NULL, HFILL }},
2299     { &hf_cmp_PKIFailureInfo_unacceptedExtension,
2300       { "unacceptedExtension", "cmp.PKIFailureInfo.unacceptedExtension",
2301         FT_BOOLEAN, 8, NULL, 0x80,
2302         NULL, HFILL }},
2303     { &hf_cmp_PKIFailureInfo_addInfoNotAvailable,
2304       { "addInfoNotAvailable", "cmp.PKIFailureInfo.addInfoNotAvailable",
2305         FT_BOOLEAN, 8, NULL, 0x40,
2306         NULL, HFILL }},
2307     { &hf_cmp_PKIFailureInfo_badSenderNonce,
2308       { "badSenderNonce", "cmp.PKIFailureInfo.badSenderNonce",
2309         FT_BOOLEAN, 8, NULL, 0x20,
2310         NULL, HFILL }},
2311     { &hf_cmp_PKIFailureInfo_badCertTemplate,
2312       { "badCertTemplate", "cmp.PKIFailureInfo.badCertTemplate",
2313         FT_BOOLEAN, 8, NULL, 0x10,
2314         NULL, HFILL }},
2315     { &hf_cmp_PKIFailureInfo_signerNotTrusted,
2316       { "signerNotTrusted", "cmp.PKIFailureInfo.signerNotTrusted",
2317         FT_BOOLEAN, 8, NULL, 0x08,
2318         NULL, HFILL }},
2319     { &hf_cmp_PKIFailureInfo_transactionIdInUse,
2320       { "transactionIdInUse", "cmp.PKIFailureInfo.transactionIdInUse",
2321         FT_BOOLEAN, 8, NULL, 0x04,
2322         NULL, HFILL }},
2323     { &hf_cmp_PKIFailureInfo_unsupportedVersion,
2324       { "unsupportedVersion", "cmp.PKIFailureInfo.unsupportedVersion",
2325         FT_BOOLEAN, 8, NULL, 0x02,
2326         NULL, HFILL }},
2327     { &hf_cmp_PKIFailureInfo_notAuthorized,
2328       { "notAuthorized", "cmp.PKIFailureInfo.notAuthorized",
2329         FT_BOOLEAN, 8, NULL, 0x01,
2330         NULL, HFILL }},
2331     { &hf_cmp_PKIFailureInfo_systemUnavail,
2332       { "systemUnavail", "cmp.PKIFailureInfo.systemUnavail",
2333         FT_BOOLEAN, 8, NULL, 0x80,
2334         NULL, HFILL }},
2335     { &hf_cmp_PKIFailureInfo_systemFailure,
2336       { "systemFailure", "cmp.PKIFailureInfo.systemFailure",
2337         FT_BOOLEAN, 8, NULL, 0x40,
2338         NULL, HFILL }},
2339     { &hf_cmp_PKIFailureInfo_duplicateCertReq,
2340       { "duplicateCertReq", "cmp.PKIFailureInfo.duplicateCertReq",
2341         FT_BOOLEAN, 8, NULL, 0x20,
2342         NULL, HFILL }},
2343 
2344 /*--- End of included file: packet-cmp-hfarr.c ---*/
2345 #line 303 "./asn1/cmp/packet-cmp-template.c"
2346 	};
2347 
2348 	/* List of subtrees */
2349 	static gint *ett[] = {
2350 		&ett_cmp,
2351 
2352 /*--- Included file: packet-cmp-ettarr.c ---*/
2353 #line 1 "./asn1/cmp/packet-cmp-ettarr.c"
2354     &ett_cmp_CMPCertificate,
2355     &ett_cmp_PKIMessage,
2356     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate,
2357     &ett_cmp_PKIMessages,
2358     &ett_cmp_PKIHeader,
2359     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue,
2360     &ett_cmp_PKIFreeText,
2361     &ett_cmp_PKIBody,
2362     &ett_cmp_ProtectedPart,
2363     &ett_cmp_PBMParameter,
2364     &ett_cmp_DHBMParameter,
2365     &ett_cmp_PKIFailureInfo,
2366     &ett_cmp_PKIStatusInfo,
2367     &ett_cmp_OOBCertHash,
2368     &ett_cmp_POPODecKeyChallContent,
2369     &ett_cmp_Challenge,
2370     &ett_cmp_POPODecKeyRespContent,
2371     &ett_cmp_CertRepMessage,
2372     &ett_cmp_SEQUENCE_OF_CertResponse,
2373     &ett_cmp_CertResponse,
2374     &ett_cmp_CertifiedKeyPair,
2375     &ett_cmp_CertOrEncCert,
2376     &ett_cmp_KeyRecRepContent,
2377     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair,
2378     &ett_cmp_RevReqContent,
2379     &ett_cmp_RevDetails,
2380     &ett_cmp_RevRepContent,
2381     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo,
2382     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId,
2383     &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList,
2384     &ett_cmp_CAKeyUpdAnnContent,
2385     &ett_cmp_RevAnnContent,
2386     &ett_cmp_CRLAnnContent,
2387     &ett_cmp_CertConfirmContent,
2388     &ett_cmp_CertStatus,
2389     &ett_cmp_InfoTypeAndValue,
2390     &ett_cmp_SignKeyPairTypesValue,
2391     &ett_cmp_EncKeyPairTypesValue,
2392     &ett_cmp_UnsupportedOIDsValue,
2393     &ett_cmp_SuppLangTagsValue,
2394     &ett_cmp_GenMsgContent,
2395     &ett_cmp_GenRepContent,
2396     &ett_cmp_ErrorMsgContent,
2397     &ett_cmp_PollReqContent,
2398     &ett_cmp_PollReqContent_item,
2399     &ett_cmp_PollRepContent,
2400     &ett_cmp_PollRepContent_item,
2401 
2402 /*--- End of included file: packet-cmp-ettarr.c ---*/
2403 #line 309 "./asn1/cmp/packet-cmp-template.c"
2404 	};
2405 	module_t *cmp_module;
2406 
2407 	/* Register protocol */
2408 	proto_cmp = proto_register_protocol(PNAME, PSNAME, PFNAME);
2409 
2410 	/* Register fields and subtrees */
2411 	proto_register_field_array(proto_cmp, hf, array_length(hf));
2412 	proto_register_subtree_array(ett, array_length(ett));
2413 
2414 	cmp_module = prefs_register_protocol(proto_cmp, proto_reg_handoff_cmp);
2415 	prefs_register_bool_preference(cmp_module, "desegment",
2416 			"Reassemble CMP-over-TCP messages spanning multiple TCP segments",
2417 			"Whether the CMP-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
2418 			"To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2419 			&cmp_desegment);
2420 
2421 	prefs_register_uint_preference(cmp_module, "http_alternate_port",
2422 			"Alternate HTTP port",
2423 			"Decode this TCP port\'s traffic as CMP-over-HTTP. Set to \"0\" to disable. "
2424 			"Use this if the Content-Type is not set correctly.",
2425 			10,
2426 			&cmp_alternate_http_port);
2427 
2428 	prefs_register_uint_preference(cmp_module, "tcp_style_http_alternate_port",
2429 			"Alternate TCP-style-HTTP port",
2430 			"Decode this TCP port\'s traffic as TCP-transport-style CMP-over-HTTP. Set to \"0\" to disable. "
2431 			"Use this if the Content-Type is not set correctly.",
2432 			10,
2433 			&cmp_alternate_tcp_style_http_port);
2434 
2435 	register_ber_syntax_dissector("PKIMessage", proto_cmp, dissect_cmp_pdu);
2436 }
2437 
2438 
2439 /*--- proto_reg_handoff_cmp -------------------------------------------*/
proto_reg_handoff_cmp(void)2440 void proto_reg_handoff_cmp(void) {
2441 	static gboolean inited = FALSE;
2442 	static dissector_handle_t cmp_http_handle;
2443 	static dissector_handle_t cmp_tcp_style_http_handle;
2444 	static dissector_handle_t cmp_tcp_handle;
2445 	static guint cmp_alternate_http_port_prev = 0;
2446 	static guint cmp_alternate_tcp_style_http_port_prev = 0;
2447 
2448 	if (!inited) {
2449 		cmp_http_handle = create_dissector_handle(dissect_cmp_http, proto_cmp);
2450 		dissector_add_string("media_type", "application/pkixcmp", cmp_http_handle);
2451 		dissector_add_string("media_type", "application/x-pkixcmp", cmp_http_handle);
2452 
2453 		cmp_tcp_style_http_handle = create_dissector_handle(dissect_cmp_tcp_pdu, proto_cmp);
2454 		dissector_add_string("media_type", "application/pkixcmp-poll", cmp_tcp_style_http_handle);
2455 		dissector_add_string("media_type", "application/x-pkixcmp-poll", cmp_tcp_style_http_handle);
2456 
2457 		cmp_tcp_handle = create_dissector_handle(dissect_cmp_tcp, proto_cmp);
2458 		dissector_add_uint_with_preference("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
2459 
2460 		oid_add_from_string("Cryptlib-presence-check","1.3.6.1.4.1.3029.3.1.1");
2461 		oid_add_from_string("Cryptlib-PKIBoot","1.3.6.1.4.1.3029.3.1.2");
2462 
2463 		oid_add_from_string("HMAC MD5","1.3.6.1.5.5.8.1.1");
2464 		oid_add_from_string("HMAC SHA-1","1.3.6.1.5.5.8.1.2");
2465 		oid_add_from_string("HMAC TIGER","1.3.6.1.5.5.8.1.3");
2466 		oid_add_from_string("HMAC RIPEMD-160","1.3.6.1.5.5.8.1.4");
2467 
2468 
2469 /*--- Included file: packet-cmp-dis-tab.c ---*/
2470 #line 1 "./asn1/cmp/packet-cmp-dis-tab.c"
2471   register_ber_oid_dissector("1.2.840.113533.7.66.13", dissect_PBMParameter_PDU, proto_cmp, "id-PasswordBasedMac");
2472   register_ber_oid_dissector("1.2.640.113533.7.66.30", dissect_DHBMParameter_PDU, proto_cmp, "id-DHBasedMac");
2473   register_ber_oid_dissector("1.3.6.1.5.5.7.4.1", dissect_CAProtEncCertValue_PDU, proto_cmp, "id-it-caProtEncCert");
2474   register_ber_oid_dissector("1.3.6.1.5.5.7.4.2", dissect_SignKeyPairTypesValue_PDU, proto_cmp, "id-it-signKeyPairTypes");
2475   register_ber_oid_dissector("1.3.6.1.5.5.7.4.3", dissect_EncKeyPairTypesValue_PDU, proto_cmp, "id-it-encKeyPairTypes");
2476   register_ber_oid_dissector("1.3.6.1.5.5.7.4.4", dissect_PreferredSymmAlgValue_PDU, proto_cmp, "id-it-preferredSymmAlg");
2477   register_ber_oid_dissector("1.3.6.1.5.5.7.4.5", dissect_CAKeyUpdateInfoValue_PDU, proto_cmp, "id-it-caKeyUpdateInfo");
2478   register_ber_oid_dissector("1.3.6.1.5.5.7.4.6", dissect_CurrentCRLValue_PDU, proto_cmp, "id-it-currentCRL");
2479   register_ber_oid_dissector("1.3.6.1.5.5.7.4.7", dissect_UnsupportedOIDsValue_PDU, proto_cmp, "id-it-unsupportedOIDs");
2480   register_ber_oid_dissector("1.3.6.1.5.5.7.4.10", dissect_KeyPairParamReqValue_PDU, proto_cmp, "id-it-keyPairParamReq");
2481   register_ber_oid_dissector("1.3.6.1.5.5.7.4.11", dissect_KeyPairParamRepValue_PDU, proto_cmp, "id-it-keyPairParamRep");
2482   register_ber_oid_dissector("1.3.6.1.5.5.7.4.12", dissect_RevPassphraseValue_PDU, proto_cmp, "id-it-revPassphrase");
2483   register_ber_oid_dissector("1.3.6.1.5.5.7.4.13", dissect_ImplicitConfirmValue_PDU, proto_cmp, "id-it-implicitConfirm");
2484   register_ber_oid_dissector("1.3.6.1.5.5.7.4.14", dissect_ConfirmWaitTimeValue_PDU, proto_cmp, "id-it-confirmWaitTime");
2485   register_ber_oid_dissector("1.3.6.1.5.5.7.4.15", dissect_OrigPKIMessageValue_PDU, proto_cmp, "id-it-origPKIMessage");
2486   register_ber_oid_dissector("1.3.6.1.5.5.7.4.16", dissect_SuppLangTagsValue_PDU, proto_cmp, "id-it-suppLangTags");
2487 
2488 
2489 /*--- End of included file: packet-cmp-dis-tab.c ---*/
2490 #line 374 "./asn1/cmp/packet-cmp-template.c"
2491 		inited = TRUE;
2492 	}
2493 
2494 	/* change alternate HTTP port if changed in the preferences */
2495 	if (cmp_alternate_http_port != cmp_alternate_http_port_prev) {
2496 		if (cmp_alternate_http_port_prev != 0) {
2497 			http_tcp_dissector_delete(cmp_alternate_http_port_prev);
2498 		}
2499 		if (cmp_alternate_http_port != 0)
2500 			http_tcp_dissector_add( cmp_alternate_http_port, cmp_http_handle);
2501 		cmp_alternate_http_port_prev = cmp_alternate_http_port;
2502 	}
2503 
2504 	/* change alternate TCP-style-HTTP port if changed in the preferences */
2505 	if (cmp_alternate_tcp_style_http_port != cmp_alternate_tcp_style_http_port_prev) {
2506 		if (cmp_alternate_tcp_style_http_port_prev != 0) {
2507 			http_tcp_dissector_delete(cmp_alternate_tcp_style_http_port_prev);
2508 		}
2509 		if (cmp_alternate_tcp_style_http_port != 0)
2510 			http_tcp_dissector_add( cmp_alternate_tcp_style_http_port, cmp_tcp_style_http_handle);
2511 		cmp_alternate_tcp_style_http_port_prev = cmp_alternate_tcp_style_http_port;
2512 	}
2513 
2514 }
2515 
2516