1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler */
4 /* ../../tools/asn2eth.py -X -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 * Ethereal - Network traffic analyzer
16 * By Gerald Combs <gerald@ethereal.com>
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 "packet-ber.h"
46 #include "packet-cmp.h"
47 #include "packet-crmf.h"
48 #include "packet-pkix1explicit.h"
49 #include "packet-pkix1implicit.h"
50 #include <epan/emem.h>
51 #include "packet-tcp.h"
52 #include <epan/prefs.h>
53 #include <epan/nstime.h>
55 #define PNAME "Certificate Management Protocol"
59 #define TCP_PORT_CMP 829
61 /* desegmentation of CMP over TCP */
62 static gboolean cmp_desegment = TRUE;
64 /* Initialize the protocol and registered fields */
66 static int hf_cmp_type_oid = -1;
67 static int hf_cmp_rm = -1;
68 static int hf_cmp_type = -1;
69 static int hf_cmp_poll_ref = -1;
70 static int hf_cmp_next_poll_ref = -1;
71 static int hf_cmp_ttcb = -1;
73 /*--- Included file: packet-cmp-hf.c ---*/
74 #line 1 "packet-cmp-hf.c"
75 static int hf_cmp_header = -1; /* PKIHeader */
76 static int hf_cmp_body = -1; /* PKIBody */
77 static int hf_cmp_protection = -1; /* PKIProtection */
78 static int hf_cmp_extraCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
79 static int hf_cmp_extraCerts_item = -1; /* Certificate */
80 static int hf_cmp_pvno = -1; /* T_pvno */
81 static int hf_cmp_sender = -1; /* GeneralName */
82 static int hf_cmp_recipient = -1; /* GeneralName */
83 static int hf_cmp_messageTime = -1; /* GeneralizedTime */
84 static int hf_cmp_protectionAlg = -1; /* AlgorithmIdentifier */
85 static int hf_cmp_senderKID = -1; /* KeyIdentifier */
86 static int hf_cmp_recipKID = -1; /* KeyIdentifier */
87 static int hf_cmp_transactionID = -1; /* OCTET_STRING */
88 static int hf_cmp_senderNonce = -1; /* OCTET_STRING */
89 static int hf_cmp_recipNonce = -1; /* OCTET_STRING */
90 static int hf_cmp_freeText = -1; /* PKIFreeText */
91 static int hf_cmp_generalInfo = -1; /* SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue */
92 static int hf_cmp_generalInfo_item = -1; /* InfoTypeAndValue */
93 static int hf_cmp_PKIFreeText_item = -1; /* UTF8String */
94 static int hf_cmp_ir = -1; /* CertReqMessages */
95 static int hf_cmp_ip = -1; /* CertRepMessage */
96 static int hf_cmp_cr = -1; /* CertReqMessages */
97 static int hf_cmp_cp = -1; /* CertRepMessage */
98 static int hf_cmp_popdecc = -1; /* POPODecKeyChallContent */
99 static int hf_cmp_popdecr = -1; /* POPODecKeyRespContent */
100 static int hf_cmp_kur = -1; /* CertReqMessages */
101 static int hf_cmp_kup = -1; /* CertRepMessage */
102 static int hf_cmp_krr = -1; /* CertReqMessages */
103 static int hf_cmp_krp = -1; /* KeyRecRepContent */
104 static int hf_cmp_rr = -1; /* RevReqContent */
105 static int hf_cmp_rp = -1; /* RevRepContent */
106 static int hf_cmp_ccr = -1; /* CertReqMessages */
107 static int hf_cmp_ccp = -1; /* CertRepMessage */
108 static int hf_cmp_ckuann = -1; /* CAKeyUpdAnnContent */
109 static int hf_cmp_cann = -1; /* CertAnnContent */
110 static int hf_cmp_rann = -1; /* RevAnnContent */
111 static int hf_cmp_crlann = -1; /* CRLAnnContent */
112 static int hf_cmp_conf = -1; /* PKIConfirmContent */
113 static int hf_cmp_nested = -1; /* NestedMessageContent */
114 static int hf_cmp_genm = -1; /* GenMsgContent */
115 static int hf_cmp_genp = -1; /* GenRepContent */
116 static int hf_cmp_error = -1; /* ErrorMsgContent */
117 static int hf_cmp_salt = -1; /* OCTET_STRING */
118 static int hf_cmp_owf = -1; /* AlgorithmIdentifier */
119 static int hf_cmp_iterationCount = -1; /* INTEGER */
120 static int hf_cmp_mac = -1; /* AlgorithmIdentifier */
121 static int hf_cmp_status = -1; /* PKIStatus */
122 static int hf_cmp_statusString = -1; /* PKIFreeText */
123 static int hf_cmp_failInfo = -1; /* PKIFailureInfo */
124 static int hf_cmp_hashAlg = -1; /* AlgorithmIdentifier */
125 static int hf_cmp_certId = -1; /* CertId */
126 static int hf_cmp_hashVal = -1; /* BIT_STRING */
127 static int hf_cmp_POPODecKeyChallContent_item = -1; /* Challenge */
128 static int hf_cmp_witness = -1; /* OCTET_STRING */
129 static int hf_cmp_challenge = -1; /* OCTET_STRING */
130 static int hf_cmp_POPODecKeyRespContent_item = -1; /* INTEGER */
131 static int hf_cmp_caPubs = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
132 static int hf_cmp_caPubs_item = -1; /* Certificate */
133 static int hf_cmp_response = -1; /* SEQUENCE_OF_CertResponse */
134 static int hf_cmp_response_item = -1; /* CertResponse */
135 static int hf_cmp_certReqId = -1; /* INTEGER */
136 static int hf_cmp_status1 = -1; /* PKIStatusInfo */
137 static int hf_cmp_certifiedKeyPair = -1; /* CertifiedKeyPair */
138 static int hf_cmp_rspInfo = -1; /* OCTET_STRING */
139 static int hf_cmp_certOrEncCert = -1; /* CertOrEncCert */
140 static int hf_cmp_privateKey = -1; /* EncryptedValue */
141 static int hf_cmp_publicationInfo = -1; /* PKIPublicationInfo */
142 static int hf_cmp_certificate = -1; /* Certificate */
143 static int hf_cmp_encryptedCert = -1; /* EncryptedValue */
144 static int hf_cmp_newSigCert = -1; /* Certificate */
145 static int hf_cmp_caCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_Certificate */
146 static int hf_cmp_caCerts_item = -1; /* Certificate */
147 static int hf_cmp_keyPairHist = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair */
148 static int hf_cmp_keyPairHist_item = -1; /* CertifiedKeyPair */
149 static int hf_cmp_RevReqContent_item = -1; /* RevDetails */
150 static int hf_cmp_certDetails = -1; /* CertTemplate */
151 static int hf_cmp_revocationReason = -1; /* ReasonFlags */
152 static int hf_cmp_badSinceDate = -1; /* GeneralizedTime */
153 static int hf_cmp_crlEntryDetails = -1; /* Extensions */
154 static int hf_cmp_status2 = -1; /* SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo */
155 static int hf_cmp_status_item = -1; /* PKIStatusInfo */
156 static int hf_cmp_revCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertId */
157 static int hf_cmp_revCerts_item = -1; /* CertId */
158 static int hf_cmp_crls = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertificateList */
159 static int hf_cmp_crls_item = -1; /* CertificateList */
160 static int hf_cmp_oldWithNew = -1; /* Certificate */
161 static int hf_cmp_newWithOld = -1; /* Certificate */
162 static int hf_cmp_newWithNew = -1; /* Certificate */
163 static int hf_cmp_willBeRevokedAt = -1; /* GeneralizedTime */
164 static int hf_cmp_crlDetails = -1; /* Extensions */
165 static int hf_cmp_CRLAnnContent_item = -1; /* CertificateList */
166 static int hf_cmp_infoType = -1; /* T_infoType */
167 static int hf_cmp_infoValue = -1; /* T_infoValue */
168 static int hf_cmp_GenMsgContent_item = -1; /* InfoTypeAndValue */
169 static int hf_cmp_GenRepContent_item = -1; /* InfoTypeAndValue */
170 static int hf_cmp_pKIStatusInfo = -1; /* PKIStatusInfo */
171 static int hf_cmp_errorCode = -1; /* INTEGER */
172 static int hf_cmp_errorDetails = -1; /* PKIFreeText */
174 static int hf_cmp_PKIFailureInfo_badAlg = -1;
175 static int hf_cmp_PKIFailureInfo_badMessageCheck = -1;
176 static int hf_cmp_PKIFailureInfo_badRequest = -1;
177 static int hf_cmp_PKIFailureInfo_badTime = -1;
178 static int hf_cmp_PKIFailureInfo_badCertId = -1;
179 static int hf_cmp_PKIFailureInfo_badDataFormat = -1;
180 static int hf_cmp_PKIFailureInfo_wrongAuthority = -1;
181 static int hf_cmp_PKIFailureInfo_incorrectData = -1;
182 static int hf_cmp_PKIFailureInfo_missingTimeStamp = -1;
183 static int hf_cmp_PKIFailureInfo_badPOP = -1;
185 /*--- End of included file: packet-cmp-hf.c ---*/
186 #line 65 "packet-cmp-template.c"
188 /* Initialize the subtree pointers */
189 static gint ett_cmp = -1;
191 /*--- Included file: packet-cmp-ett.c ---*/
192 #line 1 "packet-cmp-ett.c"
193 static gint ett_cmp_PKIMessage = -1;
194 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate = -1;
195 static gint ett_cmp_PKIHeader = -1;
196 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue = -1;
197 static gint ett_cmp_PKIFreeText = -1;
198 static gint ett_cmp_PKIBody = -1;
199 static gint ett_cmp_ProtectedPart = -1;
200 static gint ett_cmp_PBMParameter = -1;
201 static gint ett_cmp_DHBMParameter = -1;
202 static gint ett_cmp_PKIFailureInfo = -1;
203 static gint ett_cmp_PKIStatusInfo = -1;
204 static gint ett_cmp_OOBCertHash = -1;
205 static gint ett_cmp_POPODecKeyChallContent = -1;
206 static gint ett_cmp_Challenge = -1;
207 static gint ett_cmp_POPODecKeyRespContent = -1;
208 static gint ett_cmp_CertRepMessage = -1;
209 static gint ett_cmp_SEQUENCE_OF_CertResponse = -1;
210 static gint ett_cmp_CertResponse = -1;
211 static gint ett_cmp_CertifiedKeyPair = -1;
212 static gint ett_cmp_CertOrEncCert = -1;
213 static gint ett_cmp_KeyRecRepContent = -1;
214 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair = -1;
215 static gint ett_cmp_RevReqContent = -1;
216 static gint ett_cmp_RevDetails = -1;
217 static gint ett_cmp_RevRepContent = -1;
218 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo = -1;
219 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId = -1;
220 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList = -1;
221 static gint ett_cmp_CAKeyUpdAnnContent = -1;
222 static gint ett_cmp_RevAnnContent = -1;
223 static gint ett_cmp_CRLAnnContent = -1;
224 static gint ett_cmp_InfoTypeAndValue = -1;
225 static gint ett_cmp_GenMsgContent = -1;
226 static gint ett_cmp_GenRepContent = -1;
227 static gint ett_cmp_ErrorMsgContent = -1;
229 /*--- End of included file: packet-cmp-ett.c ---*/
230 #line 69 "packet-cmp-template.c"
232 static const char *object_identifier_id;
236 /*--- Included file: packet-cmp-fn.c ---*/
237 #line 1 "packet-cmp-fn.c"
238 /*--- Cyclic dependencies ---*/
240 /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessage */
241 int dissect_cmp_PKIMessage(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
245 /*--- Fields for imported types ---*/
247 static int dissect_extraCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
248 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_extraCerts_item);
250 static int dissect_sender(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
251 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_cmp_sender);
253 static int dissect_recipient(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
254 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_cmp_recipient);
256 static int dissect_protectionAlg(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
257 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_protectionAlg);
259 static int dissect_ir(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
260 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, pinfo, tree, hf_cmp_ir);
262 static int dissect_cr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
263 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, pinfo, tree, hf_cmp_cr);
265 static int dissect_kur(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
266 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, pinfo, tree, hf_cmp_kur);
268 static int dissect_krr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
269 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, pinfo, tree, hf_cmp_krr);
271 static int dissect_ccr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
272 return dissect_crmf_CertReqMessages(FALSE, tvb, offset, pinfo, tree, hf_cmp_ccr);
274 static int dissect_owf(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
275 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_owf);
277 static int dissect_mac(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
278 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_mac);
280 static int dissect_hashAlg(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
281 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_hashAlg);
283 static int dissect_certId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
284 return dissect_crmf_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_certId);
286 static int dissect_caPubs_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
287 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caPubs_item);
289 static int dissect_privateKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
290 return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_privateKey);
292 static int dissect_publicationInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
293 return dissect_crmf_PKIPublicationInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_publicationInfo);
295 static int dissect_certificate(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
296 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_certificate);
298 static int dissect_encryptedCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
299 return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_encryptedCert);
301 static int dissect_newSigCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
302 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newSigCert);
304 static int dissect_caCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
305 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caCerts_item);
307 static int dissect_certDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
308 return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_cmp_certDetails);
310 static int dissect_revocationReason(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
311 return dissect_pkix1implicit_ReasonFlags(FALSE, tvb, offset, pinfo, tree, hf_cmp_revocationReason);
313 static int dissect_crlEntryDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
314 return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, pinfo, tree, hf_cmp_crlEntryDetails);
316 static int dissect_revCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
317 return dissect_crmf_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_revCerts_item);
319 static int dissect_crls_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
320 return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, pinfo, tree, hf_cmp_crls_item);
322 static int dissect_oldWithNew(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
323 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_oldWithNew);
325 static int dissect_newWithOld(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
326 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newWithOld);
328 static int dissect_newWithNew(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
329 return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newWithNew);
331 static int dissect_crlDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
332 return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, pinfo, tree, hf_cmp_crlDetails);
334 static int dissect_CRLAnnContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
335 return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, pinfo, tree, hf_cmp_CRLAnnContent_item);
341 dissect_cmp_KeyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
342 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
347 static int dissect_senderKID(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
348 return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_senderKID);
350 static int dissect_recipKID(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
351 return dissect_cmp_KeyIdentifier(FALSE, tvb, offset, pinfo, tree, hf_cmp_recipKID);
355 static const value_string cmp_T_pvno_vals[] = {
356 { 1, "ietf-version2" },
362 dissect_cmp_T_pvno(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
363 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
368 static int dissect_pvno(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
369 return dissect_cmp_T_pvno(FALSE, tvb, offset, pinfo, tree, hf_cmp_pvno);
375 dissect_cmp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
376 offset = dissect_ber_GeneralizedTime(implicit_tag, pinfo, tree, tvb, offset, hf_index);
380 static int dissect_messageTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
381 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_cmp_messageTime);
383 static int dissect_badSinceDate(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
384 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_cmp_badSinceDate);
386 static int dissect_willBeRevokedAt(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
387 return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_cmp_willBeRevokedAt);
393 dissect_cmp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
394 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
399 static int dissect_transactionID(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
400 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_transactionID);
402 static int dissect_senderNonce(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
403 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_senderNonce);
405 static int dissect_recipNonce(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
406 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_recipNonce);
408 static int dissect_salt(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
409 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_salt);
411 static int dissect_witness(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
412 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_witness);
414 static int dissect_challenge(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
415 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_challenge);
417 static int dissect_rspInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
418 return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_rspInfo);
424 dissect_cmp_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
425 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
426 pinfo, tree, tvb, offset, hf_index,
431 static int dissect_PKIFreeText_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
432 return dissect_cmp_UTF8String(FALSE, tvb, offset, pinfo, tree, hf_cmp_PKIFreeText_item);
436 static const ber_sequence_t PKIFreeText_sequence_of[1] = {
437 { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_PKIFreeText_item },
441 dissect_cmp_PKIFreeText(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
442 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
443 PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText);
447 static int dissect_freeText(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
448 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, pinfo, tree, hf_cmp_freeText);
450 static int dissect_statusString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
451 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, pinfo, tree, hf_cmp_statusString);
453 static int dissect_errorDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
454 return dissect_cmp_PKIFreeText(FALSE, tvb, offset, pinfo, tree, hf_cmp_errorDetails);
460 dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
461 offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_cmp_type_oid, &object_identifier_id);
465 static int dissect_infoType(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
466 return dissect_cmp_T_infoType(FALSE, tvb, offset, pinfo, tree, hf_cmp_infoType);
472 dissect_cmp_T_infoValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
474 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
480 static int dissect_infoValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
481 return dissect_cmp_T_infoValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_infoValue);
485 static const ber_sequence_t InfoTypeAndValue_sequence[] = {
486 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_infoType },
487 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_infoValue },
492 dissect_cmp_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
493 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
494 InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue);
498 static int dissect_generalInfo_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
499 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_generalInfo_item);
501 static int dissect_GenMsgContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
502 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_GenMsgContent_item);
504 static int dissect_GenRepContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
505 return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_GenRepContent_item);
509 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = {
510 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_generalInfo_item },
514 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
515 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
516 SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue);
520 static int dissect_generalInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
521 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_generalInfo);
525 static const ber_sequence_t PKIHeader_sequence[] = {
526 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pvno },
527 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_sender },
528 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_recipient },
529 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_messageTime },
530 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_protectionAlg },
531 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_senderKID },
532 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_recipKID },
533 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_transactionID },
534 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_senderNonce },
535 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_recipNonce },
536 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_freeText },
537 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_generalInfo },
542 dissect_cmp_PKIHeader(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
543 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
544 PKIHeader_sequence, hf_index, ett_cmp_PKIHeader);
548 static int dissect_header(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
549 return dissect_cmp_PKIHeader(FALSE, tvb, offset, pinfo, tree, hf_cmp_header);
553 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of[1] = {
554 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_extraCerts_item },
558 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
559 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
560 SEQUENCE_SIZE_1_MAX_OF_Certificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate);
564 static int dissect_extraCerts(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
565 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_extraCerts);
567 static int dissect_caPubs(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
568 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caPubs);
570 static int dissect_caCerts(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
571 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caCerts);
577 dissect_cmp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
578 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
583 static int dissect_iterationCount(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
584 return dissect_cmp_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_cmp_iterationCount);
586 static int dissect_POPODecKeyRespContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
587 return dissect_cmp_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_cmp_POPODecKeyRespContent_item);
589 static int dissect_certReqId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
590 return dissect_cmp_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_cmp_certReqId);
592 static int dissect_errorCode(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
593 return dissect_cmp_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_cmp_errorCode);
597 const value_string cmp_PKIStatus_vals[] = {
599 { 1, "grantedWithMods" },
602 { 4, "revocationWarning" },
603 { 5, "revocationNotification" },
604 { 6, "keyUpdateWarning" },
610 dissect_cmp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
611 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
616 static int dissect_status(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
617 return dissect_cmp_PKIStatus(FALSE, tvb, offset, pinfo, tree, hf_cmp_status);
621 static const asn_namedbit PKIFailureInfo_bits[] = {
622 { 0, &hf_cmp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
623 { 1, &hf_cmp_PKIFailureInfo_badMessageCheck, -1, -1, "badMessageCheck", NULL },
624 { 2, &hf_cmp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
625 { 3, &hf_cmp_PKIFailureInfo_badTime, -1, -1, "badTime", NULL },
626 { 4, &hf_cmp_PKIFailureInfo_badCertId, -1, -1, "badCertId", NULL },
627 { 5, &hf_cmp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
628 { 6, &hf_cmp_PKIFailureInfo_wrongAuthority, -1, -1, "wrongAuthority", NULL },
629 { 7, &hf_cmp_PKIFailureInfo_incorrectData, -1, -1, "incorrectData", NULL },
630 { 8, &hf_cmp_PKIFailureInfo_missingTimeStamp, -1, -1, "missingTimeStamp", NULL },
631 { 9, &hf_cmp_PKIFailureInfo_badPOP, -1, -1, "badPOP", NULL },
632 { 0, NULL, 0, 0, NULL, NULL }
636 dissect_cmp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
637 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
638 PKIFailureInfo_bits, hf_index, ett_cmp_PKIFailureInfo,
643 static int dissect_failInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
644 return dissect_cmp_PKIFailureInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_failInfo);
648 static const ber_sequence_t PKIStatusInfo_sequence[] = {
649 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
650 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statusString },
651 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_failInfo },
656 dissect_cmp_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
657 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
658 PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo);
662 static int dissect_status1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
663 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_status1);
665 static int dissect_status_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
666 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_status_item);
668 static int dissect_pKIStatusInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
669 return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_pKIStatusInfo);
673 const value_string cmp_CertOrEncCert_vals[] = {
674 { 0, "certificate" },
675 { 1, "encryptedCert" },
679 static const ber_choice_t CertOrEncCert_choice[] = {
680 { 0, BER_CLASS_CON, 0, 0, dissect_certificate },
681 { 1, BER_CLASS_CON, 1, 0, dissect_encryptedCert },
686 dissect_cmp_CertOrEncCert(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
687 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
688 CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert,
693 static int dissect_certOrEncCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
694 return dissect_cmp_CertOrEncCert(FALSE, tvb, offset, pinfo, tree, hf_cmp_certOrEncCert);
698 static const ber_sequence_t CertifiedKeyPair_sequence[] = {
699 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_certOrEncCert },
700 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_privateKey },
701 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_publicationInfo },
706 dissect_cmp_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
707 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
708 CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair);
712 static int dissect_certifiedKeyPair(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
713 return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, pinfo, tree, hf_cmp_certifiedKeyPair);
715 static int dissect_keyPairHist_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
716 return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, pinfo, tree, hf_cmp_keyPairHist_item);
720 static const ber_sequence_t CertResponse_sequence[] = {
721 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId },
722 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status1 },
723 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certifiedKeyPair },
724 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_rspInfo },
729 dissect_cmp_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
730 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
731 CertResponse_sequence, hf_index, ett_cmp_CertResponse);
735 static int dissect_response_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
736 return dissect_cmp_CertResponse(FALSE, tvb, offset, pinfo, tree, hf_cmp_response_item);
740 static const ber_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = {
741 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response_item },
745 dissect_cmp_SEQUENCE_OF_CertResponse(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
746 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
747 SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse);
751 static int dissect_response(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
752 return dissect_cmp_SEQUENCE_OF_CertResponse(FALSE, tvb, offset, pinfo, tree, hf_cmp_response);
756 static const ber_sequence_t CertRepMessage_sequence[] = {
757 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caPubs },
758 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response },
763 dissect_cmp_CertRepMessage(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
764 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
765 CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage);
769 static int dissect_ip(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
770 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, pinfo, tree, hf_cmp_ip);
772 static int dissect_cp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
773 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, pinfo, tree, hf_cmp_cp);
775 static int dissect_kup(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
776 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, pinfo, tree, hf_cmp_kup);
778 static int dissect_ccp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
779 return dissect_cmp_CertRepMessage(FALSE, tvb, offset, pinfo, tree, hf_cmp_ccp);
783 static const ber_sequence_t Challenge_sequence[] = {
784 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_owf },
785 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_witness },
786 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_challenge },
791 dissect_cmp_Challenge(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
792 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
793 Challenge_sequence, hf_index, ett_cmp_Challenge);
797 static int dissect_POPODecKeyChallContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
798 return dissect_cmp_Challenge(FALSE, tvb, offset, pinfo, tree, hf_cmp_POPODecKeyChallContent_item);
802 static const ber_sequence_t POPODecKeyChallContent_sequence_of[1] = {
803 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyChallContent_item },
807 dissect_cmp_POPODecKeyChallContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
808 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
809 POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent);
813 static int dissect_popdecc(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
814 return dissect_cmp_POPODecKeyChallContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_popdecc);
818 static const ber_sequence_t POPODecKeyRespContent_sequence_of[1] = {
819 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyRespContent_item },
823 dissect_cmp_POPODecKeyRespContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
824 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
825 POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent);
829 static int dissect_popdecr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
830 return dissect_cmp_POPODecKeyRespContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_popdecr);
834 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = {
835 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_keyPairHist_item },
839 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
840 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
841 SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair);
845 static int dissect_keyPairHist(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
846 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(FALSE, tvb, offset, pinfo, tree, hf_cmp_keyPairHist);
850 static const ber_sequence_t KeyRecRepContent_sequence[] = {
851 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status1 },
852 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_newSigCert },
853 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caCerts },
854 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_keyPairHist },
859 dissect_cmp_KeyRecRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
860 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
861 KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent);
865 static int dissect_krp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
866 return dissect_cmp_KeyRecRepContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_krp);
870 static const ber_sequence_t RevDetails_sequence[] = {
871 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certDetails },
872 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_revocationReason },
873 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
874 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlEntryDetails },
879 dissect_cmp_RevDetails(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
880 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
881 RevDetails_sequence, hf_index, ett_cmp_RevDetails);
885 static int dissect_RevReqContent_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
886 return dissect_cmp_RevDetails(FALSE, tvb, offset, pinfo, tree, hf_cmp_RevReqContent_item);
890 static const ber_sequence_t RevReqContent_sequence_of[1] = {
891 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RevReqContent_item },
895 dissect_cmp_RevReqContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
896 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
897 RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent);
901 static int dissect_rr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
902 return dissect_cmp_RevReqContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_rr);
906 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = {
907 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status_item },
911 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
912 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
913 SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo);
917 static int dissect_status2(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
918 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(FALSE, tvb, offset, pinfo, tree, hf_cmp_status2);
922 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = {
923 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_revCerts_item },
927 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
928 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
929 SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId);
933 static int dissect_revCerts(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
934 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_revCerts);
938 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = {
939 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crls_item },
943 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
944 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
945 SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList);
949 static int dissect_crls(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
950 return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(FALSE, tvb, offset, pinfo, tree, hf_cmp_crls);
954 static const ber_sequence_t RevRepContent_sequence[] = {
955 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status2 },
956 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_revCerts },
957 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crls },
962 dissect_cmp_RevRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
963 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
964 RevRepContent_sequence, hf_index, ett_cmp_RevRepContent);
968 static int dissect_rp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
969 return dissect_cmp_RevRepContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_rp);
973 static const ber_sequence_t CAKeyUpdAnnContent_sequence[] = {
974 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_oldWithNew },
975 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithOld },
976 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_newWithNew },
981 dissect_cmp_CAKeyUpdAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
982 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
983 CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent);
987 static int dissect_ckuann(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
988 return dissect_cmp_CAKeyUpdAnnContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_ckuann);
994 dissect_cmp_CertAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
995 offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, pinfo, tree, hf_index);
999 static int dissect_cann(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1000 return dissect_cmp_CertAnnContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_cann);
1004 static const ber_sequence_t RevAnnContent_sequence[] = {
1005 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_status },
1006 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certId },
1007 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_willBeRevokedAt },
1008 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_badSinceDate },
1009 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlDetails },
1014 dissect_cmp_RevAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1015 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1016 RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent);
1020 static int dissect_rann(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1021 return dissect_cmp_RevAnnContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_rann);
1025 static const ber_sequence_t CRLAnnContent_sequence_of[1] = {
1026 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CRLAnnContent_item },
1030 dissect_cmp_CRLAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1031 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1032 CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent);
1036 static int dissect_crlann(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1037 return dissect_cmp_CRLAnnContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_crlann);
1043 dissect_cmp_PKIConfirmContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1044 offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
1048 static int dissect_conf(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1049 return dissect_cmp_PKIConfirmContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_conf);
1055 dissect_cmp_NestedMessageContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1056 offset = dissect_cmp_PKIMessage(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1060 static int dissect_nested(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1061 return dissect_cmp_NestedMessageContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_nested);
1065 static const ber_sequence_t GenMsgContent_sequence_of[1] = {
1066 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenMsgContent_item },
1070 dissect_cmp_GenMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1071 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1072 GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent);
1076 static int dissect_genm(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1077 return dissect_cmp_GenMsgContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_genm);
1081 static const ber_sequence_t GenRepContent_sequence_of[1] = {
1082 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenRepContent_item },
1086 dissect_cmp_GenRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1087 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1088 GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent);
1092 static int dissect_genp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1093 return dissect_cmp_GenRepContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_genp);
1097 static const ber_sequence_t ErrorMsgContent_sequence[] = {
1098 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pKIStatusInfo },
1099 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorCode },
1100 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorDetails },
1105 dissect_cmp_ErrorMsgContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1106 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1107 ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent);
1111 static int dissect_error(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1112 return dissect_cmp_ErrorMsgContent(FALSE, tvb, offset, pinfo, tree, hf_cmp_error);
1116 const value_string cmp_PKIBody_vals[] = {
1143 static const ber_choice_t PKIBody_choice[] = {
1144 { 0, BER_CLASS_CON, 0, 0, dissect_ir },
1145 { 1, BER_CLASS_CON, 1, 0, dissect_ip },
1146 { 2, BER_CLASS_CON, 2, 0, dissect_cr },
1147 { 3, BER_CLASS_CON, 3, 0, dissect_cp },
1148 { 5, BER_CLASS_CON, 5, 0, dissect_popdecc },
1149 { 6, BER_CLASS_CON, 6, 0, dissect_popdecr },
1150 { 7, BER_CLASS_CON, 7, 0, dissect_kur },
1151 { 8, BER_CLASS_CON, 8, 0, dissect_kup },
1152 { 9, BER_CLASS_CON, 9, 0, dissect_krr },
1153 { 10, BER_CLASS_CON, 10, 0, dissect_krp },
1154 { 11, BER_CLASS_CON, 11, 0, dissect_rr },
1155 { 12, BER_CLASS_CON, 12, 0, dissect_rp },
1156 { 13, BER_CLASS_CON, 13, 0, dissect_ccr },
1157 { 14, BER_CLASS_CON, 14, 0, dissect_ccp },
1158 { 15, BER_CLASS_CON, 15, 0, dissect_ckuann },
1159 { 16, BER_CLASS_CON, 16, 0, dissect_cann },
1160 { 17, BER_CLASS_CON, 17, 0, dissect_rann },
1161 { 18, BER_CLASS_CON, 18, 0, dissect_crlann },
1162 { 19, BER_CLASS_CON, 19, 0, dissect_conf },
1163 { 20, BER_CLASS_CON, 20, 0, dissect_nested },
1164 { 21, BER_CLASS_CON, 21, 0, dissect_genm },
1165 { 22, BER_CLASS_CON, 22, 0, dissect_genp },
1166 { 23, BER_CLASS_CON, 23, 0, dissect_error },
1167 { 0, 0, 0, 0, NULL }
1171 dissect_cmp_PKIBody(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1172 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1173 PKIBody_choice, hf_index, ett_cmp_PKIBody,
1178 static int dissect_body(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1179 return dissect_cmp_PKIBody(FALSE, tvb, offset, pinfo, tree, hf_cmp_body);
1185 dissect_cmp_PKIProtection(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1186 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
1192 static int dissect_protection(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1193 return dissect_cmp_PKIProtection(FALSE, tvb, offset, pinfo, tree, hf_cmp_protection);
1197 static const ber_sequence_t PKIMessage_sequence[] = {
1198 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1199 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1200 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_protection },
1201 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_extraCerts },
1206 dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1207 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1208 PKIMessage_sequence, hf_index, ett_cmp_PKIMessage);
1214 static const ber_sequence_t ProtectedPart_sequence[] = {
1215 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header },
1216 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body },
1221 dissect_cmp_ProtectedPart(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1222 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1223 ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart);
1231 dissect_cmp_PasswordBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1232 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
1238 static const ber_sequence_t PBMParameter_sequence[] = {
1239 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt },
1240 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1241 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount },
1242 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1247 dissect_cmp_PBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1248 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1249 PBMParameter_sequence, hf_index, ett_cmp_PBMParameter);
1257 dissect_cmp_DHBasedMac(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1258 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
1264 static const ber_sequence_t DHBMParameter_sequence[] = {
1265 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
1266 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
1271 dissect_cmp_DHBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1272 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1273 DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter);
1281 dissect_cmp_OOBCert(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1282 offset = dissect_pkix1explicit_Certificate(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1290 dissect_cmp_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1291 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
1297 static int dissect_hashVal(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1298 return dissect_cmp_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_cmp_hashVal);
1302 static const ber_sequence_t OOBCertHash_sequence[] = {
1303 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_hashAlg },
1304 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_certId },
1305 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_hashVal },
1310 dissect_cmp_OOBCertHash(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1311 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1312 OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash);
1318 /*--- End of included file: packet-cmp-fn.c ---*/
1319 #line 74 "packet-cmp-template.c"
1322 dissect_cmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1324 return dissect_cmp_PKIMessage(FALSE, tvb, 0, pinfo, tree, -1);
1327 #define CMP_TYPE_PKIMSG 0
1328 #define CMP_TYPE_POLLREP 1
1329 #define CMP_TYPE_POLLREQ 2
1330 #define CMP_TYPE_NEGPOLLREP 3
1331 #define CMP_TYPE_PARTIALMSGREP 4
1332 #define CMP_TYPE_FINALMSGREP 5
1333 #define CMP_TYPE_ERRORMSGREP 6
1334 static const value_string cmp_pdu_types[] = {
1335 { CMP_TYPE_PKIMSG, "pkiMsg" },
1336 { CMP_TYPE_POLLREP, "pollRep" },
1337 { CMP_TYPE_POLLREQ, "pollReq" },
1338 { CMP_TYPE_NEGPOLLREP, "negPollRep" },
1339 { CMP_TYPE_PARTIALMSGREP, "partialMsgRep" },
1340 { CMP_TYPE_FINALMSGREP, "finalMsgRep" },
1341 { CMP_TYPE_ERRORMSGREP, "errorMsgRep" },
1345 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;
1355 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1356 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1358 if (check_col(pinfo->cinfo, COL_INFO)) {
1359 col_clear(pinfo->cinfo, COL_INFO);
1361 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1366 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1367 tree = proto_item_add_subtree(item, ett_cmp);
1370 pdu_len=tvb_get_ntohl(tvb, 0);
1371 pdu_type=tvb_get_guint8(tvb, 4);
1373 proto_tree_add_uint(tree, hf_cmp_rm, tvb, 0, 4, pdu_len);
1374 proto_tree_add_uint(tree, hf_cmp_type, tvb, 4, 1, pdu_type);
1376 if (check_col (pinfo->cinfo, COL_INFO)) {
1377 col_set_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x"));
1381 case CMP_TYPE_PKIMSG:
1382 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1383 dissect_cmp_pdu(next_tvb, pinfo, tree);
1385 case CMP_TYPE_POLLREP:
1386 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1388 ts.secs = tvb_get_ntohl(tvb, 4);
1390 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1392 case CMP_TYPE_POLLREQ:
1393 proto_tree_add_item(tree, hf_cmp_poll_ref, tvb, 0, 4, FALSE);
1395 case CMP_TYPE_NEGPOLLREP:
1397 case CMP_TYPE_PARTIALMSGREP:
1398 proto_tree_add_item(tree, hf_cmp_next_poll_ref, tvb, 0, 4, FALSE);
1400 ts.secs = tvb_get_ntohl(tvb, 4);
1402 proto_tree_add_time(tree, hf_cmp_ttcb, tvb, 4, 4, &ts);
1404 next_tvb = tvb_new_subset(tvb, 13, tvb_length_remaining(tvb, 13), pdu_len);
1405 dissect_cmp_pdu(next_tvb, pinfo, tree);
1407 case CMP_TYPE_FINALMSGREP:
1408 next_tvb = tvb_new_subset(tvb, 5, tvb_length_remaining(tvb, 5), pdu_len);
1409 dissect_cmp_pdu(next_tvb, pinfo, tree);
1411 case CMP_TYPE_ERRORMSGREP:
1418 static guint get_cmp_pdu_len(tvbuff_t *tvb, int offset)
1423 * Get the length of the CMP-over-TCP packet.
1425 plen = tvb_get_ntohl(tvb, offset);
1430 /* CMP over TCP RFC2510 section 5.2 */
1432 dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1437 /* only attempt to dissect it as CMP over TCP if we have
1440 if (!tvb_bytes_exist(tvb, 0, 5)) {
1444 pdu_len=tvb_get_ntohl(tvb, 0);
1445 pdu_type=tvb_get_guint8(tvb, 4);
1447 /* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1449 * It is definitely at least 1 byte to accomodate the flags byte
1451 if((pdu_len<=0)||(pdu_len>10000)){
1454 /* type is between 0 and 6 */
1458 /* type 0 contains a PKI message and must therefore be >= 3 bytes
1459 * long (flags + BER TAG + BER LENGTH
1461 if((pdu_type==0)&&(pdu_len<3)){
1465 tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, 4, get_cmp_pdu_len,
1466 dissect_cmp_tcp_pdu);
1468 return tvb_length(tvb);
1472 dissect_cmp_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1474 proto_item *item=NULL;
1475 proto_tree *tree=NULL;
1477 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1478 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1480 if (check_col(pinfo->cinfo, COL_INFO)) {
1481 col_clear(pinfo->cinfo, COL_INFO);
1483 col_add_fstr(pinfo->cinfo, COL_INFO, "PKIXCMP");
1488 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1489 tree = proto_item_add_subtree(item, ett_cmp);
1492 dissect_cmp_pdu(tvb, pinfo, tree);
1496 /*--- proto_register_cmp ----------------------------------------------*/
1497 void proto_register_cmp(void) {
1499 /* List of fields */
1500 static hf_register_info hf[] = {
1502 { "InfoType", "cmp.type.oid",
1503 FT_STRING, BASE_NONE, NULL, 0,
1504 "Type of InfoTypeAndValue", HFILL }},
1506 { "Record Marker", "cmp.rm",
1507 FT_UINT32, BASE_DEC, NULL, 0,
1508 "Record Marker length of PDU in bytes", HFILL }},
1510 { "Type", "cmp.type",
1511 FT_UINT8, BASE_DEC, VALS(cmp_pdu_types), 0,
1512 "PDU Type", HFILL }},
1514 { "Polling Reference", "cmp.poll_ref",
1515 FT_UINT32, BASE_HEX, NULL, 0,
1517 { &hf_cmp_next_poll_ref,
1518 { "Next Polling Reference", "cmp.next_poll_ref",
1519 FT_UINT32, BASE_HEX, NULL, 0,
1522 { "Time to check Back", "cmp.ttcb",
1523 FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0,
1526 /*--- Included file: packet-cmp-hfarr.c ---*/
1527 #line 1 "packet-cmp-hfarr.c"
1529 { "header", "cmp.header",
1530 FT_NONE, BASE_NONE, NULL, 0,
1533 { "body", "cmp.body",
1534 FT_UINT32, BASE_DEC, VALS(cmp_PKIBody_vals), 0,
1536 { &hf_cmp_protection,
1537 { "protection", "cmp.protection",
1538 FT_BYTES, BASE_HEX, NULL, 0,
1539 "PKIMessage/protection", HFILL }},
1540 { &hf_cmp_extraCerts,
1541 { "extraCerts", "cmp.extraCerts",
1542 FT_UINT32, BASE_DEC, NULL, 0,
1543 "PKIMessage/extraCerts", HFILL }},
1544 { &hf_cmp_extraCerts_item,
1545 { "Item", "cmp.extraCerts_item",
1546 FT_NONE, BASE_NONE, NULL, 0,
1547 "PKIMessage/extraCerts/_item", HFILL }},
1549 { "pvno", "cmp.pvno",
1550 FT_INT32, BASE_DEC, VALS(cmp_T_pvno_vals), 0,
1551 "PKIHeader/pvno", HFILL }},
1553 { "sender", "cmp.sender",
1554 FT_UINT32, BASE_DEC, NULL, 0,
1555 "PKIHeader/sender", HFILL }},
1556 { &hf_cmp_recipient,
1557 { "recipient", "cmp.recipient",
1558 FT_UINT32, BASE_DEC, NULL, 0,
1559 "PKIHeader/recipient", HFILL }},
1560 { &hf_cmp_messageTime,
1561 { "messageTime", "cmp.messageTime",
1562 FT_STRING, BASE_NONE, NULL, 0,
1563 "PKIHeader/messageTime", HFILL }},
1564 { &hf_cmp_protectionAlg,
1565 { "protectionAlg", "cmp.protectionAlg",
1566 FT_NONE, BASE_NONE, NULL, 0,
1567 "PKIHeader/protectionAlg", HFILL }},
1568 { &hf_cmp_senderKID,
1569 { "senderKID", "cmp.senderKID",
1570 FT_BYTES, BASE_HEX, NULL, 0,
1571 "PKIHeader/senderKID", HFILL }},
1573 { "recipKID", "cmp.recipKID",
1574 FT_BYTES, BASE_HEX, NULL, 0,
1575 "PKIHeader/recipKID", HFILL }},
1576 { &hf_cmp_transactionID,
1577 { "transactionID", "cmp.transactionID",
1578 FT_BYTES, BASE_HEX, NULL, 0,
1579 "PKIHeader/transactionID", HFILL }},
1580 { &hf_cmp_senderNonce,
1581 { "senderNonce", "cmp.senderNonce",
1582 FT_BYTES, BASE_HEX, NULL, 0,
1583 "PKIHeader/senderNonce", HFILL }},
1584 { &hf_cmp_recipNonce,
1585 { "recipNonce", "cmp.recipNonce",
1586 FT_BYTES, BASE_HEX, NULL, 0,
1587 "PKIHeader/recipNonce", HFILL }},
1589 { "freeText", "cmp.freeText",
1590 FT_UINT32, BASE_DEC, NULL, 0,
1591 "PKIHeader/freeText", HFILL }},
1592 { &hf_cmp_generalInfo,
1593 { "generalInfo", "cmp.generalInfo",
1594 FT_UINT32, BASE_DEC, NULL, 0,
1595 "PKIHeader/generalInfo", HFILL }},
1596 { &hf_cmp_generalInfo_item,
1597 { "Item", "cmp.generalInfo_item",
1598 FT_NONE, BASE_NONE, NULL, 0,
1599 "PKIHeader/generalInfo/_item", HFILL }},
1600 { &hf_cmp_PKIFreeText_item,
1601 { "Item", "cmp.PKIFreeText_item",
1602 FT_STRING, BASE_NONE, NULL, 0,
1603 "PKIFreeText/_item", HFILL }},
1606 FT_UINT32, BASE_DEC, NULL, 0,
1607 "PKIBody/ir", HFILL }},
1610 FT_NONE, BASE_NONE, NULL, 0,
1611 "PKIBody/ip", HFILL }},
1614 FT_UINT32, BASE_DEC, NULL, 0,
1615 "PKIBody/cr", HFILL }},
1618 FT_NONE, BASE_NONE, NULL, 0,
1619 "PKIBody/cp", HFILL }},
1621 { "popdecc", "cmp.popdecc",
1622 FT_UINT32, BASE_DEC, NULL, 0,
1623 "PKIBody/popdecc", HFILL }},
1625 { "popdecr", "cmp.popdecr",
1626 FT_UINT32, BASE_DEC, NULL, 0,
1627 "PKIBody/popdecr", HFILL }},
1630 FT_UINT32, BASE_DEC, NULL, 0,
1631 "PKIBody/kur", HFILL }},
1634 FT_NONE, BASE_NONE, NULL, 0,
1635 "PKIBody/kup", HFILL }},
1638 FT_UINT32, BASE_DEC, NULL, 0,
1639 "PKIBody/krr", HFILL }},
1642 FT_NONE, BASE_NONE, NULL, 0,
1643 "PKIBody/krp", HFILL }},
1646 FT_UINT32, BASE_DEC, NULL, 0,
1647 "PKIBody/rr", HFILL }},
1650 FT_NONE, BASE_NONE, NULL, 0,
1651 "PKIBody/rp", HFILL }},
1654 FT_UINT32, BASE_DEC, NULL, 0,
1655 "PKIBody/ccr", HFILL }},
1658 FT_NONE, BASE_NONE, NULL, 0,
1659 "PKIBody/ccp", HFILL }},
1661 { "ckuann", "cmp.ckuann",
1662 FT_NONE, BASE_NONE, NULL, 0,
1663 "PKIBody/ckuann", HFILL }},
1665 { "cann", "cmp.cann",
1666 FT_NONE, BASE_NONE, NULL, 0,
1667 "PKIBody/cann", HFILL }},
1669 { "rann", "cmp.rann",
1670 FT_NONE, BASE_NONE, NULL, 0,
1671 "PKIBody/rann", HFILL }},
1673 { "crlann", "cmp.crlann",
1674 FT_UINT32, BASE_DEC, NULL, 0,
1675 "PKIBody/crlann", HFILL }},
1677 { "conf", "cmp.conf",
1678 FT_NONE, BASE_NONE, NULL, 0,
1679 "PKIBody/conf", HFILL }},
1681 { "nested", "cmp.nested",
1682 FT_NONE, BASE_NONE, NULL, 0,
1683 "PKIBody/nested", HFILL }},
1685 { "genm", "cmp.genm",
1686 FT_UINT32, BASE_DEC, NULL, 0,
1687 "PKIBody/genm", HFILL }},
1689 { "genp", "cmp.genp",
1690 FT_UINT32, BASE_DEC, NULL, 0,
1691 "PKIBody/genp", HFILL }},
1693 { "error", "cmp.error",
1694 FT_NONE, BASE_NONE, NULL, 0,
1695 "PKIBody/error", HFILL }},
1697 { "salt", "cmp.salt",
1698 FT_BYTES, BASE_HEX, NULL, 0,
1699 "PBMParameter/salt", HFILL }},
1702 FT_NONE, BASE_NONE, NULL, 0,
1704 { &hf_cmp_iterationCount,
1705 { "iterationCount", "cmp.iterationCount",
1706 FT_INT32, BASE_DEC, NULL, 0,
1707 "PBMParameter/iterationCount", HFILL }},
1710 FT_NONE, BASE_NONE, NULL, 0,
1713 { "status", "cmp.status",
1714 FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
1716 { &hf_cmp_statusString,
1717 { "statusString", "cmp.statusString",
1718 FT_UINT32, BASE_DEC, NULL, 0,
1719 "PKIStatusInfo/statusString", HFILL }},
1721 { "failInfo", "cmp.failInfo",
1722 FT_BYTES, BASE_HEX, NULL, 0,
1723 "PKIStatusInfo/failInfo", HFILL }},
1725 { "hashAlg", "cmp.hashAlg",
1726 FT_NONE, BASE_NONE, NULL, 0,
1727 "OOBCertHash/hashAlg", HFILL }},
1729 { "certId", "cmp.certId",
1730 FT_NONE, BASE_NONE, NULL, 0,
1733 { "hashVal", "cmp.hashVal",
1734 FT_BYTES, BASE_HEX, NULL, 0,
1735 "OOBCertHash/hashVal", HFILL }},
1736 { &hf_cmp_POPODecKeyChallContent_item,
1737 { "Item", "cmp.POPODecKeyChallContent_item",
1738 FT_NONE, BASE_NONE, NULL, 0,
1739 "POPODecKeyChallContent/_item", HFILL }},
1741 { "witness", "cmp.witness",
1742 FT_BYTES, BASE_HEX, NULL, 0,
1743 "Challenge/witness", HFILL }},
1744 { &hf_cmp_challenge,
1745 { "challenge", "cmp.challenge",
1746 FT_BYTES, BASE_HEX, NULL, 0,
1747 "Challenge/challenge", HFILL }},
1748 { &hf_cmp_POPODecKeyRespContent_item,
1749 { "Item", "cmp.POPODecKeyRespContent_item",
1750 FT_INT32, BASE_DEC, NULL, 0,
1751 "POPODecKeyRespContent/_item", HFILL }},
1753 { "caPubs", "cmp.caPubs",
1754 FT_UINT32, BASE_DEC, NULL, 0,
1755 "CertRepMessage/caPubs", HFILL }},
1756 { &hf_cmp_caPubs_item,
1757 { "Item", "cmp.caPubs_item",
1758 FT_NONE, BASE_NONE, NULL, 0,
1759 "CertRepMessage/caPubs/_item", HFILL }},
1761 { "response", "cmp.response",
1762 FT_UINT32, BASE_DEC, NULL, 0,
1763 "CertRepMessage/response", HFILL }},
1764 { &hf_cmp_response_item,
1765 { "Item", "cmp.response_item",
1766 FT_NONE, BASE_NONE, NULL, 0,
1767 "CertRepMessage/response/_item", HFILL }},
1768 { &hf_cmp_certReqId,
1769 { "certReqId", "cmp.certReqId",
1770 FT_INT32, BASE_DEC, NULL, 0,
1771 "CertResponse/certReqId", HFILL }},
1773 { "status", "cmp.status",
1774 FT_NONE, BASE_NONE, NULL, 0,
1776 { &hf_cmp_certifiedKeyPair,
1777 { "certifiedKeyPair", "cmp.certifiedKeyPair",
1778 FT_NONE, BASE_NONE, NULL, 0,
1779 "CertResponse/certifiedKeyPair", HFILL }},
1781 { "rspInfo", "cmp.rspInfo",
1782 FT_BYTES, BASE_HEX, NULL, 0,
1783 "CertResponse/rspInfo", HFILL }},
1784 { &hf_cmp_certOrEncCert,
1785 { "certOrEncCert", "cmp.certOrEncCert",
1786 FT_UINT32, BASE_DEC, VALS(cmp_CertOrEncCert_vals), 0,
1787 "CertifiedKeyPair/certOrEncCert", HFILL }},
1788 { &hf_cmp_privateKey,
1789 { "privateKey", "cmp.privateKey",
1790 FT_NONE, BASE_NONE, NULL, 0,
1791 "CertifiedKeyPair/privateKey", HFILL }},
1792 { &hf_cmp_publicationInfo,
1793 { "publicationInfo", "cmp.publicationInfo",
1794 FT_NONE, BASE_NONE, NULL, 0,
1795 "CertifiedKeyPair/publicationInfo", HFILL }},
1796 { &hf_cmp_certificate,
1797 { "certificate", "cmp.certificate",
1798 FT_NONE, BASE_NONE, NULL, 0,
1799 "CertOrEncCert/certificate", HFILL }},
1800 { &hf_cmp_encryptedCert,
1801 { "encryptedCert", "cmp.encryptedCert",
1802 FT_NONE, BASE_NONE, NULL, 0,
1803 "CertOrEncCert/encryptedCert", HFILL }},
1804 { &hf_cmp_newSigCert,
1805 { "newSigCert", "cmp.newSigCert",
1806 FT_NONE, BASE_NONE, NULL, 0,
1807 "KeyRecRepContent/newSigCert", HFILL }},
1809 { "caCerts", "cmp.caCerts",
1810 FT_UINT32, BASE_DEC, NULL, 0,
1811 "KeyRecRepContent/caCerts", HFILL }},
1812 { &hf_cmp_caCerts_item,
1813 { "Item", "cmp.caCerts_item",
1814 FT_NONE, BASE_NONE, NULL, 0,
1815 "KeyRecRepContent/caCerts/_item", HFILL }},
1816 { &hf_cmp_keyPairHist,
1817 { "keyPairHist", "cmp.keyPairHist",
1818 FT_UINT32, BASE_DEC, NULL, 0,
1819 "KeyRecRepContent/keyPairHist", HFILL }},
1820 { &hf_cmp_keyPairHist_item,
1821 { "Item", "cmp.keyPairHist_item",
1822 FT_NONE, BASE_NONE, NULL, 0,
1823 "KeyRecRepContent/keyPairHist/_item", HFILL }},
1824 { &hf_cmp_RevReqContent_item,
1825 { "Item", "cmp.RevReqContent_item",
1826 FT_NONE, BASE_NONE, NULL, 0,
1827 "RevReqContent/_item", HFILL }},
1828 { &hf_cmp_certDetails,
1829 { "certDetails", "cmp.certDetails",
1830 FT_NONE, BASE_NONE, NULL, 0,
1831 "RevDetails/certDetails", HFILL }},
1832 { &hf_cmp_revocationReason,
1833 { "revocationReason", "cmp.revocationReason",
1834 FT_BYTES, BASE_HEX, NULL, 0,
1835 "RevDetails/revocationReason", HFILL }},
1836 { &hf_cmp_badSinceDate,
1837 { "badSinceDate", "cmp.badSinceDate",
1838 FT_STRING, BASE_NONE, NULL, 0,
1840 { &hf_cmp_crlEntryDetails,
1841 { "crlEntryDetails", "cmp.crlEntryDetails",
1842 FT_UINT32, BASE_DEC, NULL, 0,
1843 "RevDetails/crlEntryDetails", HFILL }},
1845 { "status", "cmp.status",
1846 FT_UINT32, BASE_DEC, NULL, 0,
1847 "RevRepContent/status", HFILL }},
1848 { &hf_cmp_status_item,
1849 { "Item", "cmp.status_item",
1850 FT_NONE, BASE_NONE, NULL, 0,
1851 "RevRepContent/status/_item", HFILL }},
1853 { "revCerts", "cmp.revCerts",
1854 FT_UINT32, BASE_DEC, NULL, 0,
1855 "RevRepContent/revCerts", HFILL }},
1856 { &hf_cmp_revCerts_item,
1857 { "Item", "cmp.revCerts_item",
1858 FT_NONE, BASE_NONE, NULL, 0,
1859 "RevRepContent/revCerts/_item", HFILL }},
1861 { "crls", "cmp.crls",
1862 FT_UINT32, BASE_DEC, NULL, 0,
1863 "RevRepContent/crls", HFILL }},
1864 { &hf_cmp_crls_item,
1865 { "Item", "cmp.crls_item",
1866 FT_NONE, BASE_NONE, NULL, 0,
1867 "RevRepContent/crls/_item", HFILL }},
1868 { &hf_cmp_oldWithNew,
1869 { "oldWithNew", "cmp.oldWithNew",
1870 FT_NONE, BASE_NONE, NULL, 0,
1871 "CAKeyUpdAnnContent/oldWithNew", HFILL }},
1872 { &hf_cmp_newWithOld,
1873 { "newWithOld", "cmp.newWithOld",
1874 FT_NONE, BASE_NONE, NULL, 0,
1875 "CAKeyUpdAnnContent/newWithOld", HFILL }},
1876 { &hf_cmp_newWithNew,
1877 { "newWithNew", "cmp.newWithNew",
1878 FT_NONE, BASE_NONE, NULL, 0,
1879 "CAKeyUpdAnnContent/newWithNew", HFILL }},
1880 { &hf_cmp_willBeRevokedAt,
1881 { "willBeRevokedAt", "cmp.willBeRevokedAt",
1882 FT_STRING, BASE_NONE, NULL, 0,
1883 "RevAnnContent/willBeRevokedAt", HFILL }},
1884 { &hf_cmp_crlDetails,
1885 { "crlDetails", "cmp.crlDetails",
1886 FT_UINT32, BASE_DEC, NULL, 0,
1887 "RevAnnContent/crlDetails", HFILL }},
1888 { &hf_cmp_CRLAnnContent_item,
1889 { "Item", "cmp.CRLAnnContent_item",
1890 FT_NONE, BASE_NONE, NULL, 0,
1891 "CRLAnnContent/_item", HFILL }},
1893 { "infoType", "cmp.infoType",
1894 FT_OID, BASE_NONE, NULL, 0,
1895 "InfoTypeAndValue/infoType", HFILL }},
1896 { &hf_cmp_infoValue,
1897 { "infoValue", "cmp.infoValue",
1898 FT_NONE, BASE_NONE, NULL, 0,
1899 "InfoTypeAndValue/infoValue", HFILL }},
1900 { &hf_cmp_GenMsgContent_item,
1901 { "Item", "cmp.GenMsgContent_item",
1902 FT_NONE, BASE_NONE, NULL, 0,
1903 "GenMsgContent/_item", HFILL }},
1904 { &hf_cmp_GenRepContent_item,
1905 { "Item", "cmp.GenRepContent_item",
1906 FT_NONE, BASE_NONE, NULL, 0,
1907 "GenRepContent/_item", HFILL }},
1908 { &hf_cmp_pKIStatusInfo,
1909 { "pKIStatusInfo", "cmp.pKIStatusInfo",
1910 FT_NONE, BASE_NONE, NULL, 0,
1911 "ErrorMsgContent/pKIStatusInfo", HFILL }},
1912 { &hf_cmp_errorCode,
1913 { "errorCode", "cmp.errorCode",
1914 FT_INT32, BASE_DEC, NULL, 0,
1915 "ErrorMsgContent/errorCode", HFILL }},
1916 { &hf_cmp_errorDetails,
1917 { "errorDetails", "cmp.errorDetails",
1918 FT_UINT32, BASE_DEC, NULL, 0,
1919 "ErrorMsgContent/errorDetails", HFILL }},
1920 { &hf_cmp_PKIFailureInfo_badAlg,
1921 { "badAlg", "cmp.badAlg",
1922 FT_BOOLEAN, 8, NULL, 0x80,
1924 { &hf_cmp_PKIFailureInfo_badMessageCheck,
1925 { "badMessageCheck", "cmp.badMessageCheck",
1926 FT_BOOLEAN, 8, NULL, 0x40,
1928 { &hf_cmp_PKIFailureInfo_badRequest,
1929 { "badRequest", "cmp.badRequest",
1930 FT_BOOLEAN, 8, NULL, 0x20,
1932 { &hf_cmp_PKIFailureInfo_badTime,
1933 { "badTime", "cmp.badTime",
1934 FT_BOOLEAN, 8, NULL, 0x10,
1936 { &hf_cmp_PKIFailureInfo_badCertId,
1937 { "badCertId", "cmp.badCertId",
1938 FT_BOOLEAN, 8, NULL, 0x08,
1940 { &hf_cmp_PKIFailureInfo_badDataFormat,
1941 { "badDataFormat", "cmp.badDataFormat",
1942 FT_BOOLEAN, 8, NULL, 0x04,
1944 { &hf_cmp_PKIFailureInfo_wrongAuthority,
1945 { "wrongAuthority", "cmp.wrongAuthority",
1946 FT_BOOLEAN, 8, NULL, 0x02,
1948 { &hf_cmp_PKIFailureInfo_incorrectData,
1949 { "incorrectData", "cmp.incorrectData",
1950 FT_BOOLEAN, 8, NULL, 0x01,
1952 { &hf_cmp_PKIFailureInfo_missingTimeStamp,
1953 { "missingTimeStamp", "cmp.missingTimeStamp",
1954 FT_BOOLEAN, 8, NULL, 0x80,
1956 { &hf_cmp_PKIFailureInfo_badPOP,
1957 { "badPOP", "cmp.badPOP",
1958 FT_BOOLEAN, 8, NULL, 0x40,
1961 /*--- End of included file: packet-cmp-hfarr.c ---*/
1962 #line 280 "packet-cmp-template.c"
1965 /* List of subtrees */
1966 static gint *ett[] = {
1969 /*--- Included file: packet-cmp-ettarr.c ---*/
1970 #line 1 "packet-cmp-ettarr.c"
1971 &ett_cmp_PKIMessage,
1972 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_Certificate,
1974 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue,
1975 &ett_cmp_PKIFreeText,
1977 &ett_cmp_ProtectedPart,
1978 &ett_cmp_PBMParameter,
1979 &ett_cmp_DHBMParameter,
1980 &ett_cmp_PKIFailureInfo,
1981 &ett_cmp_PKIStatusInfo,
1982 &ett_cmp_OOBCertHash,
1983 &ett_cmp_POPODecKeyChallContent,
1985 &ett_cmp_POPODecKeyRespContent,
1986 &ett_cmp_CertRepMessage,
1987 &ett_cmp_SEQUENCE_OF_CertResponse,
1988 &ett_cmp_CertResponse,
1989 &ett_cmp_CertifiedKeyPair,
1990 &ett_cmp_CertOrEncCert,
1991 &ett_cmp_KeyRecRepContent,
1992 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair,
1993 &ett_cmp_RevReqContent,
1994 &ett_cmp_RevDetails,
1995 &ett_cmp_RevRepContent,
1996 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo,
1997 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId,
1998 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList,
1999 &ett_cmp_CAKeyUpdAnnContent,
2000 &ett_cmp_RevAnnContent,
2001 &ett_cmp_CRLAnnContent,
2002 &ett_cmp_InfoTypeAndValue,
2003 &ett_cmp_GenMsgContent,
2004 &ett_cmp_GenRepContent,
2005 &ett_cmp_ErrorMsgContent,
2007 /*--- End of included file: packet-cmp-ettarr.c ---*/
2008 #line 286 "packet-cmp-template.c"
2010 module_t *cmp_module;
2012 /* Register protocol */
2013 proto_cmp = proto_register_protocol(PNAME, PSNAME, PFNAME);
2015 /* Register fields and subtrees */
2016 proto_register_field_array(proto_cmp, hf, array_length(hf));
2017 proto_register_subtree_array(ett, array_length(ett));
2019 cmp_module = prefs_register_protocol(proto_cmp, NULL);
2020 prefs_register_bool_preference(cmp_module, "desegment",
2021 "Reassemble CMP-over-TCP messages spanning multiple TCP segments",
2022 "Whether the CMP-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
2023 "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2028 /*--- proto_reg_handoff_cmp -------------------------------------------*/
2029 void proto_reg_handoff_cmp(void) {
2030 dissector_handle_t cmp_http_handle;
2031 dissector_handle_t cmp_tcp_handle;
2033 cmp_http_handle = new_create_dissector_handle(dissect_cmp_http, proto_cmp);
2034 dissector_add_string("media_type", "application/pkixcmp", cmp_http_handle);
2036 cmp_tcp_handle = new_create_dissector_handle(dissect_cmp_tcp, proto_cmp);
2037 dissector_add("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
2039 /*#include "packet-cmp-dis-tab.c"*/