1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */
6 /* Input file: packet-cmp-template.c */
8 #line 1 "packet-cmp-template.c"
10 * Routines for RFC2510 Certificate Management Protocol packet dissection
11 * Ronnie Sahlberg 2004
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/conversation.h>
45 #include <epan/asn1.h>
46 #include "packet-ber.h"
47 #include "packet-cmp.h"
48 #include "packet-crmf.h"
49 #include "packet-pkix1explicit.h"
50 #include "packet-pkix1implicit.h"
51 #include <epan/emem.h>
52 #include "packet-tcp.h"
53 #include <epan/prefs.h>
54 #include <epan/nstime.h>
56 #define PNAME "Certificate Management Protocol"
60 #define TCP_PORT_CMP 829
62 /* desegmentation of CMP over TCP */
63 static gboolean cmp_desegment = TRUE;
65 /* Initialize the protocol and registered fields */
67 static int hf_cmp_type_oid = -1;
68 static int hf_cmp_rm = -1;
69 static int hf_cmp_type = -1;
70 static int hf_cmp_poll_ref = -1;
71 static int hf_cmp_next_poll_ref = -1;
72 static int hf_cmp_ttcb = -1;
74 /*--- Included file: packet-cmp-hf.c ---*/
75 #line 1 "packet-cmp-hf.c"
76 static int hf_cmp_header = -1; /* PKIHeader */
77 static int hf_cmp_body = -1; /* PKIBody */
78 static int hf_cmp_protection = -1; /* PKIProtection */
79 static int hf_cmp_extraCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
80 static int hf_cmp_extraCerts_item = -1; /* Certificate */
81 static int hf_cmp_pvno = -1; /* T_pvno */
82 static int hf_cmp_sender = -1; /* GeneralName */
83 static int hf_cmp_recipient = -1; /* GeneralName */
84 static int hf_cmp_messageTime = -1; /* GeneralizedTime */
85 static int hf_cmp_protectionAlg = -1; /* AlgorithmIdentifier */
86 static int hf_cmp_senderKID = -1; /* KeyIdentifier */
87 static int hf_cmp_recipKID = -1; /* KeyIdentifier */
88 static int hf_cmp_transactionID = -1; /* OCTET_STRING */
89 static int hf_cmp_senderNonce = -1; /* OCTET_STRING */
90 static int hf_cmp_recipNonce = -1; /* OCTET_STRING */
91 static int hf_cmp_freeText = -1; /* PKIFreeText */
92 static int hf_cmp_generalInfo = -1; /* SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue */
93 static int hf_cmp_generalInfo_item = -1; /* InfoTypeAndValue */
94 static int hf_cmp_PKIFreeText_item = -1; /* UTF8String */
95 static int hf_cmp_ir = -1; /* CertReqMessages */
96 static int hf_cmp_ip = -1; /* CertRepMessage */
97 static int hf_cmp_cr = -1; /* CertReqMessages */
98 static int hf_cmp_cp = -1; /* CertRepMessage */
99 static int hf_cmp_popdecc = -1; /* POPODecKeyChallContent */
100 static int hf_cmp_popdecr = -1; /* POPODecKeyRespContent */
101 static int hf_cmp_kur = -1; /* CertReqMessages */
102 static int hf_cmp_kup = -1; /* CertRepMessage */
103 static int hf_cmp_krr = -1; /* CertReqMessages */
104 static int hf_cmp_krp = -1; /* KeyRecRepContent */
105 static int hf_cmp_rr = -1; /* RevReqContent */
106 static int hf_cmp_rp = -1; /* RevRepContent */
107 static int hf_cmp_ccr = -1; /* CertReqMessages */
108 static int hf_cmp_ccp = -1; /* CertRepMessage */
109 static int hf_cmp_ckuann = -1; /* CAKeyUpdAnnContent */
110 static int hf_cmp_cann = -1; /* CertAnnContent */
111 static int hf_cmp_rann = -1; /* RevAnnContent */
112 static int hf_cmp_crlann = -1; /* CRLAnnContent */
113 static int hf_cmp_conf = -1; /* PKIConfirmContent */
114 static int hf_cmp_nested = -1; /* NestedMessageContent */
115 static int hf_cmp_genm = -1; /* GenMsgContent */
116 static int hf_cmp_genp = -1; /* GenRepContent */
117 static int hf_cmp_error = -1; /* ErrorMsgContent */
118 static int hf_cmp_salt = -1; /* OCTET_STRING */
119 static int hf_cmp_owf = -1; /* AlgorithmIdentifier */
120 static int hf_cmp_iterationCount = -1; /* INTEGER */
121 static int hf_cmp_mac = -1; /* AlgorithmIdentifier */
122 static int hf_cmp_status = -1; /* PKIStatus */
123 static int hf_cmp_statusString = -1; /* PKIFreeText */
124 static int hf_cmp_failInfo = -1; /* PKIFailureInfo */
125 static int hf_cmp_hashAlg = -1; /* AlgorithmIdentifier */
126 static int hf_cmp_certId = -1; /* CertId */
127 static int hf_cmp_hashVal = -1; /* BIT_STRING */
128 static int hf_cmp_POPODecKeyChallContent_item = -1; /* Challenge */
129 static int hf_cmp_witness = -1; /* OCTET_STRING */
130 static int hf_cmp_challenge = -1; /* OCTET_STRING */
131 static int hf_cmp_POPODecKeyRespContent_item = -1; /* INTEGER */
132 static int hf_cmp_caPubs = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
133 static int hf_cmp_caPubs_item = -1; /* Certificate */
134 static int hf_cmp_response = -1; /* SEQUENCE_OF_CertResponse */
135 static int hf_cmp_response_item = -1; /* CertResponse */
136 static int hf_cmp_certReqId = -1; /* INTEGER */
137 static int hf_cmp_status_01 = -1; /* PKIStatusInfo */
138 static int hf_cmp_certifiedKeyPair = -1; /* CertifiedKeyPair */
139 static int hf_cmp_rspInfo = -1; /* OCTET_STRING */
140 static int hf_cmp_certOrEncCert = -1; /* CertOrEncCert */
141 static int hf_cmp_privateKey = -1; /* EncryptedValue */
142 static int hf_cmp_publicationInfo = -1; /* PKIPublicationInfo */
143 static int hf_cmp_certificate = -1; /* Certificate */
144 static int hf_cmp_encryptedCert = -1; /* EncryptedValue */
145 static int hf_cmp_newSigCert = -1; /* Certificate */
146 static int hf_cmp_caCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
147 static int hf_cmp_caCerts_item = -1; /* Certificate */
148 static int hf_cmp_keyPairHist = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair */
149 static int hf_cmp_keyPairHist_item = -1; /* CertifiedKeyPair */
150 static int hf_cmp_RevReqContent_item = -1; /* RevDetails */
151 static int hf_cmp_certDetails = -1; /* CertTemplate */
152 static int hf_cmp_revocationReason = -1; /* ReasonFlags */
153 static int hf_cmp_badSinceDate = -1; /* GeneralizedTime */
154 static int hf_cmp_crlEntryDetails = -1; /* Extensions */
155 static int hf_cmp_status_02 = -1; /* SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo */
156 static int hf_cmp_status_item = -1; /* PKIStatusInfo */
157 static int hf_cmp_revCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertId */
158 static int hf_cmp_revCerts_item = -1; /* CertId */
159 static int hf_cmp_crls = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertificateList */
160 static int hf_cmp_crls_item = -1; /* CertificateList */
161 static int hf_cmp_oldWithNew = -1; /* Certificate */
162 static int hf_cmp_newWithOld = -1; /* Certificate */
163 static int hf_cmp_newWithNew = -1; /* Certificate */
164 static int hf_cmp_willBeRevokedAt = -1; /* GeneralizedTime */
165 static int hf_cmp_crlDetails = -1; /* Extensions */
166 static int hf_cmp_CRLAnnContent_item = -1; /* CertificateList */
167 static int hf_cmp_infoType = -1; /* T_infoType */
168 static int hf_cmp_infoValue = -1; /* T_infoValue */
169 static int hf_cmp_GenMsgContent_item = -1; /* InfoTypeAndValue */
170 static int hf_cmp_GenRepContent_item = -1; /* InfoTypeAndValue */
171 static int hf_cmp_pKIStatusInfo = -1; /* PKIStatusInfo */
172 static int hf_cmp_errorCode = -1; /* INTEGER */
173 static int hf_cmp_errorDetails = -1; /* PKIFreeText */
175 static int hf_cmp_PKIFailureInfo_badAlg = -1;
176 static int hf_cmp_PKIFailureInfo_badMessageCheck = -1;
177 static int hf_cmp_PKIFailureInfo_badRequest = -1;
178 static int hf_cmp_PKIFailureInfo_badTime = -1;
179 static int hf_cmp_PKIFailureInfo_badCertId = -1;
180 static int hf_cmp_PKIFailureInfo_badDataFormat = -1;
181 static int hf_cmp_PKIFailureInfo_wrongAuthority = -1;
182 static int hf_cmp_PKIFailureInfo_incorrectData = -1;
183 static int hf_cmp_PKIFailureInfo_missingTimeStamp = -1;
184 static int hf_cmp_PKIFailureInfo_badPOP = -1;
186 /*--- End of included file: packet-cmp-hf.c ---*/
187 #line 66 "packet-cmp-template.c"
189 /* Initialize the subtree pointers */
190 static gint ett_cmp = -1;
192 /*--- Included file: packet-cmp-ett.c ---*/
193 #line 1 "packet-cmp-ett.c"
194 static gint ett_cmp_PKIMessage = -1;
195 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate = -1;
196 static gint ett_cmp_PKIHeader = -1;
197 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue = -1;
198 static gint ett_cmp_PKIFreeText = -1;
199 static gint ett_cmp_PKIBody = -1;
200 static gint ett_cmp_ProtectedPart = -1;
201 static gint ett_cmp_PBMParameter = -1;
202 static gint ett_cmp_DHBMParameter = -1;
203 static gint ett_cmp_PKIFailureInfo = -1;
204 static gint ett_cmp_PKIStatusInfo = -1;
205 static gint ett_cmp_OOBCertHash = -1;
206 static gint ett_cmp_POPODecKeyChallContent = -1;
207 static gint ett_cmp_Challenge = -1;
208 static gint ett_cmp_POPODecKeyRespContent = -1;
209 static gint ett_cmp_CertRepMessage = -1;
210 static gint ett_cmp_SEQUENCE_OF_CertResponse = -1;
211 static gint ett_cmp_CertResponse = -1;
212 static gint ett_cmp_CertifiedKeyPair = -1;
213 static gint ett_cmp_CertOrEncCert = -1;
214 static gint ett_cmp_KeyRecRepContent = -1;
215 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair = -1;
216 static gint ett_cmp_RevReqContent = -1;
217 static gint ett_cmp_RevDetails = -1;
218 static gint ett_cmp_RevRepContent = -1;
219 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo = -1;
220 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId = -1;
221 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList = -1;
222 static gint ett_cmp_CAKeyUpdAnnContent = -1;
223 static gint ett_cmp_RevAnnContent = -1;
224 static gint ett_cmp_CRLAnnContent = -1;
225 static gint ett_cmp_InfoTypeAndValue = -1;
226 static gint ett_cmp_GenMsgContent = -1;
227 static gint ett_cmp_GenRepContent = -1;
228 static gint ett_cmp_ErrorMsgContent = -1;
230 /*--- End of included file: packet-cmp-ett.c ---*/
231 #line 70 "packet-cmp-template.c"
233 static const char *object_identifier_id;
237 /*--- Included file: packet-cmp-fn.c ---*/
238 #line 1 "packet-cmp-fn.c"
239 /*--- Cyclic dependencies ---*/
241 /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessage */
242 int dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
246 /*--- Fields for imported types ---*/
248 static int dissect_extraCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
249 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts_item);
251 static int dissect_sender(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
252 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_sender);
254 static int dissect_recipient(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
255 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_recipient);
257 static int dissect_protectionAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
258 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_protectionAlg);
260 static int dissect_ir(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
261 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ir);
263 static int dissect_cr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
264 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_cr);
266 static int dissect_kur(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
267 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_kur);
269 static int dissect_krr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
270 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_krr);
272 static int dissect_ccr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
273 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ccr);
275 static int dissect_owf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
276 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_owf);
278 static int dissect_mac(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
279 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_mac);
281 static int dissect_hashAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
282 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_hashAlg);
284 static int dissect_certId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
285 return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_certId);
287 static int dissect_caPubs_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
288 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs_item);
290 static int dissect_privateKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
291 return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_privateKey);
293 static int dissect_publicationInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
294 return dissect_crmf_PKIPublicationInfo(FALSE, tvb, offset, actx, tree, hf_cmp_publicationInfo);
296 static int dissect_certificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
297 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_certificate);
299 static int dissect_encryptedCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
300 return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_encryptedCert);
302 static int dissect_newSigCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
303 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newSigCert);
305 static int dissect_caCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
306 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts_item);
308 static int dissect_certDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
309 return dissect_crmf_CertTemplate(FALSE, tvb, offset, actx, tree, hf_cmp_certDetails);
311 static int dissect_revocationReason(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
312 return dissect_pkix1implicit_ReasonFlags(FALSE, tvb, offset, actx, tree, hf_cmp_revocationReason);
314 static int dissect_crlEntryDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
315 return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlEntryDetails);
317 static int dissect_revCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
318 return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts_item);
320 static int dissect_crls_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
321 return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls_item);
323 static int dissect_oldWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
324 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_oldWithNew);
326 static int dissect_newWithOld(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
327 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithOld);
329 static int dissect_newWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
330 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithNew);
332 static int dissect_crlDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
333 return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlDetails);
335 static int dissect_CRLAnnContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
336 return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_CRLAnnContent_item);
342 dissect_cmp_KeyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
343 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
348 static int dissect_senderKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
349 return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_senderKID);
351 static int dissect_recipKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
352 return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_recipKID);
356 static const value_string cmp_T_pvno_vals[] = {
357 { 1, "ietf-version2" },
363 dissect_cmp_T_pvno(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
364 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
369 static int dissect_pvno(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
370 return dissect_cmp_T_pvno(FALSE, tvb, offset, actx, tree, hf_cmp_pvno);
376 dissect_cmp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
377 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
381 static int dissect_messageTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
382 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_messageTime);
384 static int dissect_badSinceDate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
385 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_badSinceDate);
387 static int dissect_willBeRevokedAt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
388 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_willBeRevokedAt);
394 dissect_cmp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
395 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
400 static int dissect_transactionID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
401 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_transactionID);
403 static int dissect_senderNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
404 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_senderNonce);
406 static int dissect_recipNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
407 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_recipNonce);
409 static int dissect_salt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
410 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_salt);
412 static int dissect_witness(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
413 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_witness);
415 static int dissect_challenge(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
416 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_challenge);
418 static int dissect_rspInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
419 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_rspInfo);
425 dissect_cmp_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
426 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
427 actx, tree, tvb, offset, hf_index,
432 static int dissect_PKIFreeText_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
433 return dissect_cmp_UTF8String(FALSE, tvb, offset, actx, tree, hf_cmp_PKIFreeText_item);
437 static const ber_old_sequence_t PKIFreeText_sequence_of[1] = {
438 { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_PKIFreeText_item },
442 dissect_cmp_PKIFreeText(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
443 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
444 PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText);
448 static int dissect_freeText(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
449 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_freeText);
451 static int dissect_statusString(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
452 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_statusString);
454 static int dissect_errorDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
455 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_errorDetails);
461 dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
462 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, &object_identifier_id);
466 static int dissect_infoType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
467 return dissect_cmp_T_infoType(FALSE, tvb, offset, actx, tree, hf_cmp_infoType);
473 dissect_cmp_T_infoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
475 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
481 static int dissect_infoValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
482 return dissect_cmp_T_infoValue(FALSE, tvb, offset, actx, tree, hf_cmp_infoValue);
486 static const ber_old_sequence_t InfoTypeAndValue_sequence[] = {
487 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_infoType },
488 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_infoValue },
493 dissect_cmp_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
494 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
495 InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue);
499 static int dissect_generalInfo_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
500 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo_item);
502 static int dissect_GenMsgContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
503 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenMsgContent_item);
505 static int dissect_GenRepContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
506 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenRepContent_item);
510 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = {
511 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_generalInfo_item },
515 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
516 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
517 SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue);
521 static int dissect_generalInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
522 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo);
526 static const ber_old_sequence_t PKIHeader_sequence[] = {
527 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pvno },
528 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_sender },
529 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_recipient },
530 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_messageTime },
531 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_protectionAlg },
532 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_senderKID },
533 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_recipKID },
534 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_transactionID },
535 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_senderNonce },
536 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_recipNonce },
537 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_freeText },
538 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_generalInfo },
543 dissect_cmp_PKIHeader(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
544 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
545 PKIHeader_sequence, hf_index, ett_cmp_PKIHeader);
549 static int dissect_header(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
550 return dissect_cmp_PKIHeader(FALSE, tvb, offset, actx, tree, hf_cmp_header);
554 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of[1] = {
555 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_extraCerts_item },
559 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
560 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
561 SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate);
565 static int dissect_extraCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
566 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts);
568 static int dissect_caPubs(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
569 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs);
571 static int dissect_caCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
572 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts);
578 dissect_cmp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
579 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
584 static int dissect_iterationCount(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
585 return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_iterationCount);
587 static int dissect_POPODecKeyRespContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
588 return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyRespContent_item);
590 static int dissect_certReqId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
591 return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_certReqId);
593 static int dissect_errorCode(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
594 return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_errorCode);
598 const value_string cmp_PKIStatus_vals[] = {
600 { 1, "grantedWithMods" },
603 { 4, "revocationWarning" },
604 { 5, "revocationNotification" },
605 { 6, "keyUpdateWarning" },
611 dissect_cmp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
612 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
617 static int dissect_status(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
618 return dissect_cmp_PKIStatus(FALSE, tvb, offset, actx, tree, hf_cmp_status);
622 static const asn_namedbit PKIFailureInfo_bits[] = {
623 { 0, &hf_cmp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
624 { 1, &hf_cmp_PKIFailureInfo_badMessageCheck, -1, -1, "badMessageCheck", NULL },
625 { 2, &hf_cmp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
626 { 3, &hf_cmp_PKIFailureInfo_badTime, -1, -1, "badTime", NULL },
627 { 4, &hf_cmp_PKIFailureInfo_badCertId, -1, -1, "badCertId", NULL },
628 { 5, &hf_cmp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
629 { 6, &hf_cmp_PKIFailureInfo_wrongAuthority, -1, -1, "wrongAuthority", NULL },
630 { 7, &hf_cmp_PKIFailureInfo_incorrectData, -1, -1, "incorrectData", NULL },
631 { 8, &hf_cmp_PKIFailureInfo_missingTimeStamp, -1, -1, "missingTimeStamp", NULL },
632 { 9, &hf_cmp_PKIFailureInfo_badPOP, -1, -1, "badPOP", NULL },
633 { 0, NULL, 0, 0, NULL, NULL }
637 dissect_cmp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
638 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
639 PKIFailureInfo_bits, hf_index, ett_cmp_PKIFailureInfo,
644 static int dissect_failInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
645 return dissect_cmp_PKIFailureInfo(FALSE, tvb, offset, actx, tree, hf_cmp_failInfo);
649 static const ber_old_sequence_t PKIStatusInfo_sequence[] = {
650 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
651 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statusString },
652 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_failInfo },
657 dissect_cmp_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
658 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
659 PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo);
663 static int dissect_status_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
664 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_01);
666 static int dissect_status_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
667 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_item);
669 static int dissect_pKIStatusInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
670 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_pKIStatusInfo);
674 const value_string cmp_CertOrEncCert_vals[] = {
675 { 0, "certificate" },
676 { 1, "encryptedCert" },
680 static const ber_old_choice_t CertOrEncCert_choice[] = {
681 { 0, BER_CLASS_CON, 0, 0, dissect_certificate },
682 { 1, BER_CLASS_CON, 1, 0, dissect_encryptedCert },
687 dissect_cmp_CertOrEncCert(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
688 offset = dissect_ber_old_choice(actx, tree, tvb, offset,
689 CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert,
694 static int dissect_certOrEncCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
695 return dissect_cmp_CertOrEncCert(FALSE, tvb, offset, actx, tree, hf_cmp_certOrEncCert);
699 static const ber_old_sequence_t CertifiedKeyPair_sequence[] = {
700 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_certOrEncCert },
701 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_privateKey },
702 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_publicationInfo },
707 dissect_cmp_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
708 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
709 CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair);
713 static int dissect_certifiedKeyPair(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
714 return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_certifiedKeyPair);
716 static int dissect_keyPairHist_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
717 return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist_item);
721 static const ber_old_sequence_t CertResponse_sequence[] = {
722 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId },
723 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_01 },
724 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certifiedKeyPair },
725 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_rspInfo },
730 dissect_cmp_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
731 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
732 CertResponse_sequence, hf_index, ett_cmp_CertResponse);
736 static int dissect_response_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
737 return dissect_cmp_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response_item);
741 static const ber_old_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = {
742 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response_item },
746 dissect_cmp_SEQUENCE_OF_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
747 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
748 SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse);
752 static int dissect_response(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
753 return dissect_cmp_SEQUENCE_OF_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response);
757 static const ber_old_sequence_t CertRepMessage_sequence[] = {
758 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caPubs },
759 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response },
764 dissect_cmp_CertRepMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
765 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
766 CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage);
770 static int dissect_ip(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
771 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ip);
773 static int dissect_cp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
774 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_cp);
776 static int dissect_kup(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
777 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_kup);
779 static int dissect_ccp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
780 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ccp);
784 static const ber_old_sequence_t Challenge_sequence[] = {
785 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_owf },
786 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_witness },
787 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_challenge },
792 dissect_cmp_Challenge(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
793 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
794 Challenge_sequence, hf_index, ett_cmp_Challenge);
798 static int dissect_POPODecKeyChallContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
799 return dissect_cmp_Challenge(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyChallContent_item);
803 static const ber_old_sequence_t POPODecKeyChallContent_sequence_of[1] = {
804 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyChallContent_item },
808 dissect_cmp_POPODecKeyChallContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
809 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
810 POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent);
814 static int dissect_popdecc(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
815 return dissect_cmp_POPODecKeyChallContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecc);
819 static const ber_old_sequence_t POPODecKeyRespContent_sequence_of[1] = {
820 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyRespContent_item },
824 dissect_cmp_POPODecKeyRespContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
825 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
826 POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent);
830 static int dissect_popdecr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
831 return dissect_cmp_POPODecKeyRespContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecr);
835 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = {
836 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_keyPairHist_item },
840 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
841 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
842 SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair);
846 static int dissect_keyPairHist(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
847 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist);
851 static const ber_old_sequence_t KeyRecRepContent_sequence[] = {
852 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_01 },
853 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_newSigCert },
854 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caCerts },
855 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_keyPairHist },
860 dissect_cmp_KeyRecRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
861 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
862 KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent);
866 static int dissect_krp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
867 return dissect_cmp_KeyRecRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_krp);
871 static const ber_old_sequence_t RevDetails_sequence[] = {
872 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certDetails },
873 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_revocationReason },
874 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
875 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlEntryDetails },
880 dissect_cmp_RevDetails(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
881 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
882 RevDetails_sequence, hf_index, ett_cmp_RevDetails);
886 static int dissect_RevReqContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
887 return dissect_cmp_RevDetails(FALSE, tvb, offset, actx, tree, hf_cmp_RevReqContent_item);
891 static const ber_old_sequence_t RevReqContent_sequence_of[1] = {
892 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RevReqContent_item },
896 dissect_cmp_RevReqContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
897 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
898 RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent);
902 static int dissect_rr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
903 return dissect_cmp_RevReqContent(FALSE, tvb, offset, actx, tree, hf_cmp_rr);
907 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = {
908 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_item },
912 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
913 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
914 SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo);
918 static int dissect_status_02(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
919 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_status_02);
923 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = {
924 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_revCerts_item },
928 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
929 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
930 SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId);
934 static int dissect_revCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
935 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts);
939 static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = {
940 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crls_item },
944 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
945 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
946 SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList);
950 static int dissect_crls(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
951 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls);
955 static const ber_old_sequence_t RevRepContent_sequence[] = {
956 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_02 },
957 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_revCerts },
958 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crls },
963 dissect_cmp_RevRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
964 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
965 RevRepContent_sequence, hf_index, ett_cmp_RevRepContent);
969 static int dissect_rp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
970 return dissect_cmp_RevRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_rp);
974 static const ber_old_sequence_t CAKeyUpdAnnContent_sequence[] = {
975 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_oldWithNew },
976 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithOld },
977 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithNew },
982 dissect_cmp_CAKeyUpdAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
983 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
984 CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent);
988 static int dissect_ckuann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
989 return dissect_cmp_CAKeyUpdAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_ckuann);
995 dissect_cmp_CertAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
996 offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1000 static int dissect_cann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1001 return dissect_cmp_CertAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_cann);
1005 static const ber_old_sequence_t RevAnnContent_sequence[] = {
1006 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
1007 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certId },
1008 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_willBeRevokedAt },
1009 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
1010 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlDetails },
1015 dissect_cmp_RevAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1016 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1017 RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent);
1021 static int dissect_rann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1022 return dissect_cmp_RevAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_rann);
1026 static const ber_old_sequence_t CRLAnnContent_sequence_of[1] = {
1027 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CRLAnnContent_item },
1031 dissect_cmp_CRLAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1032 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1033 CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent);
1037 static int dissect_crlann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1038 return dissect_cmp_CRLAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_crlann);
1044 dissect_cmp_PKIConfirmContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1045 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
1049 static int dissect_conf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1050 return dissect_cmp_PKIConfirmContent(FALSE, tvb, offset, actx, tree, hf_cmp_conf);
1056 dissect_cmp_NestedMessageContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1057 offset = dissect_cmp_PKIMessage(implicit_tag, tvb, offset, actx, tree, hf_index);
1061 static int dissect_nested(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1062 return dissect_cmp_NestedMessageContent(FALSE, tvb, offset, actx, tree, hf_cmp_nested);
1066 static const ber_old_sequence_t GenMsgContent_sequence_of[1] = {
1067 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenMsgContent_item },
1071 dissect_cmp_GenMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1072 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1073 GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent);
1077 static int dissect_genm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1078 return dissect_cmp_GenMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_genm);
1082 static const ber_old_sequence_t GenRepContent_sequence_of[1] = {
1083 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenRepContent_item },
1087 dissect_cmp_GenRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1088 offset = dissect_ber_old_sequence_of(implicit_tag, actx, tree, tvb, offset,
1089 GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent);
1093 static int dissect_genp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1094 return dissect_cmp_GenRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_genp);
1098 static const ber_old_sequence_t ErrorMsgContent_sequence[] = {
1099 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pKIStatusInfo },
1100 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorCode },
1101 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorDetails },
1106 dissect_cmp_ErrorMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1107 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1108 ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent);
1112 static int dissect_error(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1113 return dissect_cmp_ErrorMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_error);
1117 const value_string cmp_PKIBody_vals[] = {
1144 static const ber_old_choice_t PKIBody_choice[] = {
1145 { 0, BER_CLASS_CON, 0, 0, dissect_ir },
1146 { 1, BER_CLASS_CON, 1, 0, dissect_ip },
1147 { 2, BER_CLASS_CON, 2, 0, dissect_cr },
1148 { 3, BER_CLASS_CON, 3, 0, dissect_cp },
1149 { 5, BER_CLASS_CON, 5, 0, dissect_popdecc },
1150 { 6, BER_CLASS_CON, 6, 0, dissect_popdecr },
1151 { 7, BER_CLASS_CON, 7, 0, dissect_kur },
1152 { 8, BER_CLASS_CON, 8, 0, dissect_kup },
1153 { 9, BER_CLASS_CON, 9, 0, dissect_krr },
1154 { 10, BER_CLASS_CON, 10, 0, dissect_krp },
1155 { 11, BER_CLASS_CON, 11, 0, dissect_rr },
1156 { 12, BER_CLASS_CON, 12, 0, dissect_rp },
1157 { 13, BER_CLASS_CON, 13, 0, dissect_ccr },
1158 { 14, BER_CLASS_CON, 14, 0, dissect_ccp },
1159 { 15, BER_CLASS_CON, 15, 0, dissect_ckuann },
1160 { 16, BER_CLASS_CON, 16, 0, dissect_cann },
1161 { 17, BER_CLASS_CON, 17, 0, dissect_rann },
1162 { 18, BER_CLASS_CON, 18, 0, dissect_crlann },
1163 { 19, BER_CLASS_CON, 19, 0, dissect_conf },
1164 { 20, BER_CLASS_CON, 20, 0, dissect_nested },
1165 { 21, BER_CLASS_CON, 21, 0, dissect_genm },
1166 { 22, BER_CLASS_CON, 22, 0, dissect_genp },
1167 { 23, BER_CLASS_CON, 23, 0, dissect_error },
1168 { 0, 0, 0, 0, NULL }
1172 dissect_cmp_PKIBody(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1173 offset = dissect_ber_old_choice(actx, tree, tvb, offset,
1174 PKIBody_choice, hf_index, ett_cmp_PKIBody,
1179 static int dissect_body(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1180 return dissect_cmp_PKIBody(FALSE, tvb, offset, actx, tree, hf_cmp_body);
1186 dissect_cmp_PKIProtection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1187 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1193 static int dissect_protection(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1194 return dissect_cmp_PKIProtection(FALSE, tvb, offset, actx, tree, hf_cmp_protection);
1198 static const ber_old_sequence_t PKIMessage_sequence[] = {
1199 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1200 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1201 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_protection },
1202 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_extraCerts },
1207 dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1208 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1209 PKIMessage_sequence, hf_index, ett_cmp_PKIMessage);
1215 static const ber_old_sequence_t ProtectedPart_sequence[] = {
1216 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1217 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1222 dissect_cmp_ProtectedPart(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1223 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1224 ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart);
1232 dissect_cmp_PasswordBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1233 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1239 static const ber_old_sequence_t PBMParameter_sequence[] = {
1240 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt },
1241 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1242 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount },
1243 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1248 dissect_cmp_PBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1249 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1250 PBMParameter_sequence, hf_index, ett_cmp_PBMParameter);
1258 dissect_cmp_DHBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1259 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1265 static const ber_old_sequence_t DHBMParameter_sequence[] = {
1266 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1267 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1272 dissect_cmp_DHBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1273 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1274 DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter);
1282 dissect_cmp_OOBCert(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1283 offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1291 dissect_cmp_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1292 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1298 static int dissect_hashVal(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1299 return dissect_cmp_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_hashVal);
1303 static const ber_old_sequence_t OOBCertHash_sequence[] = {
1304 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_hashAlg },
1305 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_certId },
1306 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_hashVal },
1311 dissect_cmp_OOBCertHash(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1312 offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset,
1313 OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash);
1319 /*--- End of included file: packet-cmp-fn.c ---*/
1320 #line 75 "packet-cmp-template.c"
1323 dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx)
1325 return dissect_cmp_PKIMessage(FALSE, tvb, 0, actx,tree, -1);
1328 #define CMP_TYPE_PKIMSG 0
1329 #define CMP_TYPE_POLLREP 1
1330 #define CMP_TYPE_POLLREQ 2
1331 #define CMP_TYPE_NEGPOLLREP 3
1332 #define CMP_TYPE_PARTIALMSGREP 4
1333 #define CMP_TYPE_FINALMSGREP 5
1334 #define CMP_TYPE_ERRORMSGREP 6
1335 static const value_string cmp_pdu_types[] = {
1336 { CMP_TYPE_PKIMSG, "pkiMsg" },
1337 { CMP_TYPE_POLLREP, "pollRep" },
1338 { CMP_TYPE_POLLREQ, "pollReq" },
1339 { CMP_TYPE_NEGPOLLREP, "negPollRep" },
1340 { CMP_TYPE_PARTIALMSGREP, "partialMsgRep" },
1341 { CMP_TYPE_FINALMSGREP, "finalMsgRep" },
1342 { CMP_TYPE_ERRORMSGREP, "errorMsgRep" },
1346 static void dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1352 proto_item *item=NULL;
1353 proto_tree *tree=NULL;
1354 asn1_ctx_t asn1_ctx;
1356 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1358 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1359 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1361 if (check_col(pinfo->cinfo, COL_INFO)) {
1362 col_clear(pinfo->cinfo, COL_INFO);
1364 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1369 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1370 tree = proto_item_add_subtree(item, ett_cmp);
1373 pdu_len=tvb_get_ntohl(tvb, 0);
1374 pdu_type=tvb_get_guint8(tvb, 4);
1376 proto_tree_add_uint(tree, hf_cmp_rm, tvb, 0, 4, pdu_len);
1377 proto_tree_add_uint(tree, hf_cmp_type, tvb, 4, 1, pdu_type);
1379 if (check_col (pinfo->cinfo, COL_INFO)) {
1380 col_set_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x"));
1384 case CMP_TYPE_PKIMSG:
1385 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1386 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1388 case CMP_TYPE_POLLREP:
1389 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1391 ts.secs = tvb_get_ntohl(tvb, 4);
1393 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1395 case CMP_TYPE_POLLREQ:
1396 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1398 case CMP_TYPE_NEGPOLLREP:
1400 case CMP_TYPE_PARTIALMSGREP:
1401 proto_tree_add_item(tree, hf_cmp_next_poll_ref, tvb, 0, 4, FALSE);
1403 ts.secs = tvb_get_ntohl(tvb, 4);
1405 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1407 next_tvb = tvb_new_subset(tvb, 13, tvb_length_remaining(tvb, 13), pdu_len);
1408 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1410 case CMP_TYPE_FINALMSGREP:
1411 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1412 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1414 case CMP_TYPE_ERRORMSGREP:
1421 static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1426 * Get the length of the CMP-over-TCP packet.
1428 plen = tvb_get_ntohl(tvb, offset);
1433 /* CMP over TCP RFC2510 section 5.2 */
1435 dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1440 /* only attempt to dissect it as CMP over TCP if we have
1443 if (!tvb_bytes_exist(tvb, 0, 5)) {
1447 pdu_len=tvb_get_ntohl(tvb, 0);
1448 pdu_type=tvb_get_guint8(tvb, 4);
1450 /* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1452 * It is definitely at least 1 byte to accomodate the flags byte
1454 if((pdu_len<=0)||(pdu_len>10000)){
1457 /* type is between 0 and 6 */
1461 /* type 0 contains a PKI message and must therefore be >= 3 bytes
1462 * long (flags + BER TAG + BER LENGTH
1464 if((pdu_type==0)&&(pdu_len<3)){
1468 tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, 4, get_cmp_pdu_len,
1469 dissect_cmp_tcp_pdu);
1471 return tvb_length(tvb);
1475 dissect_cmp_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1477 proto_item *item=NULL;
1478 proto_tree *tree=NULL;
1479 asn1_ctx_t asn1_ctx;
1481 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1483 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1484 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1486 if (check_col(pinfo->cinfo, COL_INFO)) {
1487 col_clear(pinfo->cinfo, COL_INFO);
1489 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1494 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1495 tree = proto_item_add_subtree(item, ett_cmp);
1498 return dissect_cmp_pdu(tvb, tree, &asn1_ctx);
1502 /*--- proto_register_cmp ----------------------------------------------*/
1503 void proto_register_cmp(void) {
1505 /* List of fields */
1506 static hf_register_info hf[] = {
1508 { "InfoType", "cmp.type.oid",
1509 FT_STRING, BASE_NONE, NULL, 0,
1510 "Type of InfoTypeAndValue", HFILL }},
1512 { "Record Marker", "cmp.rm",
1513 FT_UINT32, BASE_DEC, NULL, 0,
1514 "Record Marker length of PDU in bytes", HFILL }},
1516 { "Type", "cmp.type",
1517 FT_UINT8, BASE_DEC, VALS(cmp_pdu_types), 0,
1518 "PDU Type", HFILL }},
1520 { "Polling Reference", "cmp.poll_ref",
1521 FT_UINT32, BASE_HEX, NULL, 0,
1523 { &hf_cmp_next_poll_ref,
1524 { "Next Polling Reference", "cmp.next_poll_ref",
1525 FT_UINT32, BASE_HEX, NULL, 0,
1528 { "Time to check Back", "cmp.ttcb",
1529 FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0,
1532 /*--- Included file: packet-cmp-hfarr.c ---*/
1533 #line 1 "packet-cmp-hfarr.c"
1535 { "header", "cmp.header",
1536 FT_NONE, BASE_NONE, NULL, 0,
1537 "cmp.PKIHeader", HFILL }},
1539 { "body", "cmp.body",
1540 FT_UINT32, BASE_DEC, VALS(cmp_PKIBody_vals), 0,
1541 "cmp.PKIBody", HFILL }},
1542 { &hf_cmp_protection,
1543 { "protection", "cmp.protection",
1544 FT_BYTES, BASE_HEX, NULL, 0,
1545 "cmp.PKIProtection", HFILL }},
1546 { &hf_cmp_extraCerts,
1547 { "extraCerts", "cmp.extraCerts",
1548 FT_UINT32, BASE_DEC, NULL, 0,
1549 "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1550 { &hf_cmp_extraCerts_item,
1551 { "Item", "cmp.extraCerts_item",
1552 FT_NONE, BASE_NONE, NULL, 0,
1553 "pkix1explicit.Certificate", HFILL }},
1555 { "pvno", "cmp.pvno",
1556 FT_INT32, BASE_DEC, VALS(cmp_T_pvno_vals), 0,
1557 "cmp.T_pvno", HFILL }},
1559 { "sender", "cmp.sender",
1560 FT_UINT32, BASE_DEC, NULL, 0,
1561 "pkix1implicit.GeneralName", HFILL }},
1562 { &hf_cmp_recipient,
1563 { "recipient", "cmp.recipient",
1564 FT_UINT32, BASE_DEC, NULL, 0,
1565 "pkix1implicit.GeneralName", HFILL }},
1566 { &hf_cmp_messageTime,
1567 { "messageTime", "cmp.messageTime",
1568 FT_STRING, BASE_NONE, NULL, 0,
1569 "cmp.GeneralizedTime", HFILL }},
1570 { &hf_cmp_protectionAlg,
1571 { "protectionAlg", "cmp.protectionAlg",
1572 FT_NONE, BASE_NONE, NULL, 0,
1573 "pkix1explicit.AlgorithmIdentifier", HFILL }},
1574 { &hf_cmp_senderKID,
1575 { "senderKID", "cmp.senderKID",
1576 FT_BYTES, BASE_HEX, NULL, 0,
1577 "cmp.KeyIdentifier", HFILL }},
1579 { "recipKID", "cmp.recipKID",
1580 FT_BYTES, BASE_HEX, NULL, 0,
1581 "cmp.KeyIdentifier", HFILL }},
1582 { &hf_cmp_transactionID,
1583 { "transactionID", "cmp.transactionID",
1584 FT_BYTES, BASE_HEX, NULL, 0,
1585 "cmp.OCTET_STRING", HFILL }},
1586 { &hf_cmp_senderNonce,
1587 { "senderNonce", "cmp.senderNonce",
1588 FT_BYTES, BASE_HEX, NULL, 0,
1589 "cmp.OCTET_STRING", HFILL }},
1590 { &hf_cmp_recipNonce,
1591 { "recipNonce", "cmp.recipNonce",
1592 FT_BYTES, BASE_HEX, NULL, 0,
1593 "cmp.OCTET_STRING", HFILL }},
1595 { "freeText", "cmp.freeText",
1596 FT_UINT32, BASE_DEC, NULL, 0,
1597 "cmp.PKIFreeText", HFILL }},
1598 { &hf_cmp_generalInfo,
1599 { "generalInfo", "cmp.generalInfo",
1600 FT_UINT32, BASE_DEC, NULL, 0,
1601 "cmp.SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue", HFILL }},
1602 { &hf_cmp_generalInfo_item,
1603 { "Item", "cmp.generalInfo_item",
1604 FT_NONE, BASE_NONE, NULL, 0,
1605 "cmp.InfoTypeAndValue", HFILL }},
1606 { &hf_cmp_PKIFreeText_item,
1607 { "Item", "cmp.PKIFreeText_item",
1608 FT_STRING, BASE_NONE, NULL, 0,
1609 "cmp.UTF8String", HFILL }},
1612 FT_UINT32, BASE_DEC, NULL, 0,
1613 "crmf.CertReqMessages", HFILL }},
1616 FT_NONE, BASE_NONE, NULL, 0,
1617 "cmp.CertRepMessage", HFILL }},
1620 FT_UINT32, BASE_DEC, NULL, 0,
1621 "crmf.CertReqMessages", HFILL }},
1624 FT_NONE, BASE_NONE, NULL, 0,
1625 "cmp.CertRepMessage", HFILL }},
1627 { "popdecc", "cmp.popdecc",
1628 FT_UINT32, BASE_DEC, NULL, 0,
1629 "cmp.POPODecKeyChallContent", HFILL }},
1631 { "popdecr", "cmp.popdecr",
1632 FT_UINT32, BASE_DEC, NULL, 0,
1633 "cmp.POPODecKeyRespContent", HFILL }},
1636 FT_UINT32, BASE_DEC, NULL, 0,
1637 "crmf.CertReqMessages", HFILL }},
1640 FT_NONE, BASE_NONE, NULL, 0,
1641 "cmp.CertRepMessage", HFILL }},
1644 FT_UINT32, BASE_DEC, NULL, 0,
1645 "crmf.CertReqMessages", HFILL }},
1648 FT_NONE, BASE_NONE, NULL, 0,
1649 "cmp.KeyRecRepContent", HFILL }},
1652 FT_UINT32, BASE_DEC, NULL, 0,
1653 "cmp.RevReqContent", HFILL }},
1656 FT_NONE, BASE_NONE, NULL, 0,
1657 "cmp.RevRepContent", HFILL }},
1660 FT_UINT32, BASE_DEC, NULL, 0,
1661 "crmf.CertReqMessages", HFILL }},
1664 FT_NONE, BASE_NONE, NULL, 0,
1665 "cmp.CertRepMessage", HFILL }},
1667 { "ckuann", "cmp.ckuann",
1668 FT_NONE, BASE_NONE, NULL, 0,
1669 "cmp.CAKeyUpdAnnContent", HFILL }},
1671 { "cann", "cmp.cann",
1672 FT_NONE, BASE_NONE, NULL, 0,
1673 "cmp.CertAnnContent", HFILL }},
1675 { "rann", "cmp.rann",
1676 FT_NONE, BASE_NONE, NULL, 0,
1677 "cmp.RevAnnContent", HFILL }},
1679 { "crlann", "cmp.crlann",
1680 FT_UINT32, BASE_DEC, NULL, 0,
1681 "cmp.CRLAnnContent", HFILL }},
1683 { "conf", "cmp.conf",
1684 FT_NONE, BASE_NONE, NULL, 0,
1685 "cmp.PKIConfirmContent", HFILL }},
1687 { "nested", "cmp.nested",
1688 FT_NONE, BASE_NONE, NULL, 0,
1689 "cmp.NestedMessageContent", HFILL }},
1691 { "genm", "cmp.genm",
1692 FT_UINT32, BASE_DEC, NULL, 0,
1693 "cmp.GenMsgContent", HFILL }},
1695 { "genp", "cmp.genp",
1696 FT_UINT32, BASE_DEC, NULL, 0,
1697 "cmp.GenRepContent", HFILL }},
1699 { "error", "cmp.error",
1700 FT_NONE, BASE_NONE, NULL, 0,
1701 "cmp.ErrorMsgContent", HFILL }},
1703 { "salt", "cmp.salt",
1704 FT_BYTES, BASE_HEX, NULL, 0,
1705 "cmp.OCTET_STRING", HFILL }},
1708 FT_NONE, BASE_NONE, NULL, 0,
1709 "pkix1explicit.AlgorithmIdentifier", HFILL }},
1710 { &hf_cmp_iterationCount,
1711 { "iterationCount", "cmp.iterationCount",
1712 FT_INT32, BASE_DEC, NULL, 0,
1713 "cmp.INTEGER", HFILL }},
1716 FT_NONE, BASE_NONE, NULL, 0,
1717 "pkix1explicit.AlgorithmIdentifier", HFILL }},
1719 { "status", "cmp.status",
1720 FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
1721 "cmp.PKIStatus", HFILL }},
1722 { &hf_cmp_statusString,
1723 { "statusString", "cmp.statusString",
1724 FT_UINT32, BASE_DEC, NULL, 0,
1725 "cmp.PKIFreeText", HFILL }},
1727 { "failInfo", "cmp.failInfo",
1728 FT_BYTES, BASE_HEX, NULL, 0,
1729 "cmp.PKIFailureInfo", HFILL }},
1731 { "hashAlg", "cmp.hashAlg",
1732 FT_NONE, BASE_NONE, NULL, 0,
1733 "pkix1explicit.AlgorithmIdentifier", HFILL }},
1735 { "certId", "cmp.certId",
1736 FT_NONE, BASE_NONE, NULL, 0,
1737 "crmf.CertId", HFILL }},
1739 { "hashVal", "cmp.hashVal",
1740 FT_BYTES, BASE_HEX, NULL, 0,
1741 "cmp.BIT_STRING", HFILL }},
1742 { &hf_cmp_POPODecKeyChallContent_item,
1743 { "Item", "cmp.POPODecKeyChallContent_item",
1744 FT_NONE, BASE_NONE, NULL, 0,
1745 "cmp.Challenge", HFILL }},
1747 { "witness", "cmp.witness",
1748 FT_BYTES, BASE_HEX, NULL, 0,
1749 "cmp.OCTET_STRING", HFILL }},
1750 { &hf_cmp_challenge,
1751 { "challenge", "cmp.challenge",
1752 FT_BYTES, BASE_HEX, NULL, 0,
1753 "cmp.OCTET_STRING", HFILL }},
1754 { &hf_cmp_POPODecKeyRespContent_item,
1755 { "Item", "cmp.POPODecKeyRespContent_item",
1756 FT_INT32, BASE_DEC, NULL, 0,
1757 "cmp.INTEGER", HFILL }},
1759 { "caPubs", "cmp.caPubs",
1760 FT_UINT32, BASE_DEC, NULL, 0,
1761 "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1762 { &hf_cmp_caPubs_item,
1763 { "Item", "cmp.caPubs_item",
1764 FT_NONE, BASE_NONE, NULL, 0,
1765 "pkix1explicit.Certificate", HFILL }},
1767 { "response", "cmp.response",
1768 FT_UINT32, BASE_DEC, NULL, 0,
1769 "cmp.SEQUENCE_OF_CertResponse", HFILL }},
1770 { &hf_cmp_response_item,
1771 { "Item", "cmp.response_item",
1772 FT_NONE, BASE_NONE, NULL, 0,
1773 "cmp.CertResponse", HFILL }},
1774 { &hf_cmp_certReqId,
1775 { "certReqId", "cmp.certReqId",
1776 FT_INT32, BASE_DEC, NULL, 0,
1777 "cmp.INTEGER", HFILL }},
1778 { &hf_cmp_status_01,
1779 { "status", "cmp.status",
1780 FT_NONE, BASE_NONE, NULL, 0,
1781 "cmp.PKIStatusInfo", HFILL }},
1782 { &hf_cmp_certifiedKeyPair,
1783 { "certifiedKeyPair", "cmp.certifiedKeyPair",
1784 FT_NONE, BASE_NONE, NULL, 0,
1785 "cmp.CertifiedKeyPair", HFILL }},
1787 { "rspInfo", "cmp.rspInfo",
1788 FT_BYTES, BASE_HEX, NULL, 0,
1789 "cmp.OCTET_STRING", HFILL }},
1790 { &hf_cmp_certOrEncCert,
1791 { "certOrEncCert", "cmp.certOrEncCert",
1792 FT_UINT32, BASE_DEC, VALS(cmp_CertOrEncCert_vals), 0,
1793 "cmp.CertOrEncCert", HFILL }},
1794 { &hf_cmp_privateKey,
1795 { "privateKey", "cmp.privateKey",
1796 FT_NONE, BASE_NONE, NULL, 0,
1797 "crmf.EncryptedValue", HFILL }},
1798 { &hf_cmp_publicationInfo,
1799 { "publicationInfo", "cmp.publicationInfo",
1800 FT_NONE, BASE_NONE, NULL, 0,
1801 "crmf.PKIPublicationInfo", HFILL }},
1802 { &hf_cmp_certificate,
1803 { "certificate", "cmp.certificate",
1804 FT_NONE, BASE_NONE, NULL, 0,
1805 "pkix1explicit.Certificate", HFILL }},
1806 { &hf_cmp_encryptedCert,
1807 { "encryptedCert", "cmp.encryptedCert",
1808 FT_NONE, BASE_NONE, NULL, 0,
1809 "crmf.EncryptedValue", HFILL }},
1810 { &hf_cmp_newSigCert,
1811 { "newSigCert", "cmp.newSigCert",
1812 FT_NONE, BASE_NONE, NULL, 0,
1813 "pkix1explicit.Certificate", HFILL }},
1815 { "caCerts", "cmp.caCerts",
1816 FT_UINT32, BASE_DEC, NULL, 0,
1817 "cmp.SEQUENCE_SIZE_1_MAX_OF_Certificate", HFILL }},
1818 { &hf_cmp_caCerts_item,
1819 { "Item", "cmp.caCerts_item",
1820 FT_NONE, BASE_NONE, NULL, 0,
1821 "pkix1explicit.Certificate", HFILL }},
1822 { &hf_cmp_keyPairHist,
1823 { "keyPairHist", "cmp.keyPairHist",
1824 FT_UINT32, BASE_DEC, NULL, 0,
1825 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair", HFILL }},
1826 { &hf_cmp_keyPairHist_item,
1827 { "Item", "cmp.keyPairHist_item",
1828 FT_NONE, BASE_NONE, NULL, 0,
1829 "cmp.CertifiedKeyPair", HFILL }},
1830 { &hf_cmp_RevReqContent_item,
1831 { "Item", "cmp.RevReqContent_item",
1832 FT_NONE, BASE_NONE, NULL, 0,
1833 "cmp.RevDetails", HFILL }},
1834 { &hf_cmp_certDetails,
1835 { "certDetails", "cmp.certDetails",
1836 FT_NONE, BASE_NONE, NULL, 0,
1837 "crmf.CertTemplate", HFILL }},
1838 { &hf_cmp_revocationReason,
1839 { "revocationReason", "cmp.revocationReason",
1840 FT_BYTES, BASE_HEX, NULL, 0,
1841 "pkix1implicit.ReasonFlags", HFILL }},
1842 { &hf_cmp_badSinceDate,
1843 { "badSinceDate", "cmp.badSinceDate",
1844 FT_STRING, BASE_NONE, NULL, 0,
1845 "cmp.GeneralizedTime", HFILL }},
1846 { &hf_cmp_crlEntryDetails,
1847 { "crlEntryDetails", "cmp.crlEntryDetails",
1848 FT_UINT32, BASE_DEC, NULL, 0,
1849 "pkix1explicit.Extensions", HFILL }},
1850 { &hf_cmp_status_02,
1851 { "status", "cmp.status",
1852 FT_UINT32, BASE_DEC, NULL, 0,
1853 "cmp.SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo", HFILL }},
1854 { &hf_cmp_status_item,
1855 { "Item", "cmp.status_item",
1856 FT_NONE, BASE_NONE, NULL, 0,
1857 "cmp.PKIStatusInfo", HFILL }},
1859 { "revCerts", "cmp.revCerts",
1860 FT_UINT32, BASE_DEC, NULL, 0,
1861 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertId", HFILL }},
1862 { &hf_cmp_revCerts_item,
1863 { "Item", "cmp.revCerts_item",
1864 FT_NONE, BASE_NONE, NULL, 0,
1865 "crmf.CertId", HFILL }},
1867 { "crls", "cmp.crls",
1868 FT_UINT32, BASE_DEC, NULL, 0,
1869 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertificateList", HFILL }},
1870 { &hf_cmp_crls_item,
1871 { "Item", "cmp.crls_item",
1872 FT_NONE, BASE_NONE, NULL, 0,
1873 "pkix1explicit.CertificateList", HFILL }},
1874 { &hf_cmp_oldWithNew,
1875 { "oldWithNew", "cmp.oldWithNew",
1876 FT_NONE, BASE_NONE, NULL, 0,
1877 "pkix1explicit.Certificate", HFILL }},
1878 { &hf_cmp_newWithOld,
1879 { "newWithOld", "cmp.newWithOld",
1880 FT_NONE, BASE_NONE, NULL, 0,
1881 "pkix1explicit.Certificate", HFILL }},
1882 { &hf_cmp_newWithNew,
1883 { "newWithNew", "cmp.newWithNew",
1884 FT_NONE, BASE_NONE, NULL, 0,
1885 "pkix1explicit.Certificate", HFILL }},
1886 { &hf_cmp_willBeRevokedAt,
1887 { "willBeRevokedAt", "cmp.willBeRevokedAt",
1888 FT_STRING, BASE_NONE, NULL, 0,
1889 "cmp.GeneralizedTime", HFILL }},
1890 { &hf_cmp_crlDetails,
1891 { "crlDetails", "cmp.crlDetails",
1892 FT_UINT32, BASE_DEC, NULL, 0,
1893 "pkix1explicit.Extensions", HFILL }},
1894 { &hf_cmp_CRLAnnContent_item,
1895 { "Item", "cmp.CRLAnnContent_item",
1896 FT_NONE, BASE_NONE, NULL, 0,
1897 "pkix1explicit.CertificateList", HFILL }},
1899 { "infoType", "cmp.infoType",
1900 FT_OID, BASE_NONE, NULL, 0,
1901 "cmp.T_infoType", HFILL }},
1902 { &hf_cmp_infoValue,
1903 { "infoValue", "cmp.infoValue",
1904 FT_NONE, BASE_NONE, NULL, 0,
1905 "cmp.T_infoValue", HFILL }},
1906 { &hf_cmp_GenMsgContent_item,
1907 { "Item", "cmp.GenMsgContent_item",
1908 FT_NONE, BASE_NONE, NULL, 0,
1909 "cmp.InfoTypeAndValue", HFILL }},
1910 { &hf_cmp_GenRepContent_item,
1911 { "Item", "cmp.GenRepContent_item",
1912 FT_NONE, BASE_NONE, NULL, 0,
1913 "cmp.InfoTypeAndValue", HFILL }},
1914 { &hf_cmp_pKIStatusInfo,
1915 { "pKIStatusInfo", "cmp.pKIStatusInfo",
1916 FT_NONE, BASE_NONE, NULL, 0,
1917 "cmp.PKIStatusInfo", HFILL }},
1918 { &hf_cmp_errorCode,
1919 { "errorCode", "cmp.errorCode",
1920 FT_INT32, BASE_DEC, NULL, 0,
1921 "cmp.INTEGER", HFILL }},
1922 { &hf_cmp_errorDetails,
1923 { "errorDetails", "cmp.errorDetails",
1924 FT_UINT32, BASE_DEC, NULL, 0,
1925 "cmp.PKIFreeText", HFILL }},
1926 { &hf_cmp_PKIFailureInfo_badAlg,
1927 { "badAlg", "cmp.badAlg",
1928 FT_BOOLEAN, 8, NULL, 0x80,
1930 { &hf_cmp_PKIFailureInfo_badMessageCheck,
1931 { "badMessageCheck", "cmp.badMessageCheck",
1932 FT_BOOLEAN, 8, NULL, 0x40,
1934 { &hf_cmp_PKIFailureInfo_badRequest,
1935 { "badRequest", "cmp.badRequest",
1936 FT_BOOLEAN, 8, NULL, 0x20,
1938 { &hf_cmp_PKIFailureInfo_badTime,
1939 { "badTime", "cmp.badTime",
1940 FT_BOOLEAN, 8, NULL, 0x10,
1942 { &hf_cmp_PKIFailureInfo_badCertId,
1943 { "badCertId", "cmp.badCertId",
1944 FT_BOOLEAN, 8, NULL, 0x08,
1946 { &hf_cmp_PKIFailureInfo_badDataFormat,
1947 { "badDataFormat", "cmp.badDataFormat",
1948 FT_BOOLEAN, 8, NULL, 0x04,
1950 { &hf_cmp_PKIFailureInfo_wrongAuthority,
1951 { "wrongAuthority", "cmp.wrongAuthority",
1952 FT_BOOLEAN, 8, NULL, 0x02,
1954 { &hf_cmp_PKIFailureInfo_incorrectData,
1955 { "incorrectData", "cmp.incorrectData",
1956 FT_BOOLEAN, 8, NULL, 0x01,
1958 { &hf_cmp_PKIFailureInfo_missingTimeStamp,
1959 { "missingTimeStamp", "cmp.missingTimeStamp",
1960 FT_BOOLEAN, 8, NULL, 0x80,
1962 { &hf_cmp_PKIFailureInfo_badPOP,
1963 { "badPOP", "cmp.badPOP",
1964 FT_BOOLEAN, 8, NULL, 0x40,
1967 /*--- End of included file: packet-cmp-hfarr.c ---*/
1968 #line 286 "packet-cmp-template.c"
1971 /* List of subtrees */
1972 static gint *ett[] = {
1975 /*--- Included file: packet-cmp-ettarr.c ---*/
1976 #line 1 "packet-cmp-ettarr.c"
1977 &ett_cmp_PKIMessage,
1978 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate,
1980 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue,
1981 &ett_cmp_PKIFreeText,
1983 &ett_cmp_ProtectedPart,
1984 &ett_cmp_PBMParameter,
1985 &ett_cmp_DHBMParameter,
1986 &ett_cmp_PKIFailureInfo,
1987 &ett_cmp_PKIStatusInfo,
1988 &ett_cmp_OOBCertHash,
1989 &ett_cmp_POPODecKeyChallContent,
1991 &ett_cmp_POPODecKeyRespContent,
1992 &ett_cmp_CertRepMessage,
1993 &ett_cmp_SEQUENCE_OF_CertResponse,
1994 &ett_cmp_CertResponse,
1995 &ett_cmp_CertifiedKeyPair,
1996 &ett_cmp_CertOrEncCert,
1997 &ett_cmp_KeyRecRepContent,
1998 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair,
1999 &ett_cmp_RevReqContent,
2000 &ett_cmp_RevDetails,
2001 &ett_cmp_RevRepContent,
2002 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo,
2003 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId,
2004 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList,
2005 &ett_cmp_CAKeyUpdAnnContent,
2006 &ett_cmp_RevAnnContent,
2007 &ett_cmp_CRLAnnContent,
2008 &ett_cmp_InfoTypeAndValue,
2009 &ett_cmp_GenMsgContent,
2010 &ett_cmp_GenRepContent,
2011 &ett_cmp_ErrorMsgContent,
2013 /*--- End of included file: packet-cmp-ettarr.c ---*/
2014 #line 292 "packet-cmp-template.c"
2016 module_t *cmp_module;
2018 /* Register protocol */
2019 proto_cmp = proto_register_protocol(PNAME, PSNAME, PFNAME);
2021 /* Register fields and subtrees */
2022 proto_register_field_array(proto_cmp, hf, array_length(hf));
2023 proto_register_subtree_array(ett, array_length(ett));
2025 cmp_module = prefs_register_protocol(proto_cmp, NULL);
2026 prefs_register_bool_preference(cmp_module, "desegment",
2027 "Reassemble CMP-over-TCP messages spanning multiple TCP segments",
2028 "Whether the CMP-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
2029 "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2034 /*--- proto_reg_handoff_cmp -------------------------------------------*/
2035 void proto_reg_handoff_cmp(void) {
2036 dissector_handle_t cmp_http_handle;
2037 dissector_handle_t cmp_tcp_handle;
2039 cmp_http_handle = new_create_dissector_handle(dissect_cmp_http, proto_cmp);
2040 dissector_add_string("media_type", "application/pkixcmp", cmp_http_handle);
2042 cmp_tcp_handle = new_create_dissector_handle(dissect_cmp_tcp, proto_cmp);
2043 dissector_add("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
2045 /*#include "packet-cmp-dis-tab.c"*/