1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../../svn/trunk/tools/asn2wrs.py -b -p cmp -c ../../../svn/trunk/asn1/pkixcmp/cmp.cnf -s ../../../svn/trunk/asn1/pkixcmp/packet-cmp-template -D ../../../svn/trunk/asn1/pkixcmp CMP.asn */
6 /* Input file: packet-cmp-template.c */
8 #line 1 "packet-cmp-template.c"
11 * Routines for RFC2510 Certificate Management Protocol packet dissection
12 * Ronnie Sahlberg 2004
13 * Updated to RFC4210 CMPv2 and associated "Transport Protocols for CMP" draft
18 * Wireshark - Network traffic analyzer
19 * By Gerald Combs <gerald@wireshark.org>
20 * Copyright 1998 Gerald Combs
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * as published by the Free Software Foundation; either version 2
25 * of the License, or (at your option) any later version.
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU General Public License for more details.
32 * You should have received a copy of the GNU General Public License
33 * along with this program; if not, write to the Free Software
34 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 #include <epan/packet.h>
43 #include <epan/conversation.h>
48 #include <epan/oids.h>
49 #include <epan/asn1.h>
50 #include "packet-ber.h"
51 #include "packet-cmp.h"
52 #include "packet-crmf.h"
53 #include "packet-pkix1explicit.h"
54 #include "packet-pkix1implicit.h"
55 #include <epan/emem.h>
56 #include "packet-tcp.h"
57 #include "packet-http.h"
58 #include <epan/prefs.h>
59 #include <epan/nstime.h>
61 #define PNAME "Certificate Management Protocol"
65 #define TCP_PORT_CMP 829
67 /* desegmentation of CMP over TCP */
68 static gboolean cmp_desegment = TRUE;
70 static dissector_handle_t cmp_http_handle;
71 static dissector_handle_t cmp_tcp_style_http_handle;
72 static dissector_handle_t cmp_tcp_handle;
74 static gboolean inited = FALSE;
75 static guint cmp_alternate_tcp_port = 0;
76 static guint cmp_alternate_tcp_port_prev = 0;
77 static guint cmp_alternate_http_port = 0;
78 static guint cmp_alternate_http_port_prev = 0;
79 static guint cmp_alternate_tcp_style_http_port = 0;
80 static guint cmp_alternate_tcp_style_http_port_prev = 0;
82 /* Initialize the protocol and registered fields */
84 static int hf_cmp_type_oid = -1;
85 static int hf_cmp_tcptrans_len = -1;
86 static int hf_cmp_tcptrans_type = -1;
87 static int hf_cmp_tcptrans_poll_ref = -1;
88 static int hf_cmp_tcptrans_next_poll_ref = -1;
89 static int hf_cmp_tcptrans_ttcb = -1;
90 static int hf_cmp_tcptrans10_version = -1;
91 static int hf_cmp_tcptrans10_flags = -1;
93 /*--- Included file: packet-cmp-hf.c ---*/
94 #line 1 "packet-cmp-hf.c"
95 static int hf_cmp_PBMParameter_PDU = -1; /* PBMParameter */
96 static int hf_cmp_DHBMParameter_PDU = -1; /* DHBMParameter */
97 static int hf_cmp_CAProtEncCertValue_PDU = -1; /* CAProtEncCertValue */
98 static int hf_cmp_SignKeyPairTypesValue_PDU = -1; /* SignKeyPairTypesValue */
99 static int hf_cmp_EncKeyPairTypesValue_PDU = -1; /* EncKeyPairTypesValue */
100 static int hf_cmp_PreferredSymmAlgValue_PDU = -1; /* PreferredSymmAlgValue */
101 static int hf_cmp_CAKeyUpdateInfoValue_PDU = -1; /* CAKeyUpdateInfoValue */
102 static int hf_cmp_CurrentCRLValue_PDU = -1; /* CurrentCRLValue */
103 static int hf_cmp_UnsupportedOIDsValue_PDU = -1; /* UnsupportedOIDsValue */
104 static int hf_cmp_KeyPairParamReqValue_PDU = -1; /* KeyPairParamReqValue */
105 static int hf_cmp_KeyPairParamRepValue_PDU = -1; /* KeyPairParamRepValue */
106 static int hf_cmp_RevPassphraseValue_PDU = -1; /* RevPassphraseValue */
107 static int hf_cmp_ImplicitConfirmValue_PDU = -1; /* ImplicitConfirmValue */
108 static int hf_cmp_ConfirmWaitTimeValue_PDU = -1; /* ConfirmWaitTimeValue */
109 static int hf_cmp_OrigPKIMessageValue_PDU = -1; /* OrigPKIMessageValue */
110 static int hf_cmp_SuppLangTagsValue_PDU = -1; /* SuppLangTagsValue */
111 static int hf_cmp_x509v3PKCert = -1; /* Certificate */
112 static int hf_cmp_header = -1; /* PKIHeader */
113 static int hf_cmp_body = -1; /* PKIBody */
114 static int hf_cmp_protection = -1; /* PKIProtection */
115 static int hf_cmp_extraCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
116 static int hf_cmp_extraCerts_item = -1; /* CMPCertificate */
117 static int hf_cmp_PKIMessages_item = -1; /* PKIMessage */
118 static int hf_cmp_pvno = -1; /* T_pvno */
119 static int hf_cmp_sender = -1; /* GeneralName */
120 static int hf_cmp_recipient = -1; /* GeneralName */
121 static int hf_cmp_messageTime = -1; /* GeneralizedTime */
122 static int hf_cmp_protectionAlg = -1; /* AlgorithmIdentifier */
123 static int hf_cmp_senderKID = -1; /* KeyIdentifier */
124 static int hf_cmp_recipKID = -1; /* KeyIdentifier */
125 static int hf_cmp_transactionID = -1; /* OCTET_STRING */
126 static int hf_cmp_senderNonce = -1; /* OCTET_STRING */
127 static int hf_cmp_recipNonce = -1; /* OCTET_STRING */
128 static int hf_cmp_freeText = -1; /* PKIFreeText */
129 static int hf_cmp_generalInfo = -1; /* SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue */
130 static int hf_cmp_generalInfo_item = -1; /* InfoTypeAndValue */
131 static int hf_cmp_PKIFreeText_item = -1; /* UTF8String */
132 static int hf_cmp_ir = -1; /* CertReqMessages */
133 static int hf_cmp_ip = -1; /* CertRepMessage */
134 static int hf_cmp_cr = -1; /* CertReqMessages */
135 static int hf_cmp_cp = -1; /* CertRepMessage */
136 static int hf_cmp_p10cr = -1; /* NULL */
137 static int hf_cmp_popdecc = -1; /* POPODecKeyChallContent */
138 static int hf_cmp_popdecr = -1; /* POPODecKeyRespContent */
139 static int hf_cmp_kur = -1; /* CertReqMessages */
140 static int hf_cmp_kup = -1; /* CertRepMessage */
141 static int hf_cmp_krr = -1; /* CertReqMessages */
142 static int hf_cmp_krp = -1; /* KeyRecRepContent */
143 static int hf_cmp_rr = -1; /* RevReqContent */
144 static int hf_cmp_rp = -1; /* RevRepContent */
145 static int hf_cmp_ccr = -1; /* CertReqMessages */
146 static int hf_cmp_ccp = -1; /* CertRepMessage */
147 static int hf_cmp_ckuann = -1; /* CAKeyUpdAnnContent */
148 static int hf_cmp_cann = -1; /* CertAnnContent */
149 static int hf_cmp_rann = -1; /* RevAnnContent */
150 static int hf_cmp_crlann = -1; /* CRLAnnContent */
151 static int hf_cmp_pkiconf = -1; /* PKIConfirmContent */
152 static int hf_cmp_nested = -1; /* NestedMessageContent */
153 static int hf_cmp_genm = -1; /* GenMsgContent */
154 static int hf_cmp_genp = -1; /* GenRepContent */
155 static int hf_cmp_error = -1; /* ErrorMsgContent */
156 static int hf_cmp_certConf = -1; /* CertConfirmContent */
157 static int hf_cmp_pollReq = -1; /* PollReqContent */
158 static int hf_cmp_pollRep = -1; /* PollRepContent */
159 static int hf_cmp_salt = -1; /* OCTET_STRING */
160 static int hf_cmp_owf = -1; /* AlgorithmIdentifier */
161 static int hf_cmp_iterationCount = -1; /* INTEGER */
162 static int hf_cmp_mac = -1; /* AlgorithmIdentifier */
163 static int hf_cmp_pkistatus = -1; /* PKIStatus */
164 static int hf_cmp_statusString = -1; /* PKIFreeText */
165 static int hf_cmp_failInfo = -1; /* PKIFailureInfo */
166 static int hf_cmp_hashAlg = -1; /* AlgorithmIdentifier */
167 static int hf_cmp_certId = -1; /* CertId */
168 static int hf_cmp_hashVal = -1; /* BIT_STRING */
169 static int hf_cmp_POPODecKeyChallContent_item = -1; /* Challenge */
170 static int hf_cmp_witness = -1; /* OCTET_STRING */
171 static int hf_cmp_challenge = -1; /* OCTET_STRING */
172 static int hf_cmp_POPODecKeyRespContent_item = -1; /* INTEGER */
173 static int hf_cmp_caPubs = -1; /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
174 static int hf_cmp_caPubs_item = -1; /* CMPCertificate */
175 static int hf_cmp_response = -1; /* SEQUENCE_OF_CertResponse */
176 static int hf_cmp_response_item = -1; /* CertResponse */
177 static int hf_cmp_certReqId = -1; /* INTEGER */
178 static int hf_cmp_pkistatusinf = -1; /* PKIStatusInfo */
179 static int hf_cmp_certifiedKeyPair = -1; /* CertifiedKeyPair */
180 static int hf_cmp_rspInfo = -1; /* OCTET_STRING */
181 static int hf_cmp_certOrEncCert = -1; /* CertOrEncCert */
182 static int hf_cmp_privateKey = -1; /* EncryptedValue */
183 static int hf_cmp_publicationInfo = -1; /* PKIPublicationInfo */
184 static int hf_cmp_certificate = -1; /* CMPCertificate */
185 static int hf_cmp_encryptedCert = -1; /* EncryptedValue */
186 static int hf_cmp_newSigCert = -1; /* CMPCertificate */
187 static int hf_cmp_caCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_CMPCertificate */
188 static int hf_cmp_caCerts_item = -1; /* CMPCertificate */
189 static int hf_cmp_keyPairHist = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair */
190 static int hf_cmp_keyPairHist_item = -1; /* CertifiedKeyPair */
191 static int hf_cmp_RevReqContent_item = -1; /* RevDetails */
192 static int hf_cmp_certDetails = -1; /* CertTemplate */
193 static int hf_cmp_crlEntryDetails = -1; /* Extensions */
194 static int hf_cmp_rvrpcnt_status = -1; /* SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo */
195 static int hf_cmp_rvrpcnt_status_item = -1; /* PKIStatusInfo */
196 static int hf_cmp_revCerts = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertId */
197 static int hf_cmp_revCerts_item = -1; /* CertId */
198 static int hf_cmp_crls = -1; /* SEQUENCE_SIZE_1_MAX_OF_CertificateList */
199 static int hf_cmp_crls_item = -1; /* CertificateList */
200 static int hf_cmp_oldWithNew = -1; /* CMPCertificate */
201 static int hf_cmp_newWithOld = -1; /* CMPCertificate */
202 static int hf_cmp_newWithNew = -1; /* CMPCertificate */
203 static int hf_cmp_willBeRevokedAt = -1; /* GeneralizedTime */
204 static int hf_cmp_badSinceDate = -1; /* GeneralizedTime */
205 static int hf_cmp_crlDetails = -1; /* Extensions */
206 static int hf_cmp_CRLAnnContent_item = -1; /* CertificateList */
207 static int hf_cmp_CertConfirmContent_item = -1; /* CertStatus */
208 static int hf_cmp_certHash = -1; /* OCTET_STRING */
209 static int hf_cmp_statusInfo = -1; /* PKIStatusInfo */
210 static int hf_cmp_infoType = -1; /* T_infoType */
211 static int hf_cmp_infoValue = -1; /* T_infoValue */
212 static int hf_cmp_SignKeyPairTypesValue_item = -1; /* AlgorithmIdentifier */
213 static int hf_cmp_EncKeyPairTypesValue_item = -1; /* AlgorithmIdentifier */
214 static int hf_cmp_UnsupportedOIDsValue_item = -1; /* OBJECT_IDENTIFIER */
215 static int hf_cmp_SuppLangTagsValue_item = -1; /* UTF8String */
216 static int hf_cmp_GenMsgContent_item = -1; /* InfoTypeAndValue */
217 static int hf_cmp_GenRepContent_item = -1; /* InfoTypeAndValue */
218 static int hf_cmp_pKIStatusInfo = -1; /* PKIStatusInfo */
219 static int hf_cmp_errorCode = -1; /* INTEGER */
220 static int hf_cmp_errorDetails = -1; /* PKIFreeText */
221 static int hf_cmp_PollReqContent_item = -1; /* PollReqContent_item */
222 static int hf_cmp_PollRepContent_item = -1; /* PollRepContent_item */
223 static int hf_cmp_checkAfter = -1; /* INTEGER */
224 static int hf_cmp_reason = -1; /* PKIFreeText */
226 static int hf_cmp_PKIFailureInfo_badAlg = -1;
227 static int hf_cmp_PKIFailureInfo_badMessageCheck = -1;
228 static int hf_cmp_PKIFailureInfo_badRequest = -1;
229 static int hf_cmp_PKIFailureInfo_badTime = -1;
230 static int hf_cmp_PKIFailureInfo_badCertId = -1;
231 static int hf_cmp_PKIFailureInfo_badDataFormat = -1;
232 static int hf_cmp_PKIFailureInfo_wrongAuthority = -1;
233 static int hf_cmp_PKIFailureInfo_incorrectData = -1;
234 static int hf_cmp_PKIFailureInfo_missingTimeStamp = -1;
235 static int hf_cmp_PKIFailureInfo_badPOP = -1;
236 static int hf_cmp_PKIFailureInfo_certRevoked = -1;
237 static int hf_cmp_PKIFailureInfo_certConfirmed = -1;
238 static int hf_cmp_PKIFailureInfo_wrongIntegrity = -1;
239 static int hf_cmp_PKIFailureInfo_badRecipientNonce = -1;
240 static int hf_cmp_PKIFailureInfo_timeNotAvailable = -1;
241 static int hf_cmp_PKIFailureInfo_unacceptedPolicy = -1;
242 static int hf_cmp_PKIFailureInfo_unacceptedExtension = -1;
243 static int hf_cmp_PKIFailureInfo_addInfoNotAvailable = -1;
244 static int hf_cmp_PKIFailureInfo_badSenderNonce = -1;
245 static int hf_cmp_PKIFailureInfo_badCertTemplate = -1;
246 static int hf_cmp_PKIFailureInfo_signerNotTrusted = -1;
247 static int hf_cmp_PKIFailureInfo_transactionIdInUse = -1;
248 static int hf_cmp_PKIFailureInfo_unsupportedVersion = -1;
249 static int hf_cmp_PKIFailureInfo_notAuthorized = -1;
250 static int hf_cmp_PKIFailureInfo_systemUnavail = -1;
251 static int hf_cmp_PKIFailureInfo_systemFailure = -1;
252 static int hf_cmp_PKIFailureInfo_duplicateCertReq = -1;
254 /*--- End of included file: packet-cmp-hf.c ---*/
255 #line 85 "packet-cmp-template.c"
257 /* Initialize the subtree pointers */
258 static gint ett_cmp = -1;
260 /*--- Included file: packet-cmp-ett.c ---*/
261 #line 1 "packet-cmp-ett.c"
262 static gint ett_cmp_CMPCertificate = -1;
263 static gint ett_cmp_PKIMessage = -1;
264 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate = -1;
265 static gint ett_cmp_PKIMessages = -1;
266 static gint ett_cmp_PKIHeader = -1;
267 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue = -1;
268 static gint ett_cmp_PKIFreeText = -1;
269 static gint ett_cmp_PKIBody = -1;
270 static gint ett_cmp_ProtectedPart = -1;
271 static gint ett_cmp_PBMParameter = -1;
272 static gint ett_cmp_DHBMParameter = -1;
273 static gint ett_cmp_PKIFailureInfo = -1;
274 static gint ett_cmp_PKIStatusInfo = -1;
275 static gint ett_cmp_OOBCertHash = -1;
276 static gint ett_cmp_POPODecKeyChallContent = -1;
277 static gint ett_cmp_Challenge = -1;
278 static gint ett_cmp_POPODecKeyRespContent = -1;
279 static gint ett_cmp_CertRepMessage = -1;
280 static gint ett_cmp_SEQUENCE_OF_CertResponse = -1;
281 static gint ett_cmp_CertResponse = -1;
282 static gint ett_cmp_CertifiedKeyPair = -1;
283 static gint ett_cmp_CertOrEncCert = -1;
284 static gint ett_cmp_KeyRecRepContent = -1;
285 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair = -1;
286 static gint ett_cmp_RevReqContent = -1;
287 static gint ett_cmp_RevDetails = -1;
288 static gint ett_cmp_RevRepContent = -1;
289 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo = -1;
290 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId = -1;
291 static gint ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList = -1;
292 static gint ett_cmp_CAKeyUpdAnnContent = -1;
293 static gint ett_cmp_RevAnnContent = -1;
294 static gint ett_cmp_CRLAnnContent = -1;
295 static gint ett_cmp_CertConfirmContent = -1;
296 static gint ett_cmp_CertStatus = -1;
297 static gint ett_cmp_InfoTypeAndValue = -1;
298 static gint ett_cmp_SignKeyPairTypesValue = -1;
299 static gint ett_cmp_EncKeyPairTypesValue = -1;
300 static gint ett_cmp_UnsupportedOIDsValue = -1;
301 static gint ett_cmp_SuppLangTagsValue = -1;
302 static gint ett_cmp_GenMsgContent = -1;
303 static gint ett_cmp_GenRepContent = -1;
304 static gint ett_cmp_ErrorMsgContent = -1;
305 static gint ett_cmp_PollReqContent = -1;
306 static gint ett_cmp_PollReqContent_item = -1;
307 static gint ett_cmp_PollRepContent = -1;
308 static gint ett_cmp_PollRepContent_item = -1;
310 /*--- End of included file: packet-cmp-ett.c ---*/
311 #line 89 "packet-cmp-template.c"
313 static const char *object_identifier_id;
317 /*--- Included file: packet-cmp-fn.c ---*/
318 #line 1 "packet-cmp-fn.c"
319 /*--- Cyclic dependencies ---*/
321 /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessages -> PKIMessage */
322 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_);
326 const value_string cmp_CMPCertificate_vals[] = {
327 { 0, "x509v3PKCert" },
331 static const ber_choice_t CMPCertificate_choice[] = {
332 { 0, &hf_cmp_x509v3PKCert , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Certificate },
333 { 0, NULL, 0, 0, 0, NULL }
337 dissect_cmp_CMPCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
338 offset = dissect_ber_choice(actx, tree, tvb, offset,
339 CMPCertificate_choice, hf_index, ett_cmp_CMPCertificate,
346 static const value_string cmp_T_pvno_vals[] = {
354 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_) {
355 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
364 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_) {
365 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
373 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_) {
374 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
383 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_) {
384 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
385 actx, tree, tvb, offset, hf_index,
392 static const ber_sequence_t PKIFreeText_sequence_of[1] = {
393 { &hf_cmp_PKIFreeText_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String },
397 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_) {
398 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
399 PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText);
407 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_) {
408 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, &object_identifier_id);
416 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_) {
418 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
426 static const ber_sequence_t InfoTypeAndValue_sequence[] = {
427 { &hf_cmp_infoType , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoType },
428 { &hf_cmp_infoValue , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoValue },
429 { NULL, 0, 0, 0, NULL }
433 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_) {
434 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
435 InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue);
441 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = {
442 { &hf_cmp_generalInfo_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
446 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_) {
447 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
448 SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue);
454 static const ber_sequence_t PKIHeader_sequence[] = {
455 { &hf_cmp_pvno , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_T_pvno },
456 { &hf_cmp_sender , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
457 { &hf_cmp_recipient , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
458 { &hf_cmp_messageTime , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_GeneralizedTime },
459 { &hf_cmp_protectionAlg , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier },
460 { &hf_cmp_senderKID , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier },
461 { &hf_cmp_recipKID , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier },
462 { &hf_cmp_transactionID , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
463 { &hf_cmp_senderNonce , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
464 { &hf_cmp_recipNonce , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING },
465 { &hf_cmp_freeText , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_cmp_PKIFreeText },
466 { &hf_cmp_generalInfo , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue },
467 { NULL, 0, 0, 0, NULL }
471 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_) {
472 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
473 PKIHeader_sequence, hf_index, ett_cmp_PKIHeader);
479 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of[1] = {
480 { &hf_cmp_extraCerts_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
484 dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
485 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
486 SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate);
494 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_) {
495 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
502 const value_string cmp_PKIStatus_vals[] = {
504 { 1, "grantedWithMods" },
507 { 4, "revocationWarning" },
508 { 5, "revocationNotification" },
509 { 6, "keyUpdateWarning" },
515 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_) {
519 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
523 if (check_col(actx->pinfo->cinfo, COL_INFO)) {
524 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Status=%s", val_to_str(value, cmp_PKIStatus_vals, "unknown"));
533 static const asn_namedbit PKIFailureInfo_bits[] = {
534 { 0, &hf_cmp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
535 { 1, &hf_cmp_PKIFailureInfo_badMessageCheck, -1, -1, "badMessageCheck", NULL },
536 { 2, &hf_cmp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
537 { 3, &hf_cmp_PKIFailureInfo_badTime, -1, -1, "badTime", NULL },
538 { 4, &hf_cmp_PKIFailureInfo_badCertId, -1, -1, "badCertId", NULL },
539 { 5, &hf_cmp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
540 { 6, &hf_cmp_PKIFailureInfo_wrongAuthority, -1, -1, "wrongAuthority", NULL },
541 { 7, &hf_cmp_PKIFailureInfo_incorrectData, -1, -1, "incorrectData", NULL },
542 { 8, &hf_cmp_PKIFailureInfo_missingTimeStamp, -1, -1, "missingTimeStamp", NULL },
543 { 9, &hf_cmp_PKIFailureInfo_badPOP, -1, -1, "badPOP", NULL },
544 { 10, &hf_cmp_PKIFailureInfo_certRevoked, -1, -1, "certRevoked", NULL },
545 { 11, &hf_cmp_PKIFailureInfo_certConfirmed, -1, -1, "certConfirmed", NULL },
546 { 12, &hf_cmp_PKIFailureInfo_wrongIntegrity, -1, -1, "wrongIntegrity", NULL },
547 { 13, &hf_cmp_PKIFailureInfo_badRecipientNonce, -1, -1, "badRecipientNonce", NULL },
548 { 14, &hf_cmp_PKIFailureInfo_timeNotAvailable, -1, -1, "timeNotAvailable", NULL },
549 { 15, &hf_cmp_PKIFailureInfo_unacceptedPolicy, -1, -1, "unacceptedPolicy", NULL },
550 { 16, &hf_cmp_PKIFailureInfo_unacceptedExtension, -1, -1, "unacceptedExtension", NULL },
551 { 17, &hf_cmp_PKIFailureInfo_addInfoNotAvailable, -1, -1, "addInfoNotAvailable", NULL },
552 { 18, &hf_cmp_PKIFailureInfo_badSenderNonce, -1, -1, "badSenderNonce", NULL },
553 { 19, &hf_cmp_PKIFailureInfo_badCertTemplate, -1, -1, "badCertTemplate", NULL },
554 { 20, &hf_cmp_PKIFailureInfo_signerNotTrusted, -1, -1, "signerNotTrusted", NULL },
555 { 21, &hf_cmp_PKIFailureInfo_transactionIdInUse, -1, -1, "transactionIdInUse", NULL },
556 { 22, &hf_cmp_PKIFailureInfo_unsupportedVersion, -1, -1, "unsupportedVersion", NULL },
557 { 23, &hf_cmp_PKIFailureInfo_notAuthorized, -1, -1, "notAuthorized", NULL },
558 { 24, &hf_cmp_PKIFailureInfo_systemUnavail, -1, -1, "systemUnavail", NULL },
559 { 25, &hf_cmp_PKIFailureInfo_systemFailure, -1, -1, "systemFailure", NULL },
560 { 26, &hf_cmp_PKIFailureInfo_duplicateCertReq, -1, -1, "duplicateCertReq", NULL },
561 { 0, NULL, 0, 0, NULL, NULL }
565 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_) {
566 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
567 PKIFailureInfo_bits, hf_index, ett_cmp_PKIFailureInfo,
574 static const ber_sequence_t PKIStatusInfo_sequence[] = {
575 { &hf_cmp_pkistatus , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus },
576 { &hf_cmp_statusString , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
577 { &hf_cmp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFailureInfo },
578 { NULL, 0, 0, 0, NULL }
582 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_) {
583 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
584 PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo);
590 const value_string cmp_CertOrEncCert_vals[] = {
591 { 0, "certificate" },
592 { 1, "encryptedCert" },
596 static const ber_choice_t CertOrEncCert_choice[] = {
597 { 0, &hf_cmp_certificate , BER_CLASS_CON, 0, 0, dissect_cmp_CMPCertificate },
598 { 1, &hf_cmp_encryptedCert , BER_CLASS_CON, 1, 0, dissect_crmf_EncryptedValue },
599 { 0, NULL, 0, 0, 0, NULL }
603 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_) {
604 offset = dissect_ber_choice(actx, tree, tvb, offset,
605 CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert,
612 static const ber_sequence_t CertifiedKeyPair_sequence[] = {
613 { &hf_cmp_certOrEncCert , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CertOrEncCert },
614 { &hf_cmp_privateKey , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_crmf_EncryptedValue },
615 { &hf_cmp_publicationInfo , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_PKIPublicationInfo },
616 { NULL, 0, 0, 0, NULL }
620 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_) {
621 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
622 CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair);
628 static const ber_sequence_t CertResponse_sequence[] = {
629 { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
630 { &hf_cmp_pkistatusinf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
631 { &hf_cmp_certifiedKeyPair, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair },
632 { &hf_cmp_rspInfo , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
633 { NULL, 0, 0, 0, NULL }
637 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_) {
638 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
639 CertResponse_sequence, hf_index, ett_cmp_CertResponse);
645 static const ber_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = {
646 { &hf_cmp_response_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertResponse },
650 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_) {
651 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
652 SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse);
658 static const ber_sequence_t CertRepMessage_sequence[] = {
659 { &hf_cmp_caPubs , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
660 { &hf_cmp_response , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_OF_CertResponse },
661 { NULL, 0, 0, 0, NULL }
665 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_) {
666 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
667 CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage);
675 dissect_cmp_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
676 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
682 static const ber_sequence_t Challenge_sequence[] = {
683 { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
684 { &hf_cmp_witness , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
685 { &hf_cmp_challenge , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
686 { NULL, 0, 0, 0, NULL }
690 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_) {
691 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
692 Challenge_sequence, hf_index, ett_cmp_Challenge);
698 static const ber_sequence_t POPODecKeyChallContent_sequence_of[1] = {
699 { &hf_cmp_POPODecKeyChallContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_Challenge },
703 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_) {
704 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
705 POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent);
711 static const ber_sequence_t POPODecKeyRespContent_sequence_of[1] = {
712 { &hf_cmp_POPODecKeyRespContent_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
716 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_) {
717 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
718 POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent);
724 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = {
725 { &hf_cmp_keyPairHist_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair },
729 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_) {
730 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
731 SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair);
737 static const ber_sequence_t KeyRecRepContent_sequence[] = {
738 { &hf_cmp_pkistatusinf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
739 { &hf_cmp_newSigCert , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
740 { &hf_cmp_caCerts , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
741 { &hf_cmp_keyPairHist , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair },
742 { NULL, 0, 0, 0, NULL }
746 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_) {
747 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
748 KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent);
754 static const ber_sequence_t RevDetails_sequence[] = {
755 { &hf_cmp_certDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertTemplate },
756 { &hf_cmp_crlEntryDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions },
757 { NULL, 0, 0, 0, NULL }
761 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_) {
762 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
763 RevDetails_sequence, hf_index, ett_cmp_RevDetails);
769 static const ber_sequence_t RevReqContent_sequence_of[1] = {
770 { &hf_cmp_RevReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_RevDetails },
774 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_) {
775 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
776 RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent);
782 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = {
783 { &hf_cmp_rvrpcnt_status_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
787 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_) {
788 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
789 SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo);
795 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = {
796 { &hf_cmp_revCerts_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId },
800 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_) {
801 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
802 SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId);
808 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = {
809 { &hf_cmp_crls_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList },
813 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_) {
814 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
815 SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList);
821 static const ber_sequence_t RevRepContent_sequence[] = {
822 { &hf_cmp_rvrpcnt_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo },
823 { &hf_cmp_revCerts , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId },
824 { &hf_cmp_crls , BER_CLASS_CON, 1, 0, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList },
825 { NULL, 0, 0, 0, NULL }
829 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_) {
830 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
831 RevRepContent_sequence, hf_index, ett_cmp_RevRepContent);
837 static const ber_sequence_t CAKeyUpdAnnContent_sequence[] = {
838 { &hf_cmp_oldWithNew , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
839 { &hf_cmp_newWithOld , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
840 { &hf_cmp_newWithNew , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate },
841 { NULL, 0, 0, 0, NULL }
845 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_) {
846 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
847 CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent);
855 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_) {
856 offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
862 static const ber_sequence_t RevAnnContent_sequence[] = {
863 { &hf_cmp_pkistatus , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus },
864 { &hf_cmp_certId , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId },
865 { &hf_cmp_willBeRevokedAt , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime },
866 { &hf_cmp_badSinceDate , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime },
867 { &hf_cmp_crlDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions },
868 { NULL, 0, 0, 0, NULL }
872 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_) {
873 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
874 RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent);
880 static const ber_sequence_t CRLAnnContent_sequence_of[1] = {
881 { &hf_cmp_CRLAnnContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList },
885 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_) {
886 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
887 CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent);
895 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_) {
896 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
902 static const ber_sequence_t PKIMessages_sequence_of[1] = {
903 { &hf_cmp_PKIMessages_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIMessage },
907 dissect_cmp_PKIMessages(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
908 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
909 PKIMessages_sequence_of, hf_index, ett_cmp_PKIMessages);
917 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_) {
918 offset = dissect_cmp_PKIMessages(implicit_tag, tvb, offset, actx, tree, hf_index);
924 static const ber_sequence_t GenMsgContent_sequence_of[1] = {
925 { &hf_cmp_GenMsgContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
929 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_) {
930 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
931 GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent);
937 static const ber_sequence_t GenRepContent_sequence_of[1] = {
938 { &hf_cmp_GenRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue },
942 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_) {
943 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
944 GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent);
950 static const ber_sequence_t ErrorMsgContent_sequence[] = {
951 { &hf_cmp_pKIStatusInfo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
952 { &hf_cmp_errorCode , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
953 { &hf_cmp_errorDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
954 { NULL, 0, 0, 0, NULL }
958 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_) {
959 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
960 ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent);
966 static const ber_sequence_t CertStatus_sequence[] = {
967 { &hf_cmp_certHash , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
968 { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
969 { &hf_cmp_statusInfo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo },
970 { NULL, 0, 0, 0, NULL }
974 dissect_cmp_CertStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
975 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
976 CertStatus_sequence, hf_index, ett_cmp_CertStatus);
982 static const ber_sequence_t CertConfirmContent_sequence_of[1] = {
983 { &hf_cmp_CertConfirmContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertStatus },
987 dissect_cmp_CertConfirmContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
988 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
989 CertConfirmContent_sequence_of, hf_index, ett_cmp_CertConfirmContent);
995 static const ber_sequence_t PollReqContent_item_sequence[] = {
996 { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
997 { NULL, 0, 0, 0, NULL }
1001 dissect_cmp_PollReqContent_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1002 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1003 PollReqContent_item_sequence, hf_index, ett_cmp_PollReqContent_item);
1009 static const ber_sequence_t PollReqContent_sequence_of[1] = {
1010 { &hf_cmp_PollReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollReqContent_item },
1014 dissect_cmp_PollReqContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1015 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1016 PollReqContent_sequence_of, hf_index, ett_cmp_PollReqContent);
1022 static const ber_sequence_t PollRepContent_item_sequence[] = {
1023 { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
1024 { &hf_cmp_checkAfter , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
1025 { &hf_cmp_reason , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText },
1026 { NULL, 0, 0, 0, NULL }
1030 dissect_cmp_PollRepContent_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1031 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1032 PollRepContent_item_sequence, hf_index, ett_cmp_PollRepContent_item);
1038 static const ber_sequence_t PollRepContent_sequence_of[1] = {
1039 { &hf_cmp_PollRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollRepContent_item },
1043 dissect_cmp_PollRepContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1044 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1045 PollRepContent_sequence_of, hf_index, ett_cmp_PollRepContent);
1051 const value_string cmp_PKIBody_vals[] = {
1082 static const ber_choice_t PKIBody_choice[] = {
1083 { 0, &hf_cmp_ir , BER_CLASS_CON, 0, 0, dissect_crmf_CertReqMessages },
1084 { 1, &hf_cmp_ip , BER_CLASS_CON, 1, 0, dissect_cmp_CertRepMessage },
1085 { 2, &hf_cmp_cr , BER_CLASS_CON, 2, 0, dissect_crmf_CertReqMessages },
1086 { 3, &hf_cmp_cp , BER_CLASS_CON, 3, 0, dissect_cmp_CertRepMessage },
1087 { 4, &hf_cmp_p10cr , BER_CLASS_CON, 4, 0, dissect_cmp_NULL },
1088 { 5, &hf_cmp_popdecc , BER_CLASS_CON, 5, 0, dissect_cmp_POPODecKeyChallContent },
1089 { 6, &hf_cmp_popdecr , BER_CLASS_CON, 6, 0, dissect_cmp_POPODecKeyRespContent },
1090 { 7, &hf_cmp_kur , BER_CLASS_CON, 7, 0, dissect_crmf_CertReqMessages },
1091 { 8, &hf_cmp_kup , BER_CLASS_CON, 8, 0, dissect_cmp_CertRepMessage },
1092 { 9, &hf_cmp_krr , BER_CLASS_CON, 9, 0, dissect_crmf_CertReqMessages },
1093 { 10, &hf_cmp_krp , BER_CLASS_CON, 10, 0, dissect_cmp_KeyRecRepContent },
1094 { 11, &hf_cmp_rr , BER_CLASS_CON, 11, 0, dissect_cmp_RevReqContent },
1095 { 12, &hf_cmp_rp , BER_CLASS_CON, 12, 0, dissect_cmp_RevRepContent },
1096 { 13, &hf_cmp_ccr , BER_CLASS_CON, 13, 0, dissect_crmf_CertReqMessages },
1097 { 14, &hf_cmp_ccp , BER_CLASS_CON, 14, 0, dissect_cmp_CertRepMessage },
1098 { 15, &hf_cmp_ckuann , BER_CLASS_CON, 15, 0, dissect_cmp_CAKeyUpdAnnContent },
1099 { 16, &hf_cmp_cann , BER_CLASS_CON, 16, 0, dissect_cmp_CertAnnContent },
1100 { 17, &hf_cmp_rann , BER_CLASS_CON, 17, 0, dissect_cmp_RevAnnContent },
1101 { 18, &hf_cmp_crlann , BER_CLASS_CON, 18, 0, dissect_cmp_CRLAnnContent },
1102 { 19, &hf_cmp_pkiconf , BER_CLASS_CON, 19, 0, dissect_cmp_PKIConfirmContent },
1103 { 20, &hf_cmp_nested , BER_CLASS_CON, 20, 0, dissect_cmp_NestedMessageContent },
1104 { 21, &hf_cmp_genm , BER_CLASS_CON, 21, 0, dissect_cmp_GenMsgContent },
1105 { 22, &hf_cmp_genp , BER_CLASS_CON, 22, 0, dissect_cmp_GenRepContent },
1106 { 23, &hf_cmp_error , BER_CLASS_CON, 23, 0, dissect_cmp_ErrorMsgContent },
1107 { 24, &hf_cmp_certConf , BER_CLASS_CON, 24, 0, dissect_cmp_CertConfirmContent },
1108 { 25, &hf_cmp_pollReq , BER_CLASS_CON, 25, 0, dissect_cmp_PollReqContent },
1109 { 26, &hf_cmp_pollRep , BER_CLASS_CON, 26, 0, dissect_cmp_PollRepContent },
1110 { 0, NULL, 0, 0, 0, NULL }
1114 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_) {
1118 offset = dissect_ber_choice(actx, tree, tvb, offset,
1119 PKIBody_choice, hf_index, ett_cmp_PKIBody,
1123 if (check_col(actx->pinfo->cinfo, COL_INFO)) {
1124 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Body=%s", val_to_str(branch_taken, cmp_PKIBody_vals, "unknown"));
1135 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_) {
1136 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1144 static const ber_sequence_t PKIMessage_sequence[] = {
1145 { &hf_cmp_header , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader },
1146 { &hf_cmp_body , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody },
1147 { &hf_cmp_protection , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_PKIProtection },
1148 { &hf_cmp_extraCerts , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate },
1149 { NULL, 0, 0, 0, NULL }
1153 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_) {
1154 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1155 PKIMessage_sequence, hf_index, ett_cmp_PKIMessage);
1161 static const ber_sequence_t ProtectedPart_sequence[] = {
1162 { &hf_cmp_header , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader },
1163 { &hf_cmp_body , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody },
1164 { NULL, 0, 0, 0, NULL }
1168 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_) {
1169 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1170 ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart);
1176 static const ber_sequence_t PBMParameter_sequence[] = {
1177 { &hf_cmp_salt , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING },
1178 { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1179 { &hf_cmp_iterationCount , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER },
1180 { &hf_cmp_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1181 { NULL, 0, 0, 0, NULL }
1185 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_) {
1186 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1187 PBMParameter_sequence, hf_index, ett_cmp_PBMParameter);
1193 static const ber_sequence_t DHBMParameter_sequence[] = {
1194 { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1195 { &hf_cmp_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1196 { NULL, 0, 0, 0, NULL }
1200 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_) {
1201 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1202 DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter);
1210 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_) {
1211 offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1219 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_) {
1220 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1228 static const ber_sequence_t OOBCertHash_sequence[] = {
1229 { &hf_cmp_hashAlg , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier },
1230 { &hf_cmp_certId , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_CertId },
1231 { &hf_cmp_hashVal , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_BIT_STRING },
1232 { NULL, 0, 0, 0, NULL }
1236 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_) {
1237 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1238 OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash);
1246 dissect_cmp_CAProtEncCertValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1247 offset = dissect_cmp_CMPCertificate(implicit_tag, tvb, offset, actx, tree, hf_index);
1253 static const ber_sequence_t SignKeyPairTypesValue_sequence_of[1] = {
1254 { &hf_cmp_SignKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1258 dissect_cmp_SignKeyPairTypesValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1259 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1260 SignKeyPairTypesValue_sequence_of, hf_index, ett_cmp_SignKeyPairTypesValue);
1266 static const ber_sequence_t EncKeyPairTypesValue_sequence_of[1] = {
1267 { &hf_cmp_EncKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
1271 dissect_cmp_EncKeyPairTypesValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1272 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1273 EncKeyPairTypesValue_sequence_of, hf_index, ett_cmp_EncKeyPairTypesValue);
1281 dissect_cmp_PreferredSymmAlgValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1282 offset = dissect_pkix1explicit_AlgorithmIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
1290 dissect_cmp_CAKeyUpdateInfoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1291 offset = dissect_cmp_CAKeyUpdAnnContent(implicit_tag, tvb, offset, actx, tree, hf_index);
1299 dissect_cmp_CurrentCRLValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1300 offset = dissect_pkix1explicit_CertificateList(implicit_tag, tvb, offset, actx, tree, hf_index);
1308 dissect_cmp_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1309 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1315 static const ber_sequence_t UnsupportedOIDsValue_sequence_of[1] = {
1316 { &hf_cmp_UnsupportedOIDsValue_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_OBJECT_IDENTIFIER },
1320 dissect_cmp_UnsupportedOIDsValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1321 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1322 UnsupportedOIDsValue_sequence_of, hf_index, ett_cmp_UnsupportedOIDsValue);
1330 dissect_cmp_KeyPairParamReqValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1331 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1339 dissect_cmp_KeyPairParamRepValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1340 offset = dissect_pkix1explicit_AlgorithmIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
1348 dissect_cmp_RevPassphraseValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1349 offset = dissect_crmf_EncryptedValue(implicit_tag, tvb, offset, actx, tree, hf_index);
1357 dissect_cmp_ImplicitConfirmValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1358 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
1366 dissect_cmp_ConfirmWaitTimeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1367 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
1375 dissect_cmp_OrigPKIMessageValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1376 offset = dissect_cmp_PKIMessages(implicit_tag, tvb, offset, actx, tree, hf_index);
1382 static const ber_sequence_t SuppLangTagsValue_sequence_of[1] = {
1383 { &hf_cmp_SuppLangTagsValue_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String },
1387 dissect_cmp_SuppLangTagsValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1388 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1389 SuppLangTagsValue_sequence_of, hf_index, ett_cmp_SuppLangTagsValue);
1396 static void dissect_PBMParameter_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1397 asn1_ctx_t asn1_ctx;
1398 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1399 dissect_cmp_PBMParameter(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_PBMParameter_PDU);
1401 static void dissect_DHBMParameter_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1402 asn1_ctx_t asn1_ctx;
1403 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1404 dissect_cmp_DHBMParameter(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_DHBMParameter_PDU);
1406 static void dissect_CAProtEncCertValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1407 asn1_ctx_t asn1_ctx;
1408 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1409 dissect_cmp_CAProtEncCertValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_CAProtEncCertValue_PDU);
1411 static void dissect_SignKeyPairTypesValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1412 asn1_ctx_t asn1_ctx;
1413 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1414 dissect_cmp_SignKeyPairTypesValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_SignKeyPairTypesValue_PDU);
1416 static void dissect_EncKeyPairTypesValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1417 asn1_ctx_t asn1_ctx;
1418 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1419 dissect_cmp_EncKeyPairTypesValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_EncKeyPairTypesValue_PDU);
1421 static void dissect_PreferredSymmAlgValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1422 asn1_ctx_t asn1_ctx;
1423 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1424 dissect_cmp_PreferredSymmAlgValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_PreferredSymmAlgValue_PDU);
1426 static void dissect_CAKeyUpdateInfoValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1427 asn1_ctx_t asn1_ctx;
1428 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1429 dissect_cmp_CAKeyUpdateInfoValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_CAKeyUpdateInfoValue_PDU);
1431 static void dissect_CurrentCRLValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1432 asn1_ctx_t asn1_ctx;
1433 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1434 dissect_cmp_CurrentCRLValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_CurrentCRLValue_PDU);
1436 static void dissect_UnsupportedOIDsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1437 asn1_ctx_t asn1_ctx;
1438 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1439 dissect_cmp_UnsupportedOIDsValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_UnsupportedOIDsValue_PDU);
1441 static void dissect_KeyPairParamReqValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1442 asn1_ctx_t asn1_ctx;
1443 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1444 dissect_cmp_KeyPairParamReqValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_KeyPairParamReqValue_PDU);
1446 static void dissect_KeyPairParamRepValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1447 asn1_ctx_t asn1_ctx;
1448 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1449 dissect_cmp_KeyPairParamRepValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_KeyPairParamRepValue_PDU);
1451 static void dissect_RevPassphraseValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1452 asn1_ctx_t asn1_ctx;
1453 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1454 dissect_cmp_RevPassphraseValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_RevPassphraseValue_PDU);
1456 static void dissect_ImplicitConfirmValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1457 asn1_ctx_t asn1_ctx;
1458 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1459 dissect_cmp_ImplicitConfirmValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_ImplicitConfirmValue_PDU);
1461 static void dissect_ConfirmWaitTimeValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1462 asn1_ctx_t asn1_ctx;
1463 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1464 dissect_cmp_ConfirmWaitTimeValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_ConfirmWaitTimeValue_PDU);
1466 static void dissect_OrigPKIMessageValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1467 asn1_ctx_t asn1_ctx;
1468 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1469 dissect_cmp_OrigPKIMessageValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_OrigPKIMessageValue_PDU);
1471 static void dissect_SuppLangTagsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1472 asn1_ctx_t asn1_ctx;
1473 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1474 dissect_cmp_SuppLangTagsValue(FALSE, tvb, 0, &asn1_ctx, tree, hf_cmp_SuppLangTagsValue_PDU);
1478 /*--- End of included file: packet-cmp-fn.c ---*/
1479 #line 94 "packet-cmp-template.c"
1482 dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx)
1484 return dissect_cmp_PKIMessage(FALSE, tvb, 0, actx,tree, -1);
1487 #define CMP_TYPE_PKIMSG 0
1488 #define CMP_TYPE_POLLREP 1
1489 #define CMP_TYPE_POLLREQ 2
1490 #define CMP_TYPE_NEGPOLLREP 3
1491 #define CMP_TYPE_PARTIALMSGREP 4
1492 #define CMP_TYPE_FINALMSGREP 5
1493 #define CMP_TYPE_ERRORMSGREP 6
1494 static const value_string cmp_pdu_types[] = {
1495 { CMP_TYPE_PKIMSG, "pkiMsg" },
1496 { CMP_TYPE_POLLREP, "pollRep" },
1497 { CMP_TYPE_POLLREQ, "pollReq" },
1498 { CMP_TYPE_NEGPOLLREP, "negPollRep" },
1499 { CMP_TYPE_PARTIALMSGREP, "partialMsgRep" },
1500 { CMP_TYPE_FINALMSGREP, "finalMsgRep" },
1501 { CMP_TYPE_ERRORMSGREP, "errorMsgRep" },
1506 static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1512 proto_item *item=NULL;
1513 proto_item *ti=NULL;
1514 proto_tree *tree=NULL;
1515 proto_tree *tcptrans_tree=NULL;
1516 asn1_ctx_t asn1_ctx;
1519 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1521 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1522 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1524 if (check_col(pinfo->cinfo, COL_INFO)) {
1525 col_clear(pinfo->cinfo, COL_INFO);
1527 col_set_str(pinfo->cinfo, COL_INFO, "PKIXCMP");
1531 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1532 tree = proto_item_add_subtree(item, ett_cmp);
1535 pdu_len=tvb_get_ntohl(tvb, 0);
1536 pdu_type=tvb_get_guint8(tvb, 4);
1538 if (pdu_type < 10) {
1539 /* RFC2510 TCP transport */
1540 ti = proto_tree_add_item(tree, proto_cmp, tvb, offset, 5, FALSE);
1541 tcptrans_tree = proto_item_add_subtree(ti, ett_cmp);
1542 proto_tree_add_item(tree, hf_cmp_tcptrans_len, tvb, offset, 4, FALSE);
1544 proto_tree_add_item(tree, hf_cmp_tcptrans_type, tvb, offset++, 1, FALSE);
1546 /* post RFC2510 TCP transport - the former "type" field is now "version" */
1547 ti = proto_tree_add_text(tree, tvb, offset, 7, "TCP transport");
1548 tcptrans_tree = proto_item_add_subtree(ti, ett_cmp);
1549 pdu_type=tvb_get_guint8(tvb, 6);
1550 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_len, tvb, offset, 4, FALSE);
1552 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans10_version, tvb, offset++, 1, FALSE);
1553 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans10_flags, tvb, offset++, 1, FALSE);
1554 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_type, tvb, offset++, 1, FALSE);
1557 if (check_col (pinfo->cinfo, COL_INFO)) {
1558 col_set_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x"));
1562 case CMP_TYPE_PKIMSG:
1563 next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
1564 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1565 offset += tvb_length_remaining(tvb, offset);
1567 case CMP_TYPE_POLLREP:
1568 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, FALSE);
1571 ts.secs = tvb_get_ntohl(tvb, 4);
1573 proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
1576 case CMP_TYPE_POLLREQ:
1577 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, FALSE);
1580 case CMP_TYPE_NEGPOLLREP:
1582 case CMP_TYPE_PARTIALMSGREP:
1583 proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_next_poll_ref, tvb, offset, 4, FALSE);
1586 ts.secs = tvb_get_ntohl(tvb, 4);
1588 proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
1591 next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
1592 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1593 offset += tvb_length_remaining(tvb, offset);
1595 case CMP_TYPE_FINALMSGREP:
1596 next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
1597 dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
1598 offset += tvb_length_remaining(tvb, offset);
1600 case CMP_TYPE_ERRORMSGREP:
1608 static void dissect_cmp_tcp_pdu_no_return(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1610 dissect_cmp_tcp_pdu(tvb, pinfo, parent_tree);
1613 static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1618 * Get the length of the CMP-over-TCP packet.
1620 plen = tvb_get_ntohl(tvb, offset);
1626 /* CMP over TCP: RFC2510 section 5.2 and "Transport Protocols for CMP" draft */
1628 dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1632 int offset=4; /* RFC2510 TCP transport header length */
1634 /* only attempt to dissect it as CMP over TCP if we have
1637 if (!tvb_bytes_exist(tvb, 0, 5)) {
1641 pdu_len=tvb_get_ntohl(tvb, 0);
1642 pdu_type=tvb_get_guint8(tvb, 4);
1644 if(pdu_type == 10) {
1645 /* post RFC2510 TCP transport */
1646 pdu_type = tvb_get_guint8(tvb, 7);
1647 offset = 7; /* post RFC2510 TCP transport header length */
1648 /* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1650 * It is definitely at least 3 byte for post RFC2510 TCP transport
1652 if((pdu_len<=2)||(pdu_len>10000)){
1656 /* RFC2510 TCP transport */
1657 /* type is between 0 and 6 */
1661 /* arbitrary limit: assume a CMP over TCP pdu is never >10000 bytes
1663 * It is definitely at least 1 byte to accomodate the flags byte
1665 if((pdu_len<=0)||(pdu_len>10000)){
1670 /* type 0 contains a PKI message and must therefore be >= 3 bytes
1671 * long (flags + BER TAG + BER LENGTH
1673 if((pdu_type==0)&&(pdu_len<3)){
1677 tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, offset, get_cmp_pdu_len,
1678 dissect_cmp_tcp_pdu_no_return);
1680 return tvb_length(tvb);
1685 dissect_cmp_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1687 proto_item *item=NULL;
1688 proto_tree *tree=NULL;
1689 asn1_ctx_t asn1_ctx;
1691 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1693 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1694 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMP");
1696 if (check_col(pinfo->cinfo, COL_INFO)) {
1697 col_clear(pinfo->cinfo, COL_INFO);
1698 col_set_str(pinfo->cinfo, COL_INFO, "PKIXCMP");
1702 item=proto_tree_add_item(parent_tree, proto_cmp, tvb, 0, -1, FALSE);
1703 tree = proto_item_add_subtree(item, ett_cmp);
1706 return dissect_cmp_pdu(tvb, tree, &asn1_ctx);
1710 /*--- proto_register_cmp ----------------------------------------------*/
1711 void proto_register_cmp(void) {
1713 /* List of fields */
1714 static hf_register_info hf[] = {
1716 { "InfoType", "cmp.type.oid",
1717 FT_STRING, BASE_NONE, NULL, 0,
1718 "Type of InfoTypeAndValue", HFILL }},
1719 { &hf_cmp_tcptrans_len,
1720 { "Length", "cmp.tcptrans.length",
1721 FT_UINT32, BASE_DEC, NULL, 0,
1722 "TCP transport Length of PDU in bytes", HFILL }},
1723 { &hf_cmp_tcptrans_type,
1724 { "Type", "cmp.tcptrans.type",
1725 FT_UINT8, BASE_DEC, VALS(cmp_pdu_types), 0,
1726 "TCP transport PDU Type", HFILL }},
1727 { &hf_cmp_tcptrans_poll_ref,
1728 { "Polling Reference", "cmp.tcptrans.poll_ref",
1729 FT_UINT32, BASE_HEX, NULL, 0,
1730 "TCP transport Polling Reference", HFILL }},
1731 { &hf_cmp_tcptrans_next_poll_ref,
1732 { "Next Polling Reference", "cmp.tcptrans.next_poll_ref",
1733 FT_UINT32, BASE_HEX, NULL, 0,
1734 "TCP transport Next Polling Reference ", HFILL }},
1735 { &hf_cmp_tcptrans_ttcb,
1736 { "Time to check Back", "cmp.tcptrans.ttcb",
1737 FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0,
1738 "TCP transport Time to check Back", HFILL }},
1739 { &hf_cmp_tcptrans10_version,
1740 { "Version", "cmp.tcptrans10.version",
1741 FT_UINT8, BASE_DEC, NULL, 0,
1742 "TCP transport version", HFILL }},
1743 { &hf_cmp_tcptrans10_flags,
1744 { "Flags", "cmp.tcptrans10.flags",
1745 FT_UINT8, BASE_DEC, NULL, 0,
1746 "TCP transport flags", HFILL }},
1748 /*--- Included file: packet-cmp-hfarr.c ---*/
1749 #line 1 "packet-cmp-hfarr.c"
1750 { &hf_cmp_PBMParameter_PDU,
1751 { "PBMParameter", "cmp.PBMParameter",
1752 FT_NONE, BASE_NONE, NULL, 0,
1753 "cmp.PBMParameter", HFILL }},
1754 { &hf_cmp_DHBMParameter_PDU,
1755 { "DHBMParameter", "cmp.DHBMParameter",
1756 FT_NONE, BASE_NONE, NULL, 0,
1757 "cmp.DHBMParameter", HFILL }},
1758 { &hf_cmp_CAProtEncCertValue_PDU,
1759 { "CAProtEncCertValue", "cmp.CAProtEncCertValue",
1760 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1761 "cmp.CAProtEncCertValue", HFILL }},
1762 { &hf_cmp_SignKeyPairTypesValue_PDU,
1763 { "SignKeyPairTypesValue", "cmp.SignKeyPairTypesValue",
1764 FT_UINT32, BASE_DEC, NULL, 0,
1765 "cmp.SignKeyPairTypesValue", HFILL }},
1766 { &hf_cmp_EncKeyPairTypesValue_PDU,
1767 { "EncKeyPairTypesValue", "cmp.EncKeyPairTypesValue",
1768 FT_UINT32, BASE_DEC, NULL, 0,
1769 "cmp.EncKeyPairTypesValue", HFILL }},
1770 { &hf_cmp_PreferredSymmAlgValue_PDU,
1771 { "PreferredSymmAlgValue", "cmp.PreferredSymmAlgValue",
1772 FT_NONE, BASE_NONE, NULL, 0,
1773 "cmp.PreferredSymmAlgValue", HFILL }},
1774 { &hf_cmp_CAKeyUpdateInfoValue_PDU,
1775 { "CAKeyUpdateInfoValue", "cmp.CAKeyUpdateInfoValue",
1776 FT_NONE, BASE_NONE, NULL, 0,
1777 "cmp.CAKeyUpdateInfoValue", HFILL }},
1778 { &hf_cmp_CurrentCRLValue_PDU,
1779 { "CurrentCRLValue", "cmp.CurrentCRLValue",
1780 FT_NONE, BASE_NONE, NULL, 0,
1781 "cmp.CurrentCRLValue", HFILL }},
1782 { &hf_cmp_UnsupportedOIDsValue_PDU,
1783 { "UnsupportedOIDsValue", "cmp.UnsupportedOIDsValue",
1784 FT_UINT32, BASE_DEC, NULL, 0,
1785 "cmp.UnsupportedOIDsValue", HFILL }},
1786 { &hf_cmp_KeyPairParamReqValue_PDU,
1787 { "KeyPairParamReqValue", "cmp.KeyPairParamReqValue",
1788 FT_OID, BASE_NONE, NULL, 0,
1789 "cmp.KeyPairParamReqValue", HFILL }},
1790 { &hf_cmp_KeyPairParamRepValue_PDU,
1791 { "KeyPairParamRepValue", "cmp.KeyPairParamRepValue",
1792 FT_NONE, BASE_NONE, NULL, 0,
1793 "cmp.KeyPairParamRepValue", HFILL }},
1794 { &hf_cmp_RevPassphraseValue_PDU,
1795 { "RevPassphraseValue", "cmp.RevPassphraseValue",
1796 FT_NONE, BASE_NONE, NULL, 0,
1797 "cmp.RevPassphraseValue", HFILL }},
1798 { &hf_cmp_ImplicitConfirmValue_PDU,
1799 { "ImplicitConfirmValue", "cmp.ImplicitConfirmValue",
1800 FT_NONE, BASE_NONE, NULL, 0,
1801 "cmp.ImplicitConfirmValue", HFILL }},
1802 { &hf_cmp_ConfirmWaitTimeValue_PDU,
1803 { "ConfirmWaitTimeValue", "cmp.ConfirmWaitTimeValue",
1804 FT_STRING, BASE_NONE, NULL, 0,
1805 "cmp.ConfirmWaitTimeValue", HFILL }},
1806 { &hf_cmp_OrigPKIMessageValue_PDU,
1807 { "OrigPKIMessageValue", "cmp.OrigPKIMessageValue",
1808 FT_UINT32, BASE_DEC, NULL, 0,
1809 "cmp.OrigPKIMessageValue", HFILL }},
1810 { &hf_cmp_SuppLangTagsValue_PDU,
1811 { "SuppLangTagsValue", "cmp.SuppLangTagsValue",
1812 FT_UINT32, BASE_DEC, NULL, 0,
1813 "cmp.SuppLangTagsValue", HFILL }},
1814 { &hf_cmp_x509v3PKCert,
1815 { "x509v3PKCert", "cmp.x509v3PKCert",
1816 FT_NONE, BASE_NONE, NULL, 0,
1817 "pkix1explicit.Certificate", HFILL }},
1819 { "header", "cmp.header",
1820 FT_NONE, BASE_NONE, NULL, 0,
1821 "cmp.PKIHeader", HFILL }},
1823 { "body", "cmp.body",
1824 FT_UINT32, BASE_DEC, VALS(cmp_PKIBody_vals), 0,
1825 "cmp.PKIBody", HFILL }},
1826 { &hf_cmp_protection,
1827 { "protection", "cmp.protection",
1828 FT_BYTES, BASE_HEX, NULL, 0,
1829 "cmp.PKIProtection", HFILL }},
1830 { &hf_cmp_extraCerts,
1831 { "extraCerts", "cmp.extraCerts",
1832 FT_UINT32, BASE_DEC, NULL, 0,
1833 "cmp.SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
1834 { &hf_cmp_extraCerts_item,
1835 { "Item", "cmp.extraCerts_item",
1836 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1837 "cmp.CMPCertificate", HFILL }},
1838 { &hf_cmp_PKIMessages_item,
1839 { "Item", "cmp.PKIMessages_item",
1840 FT_NONE, BASE_NONE, NULL, 0,
1841 "cmp.PKIMessage", HFILL }},
1843 { "pvno", "cmp.pvno",
1844 FT_INT32, BASE_DEC, VALS(cmp_T_pvno_vals), 0,
1845 "cmp.T_pvno", HFILL }},
1847 { "sender", "cmp.sender",
1848 FT_UINT32, BASE_DEC, NULL, 0,
1849 "pkix1implicit.GeneralName", HFILL }},
1850 { &hf_cmp_recipient,
1851 { "recipient", "cmp.recipient",
1852 FT_UINT32, BASE_DEC, NULL, 0,
1853 "pkix1implicit.GeneralName", HFILL }},
1854 { &hf_cmp_messageTime,
1855 { "messageTime", "cmp.messageTime",
1856 FT_STRING, BASE_NONE, NULL, 0,
1857 "cmp.GeneralizedTime", HFILL }},
1858 { &hf_cmp_protectionAlg,
1859 { "protectionAlg", "cmp.protectionAlg",
1860 FT_NONE, BASE_NONE, NULL, 0,
1861 "pkix1explicit.AlgorithmIdentifier", HFILL }},
1862 { &hf_cmp_senderKID,
1863 { "senderKID", "cmp.senderKID",
1864 FT_BYTES, BASE_HEX, NULL, 0,
1865 "pkix1implicit.KeyIdentifier", HFILL }},
1867 { "recipKID", "cmp.recipKID",
1868 FT_BYTES, BASE_HEX, NULL, 0,
1869 "pkix1implicit.KeyIdentifier", HFILL }},
1870 { &hf_cmp_transactionID,
1871 { "transactionID", "cmp.transactionID",
1872 FT_BYTES, BASE_HEX, NULL, 0,
1873 "cmp.OCTET_STRING", HFILL }},
1874 { &hf_cmp_senderNonce,
1875 { "senderNonce", "cmp.senderNonce",
1876 FT_BYTES, BASE_HEX, NULL, 0,
1877 "cmp.OCTET_STRING", HFILL }},
1878 { &hf_cmp_recipNonce,
1879 { "recipNonce", "cmp.recipNonce",
1880 FT_BYTES, BASE_HEX, NULL, 0,
1881 "cmp.OCTET_STRING", HFILL }},
1883 { "freeText", "cmp.freeText",
1884 FT_UINT32, BASE_DEC, NULL, 0,
1885 "cmp.PKIFreeText", HFILL }},
1886 { &hf_cmp_generalInfo,
1887 { "generalInfo", "cmp.generalInfo",
1888 FT_UINT32, BASE_DEC, NULL, 0,
1889 "cmp.SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue", HFILL }},
1890 { &hf_cmp_generalInfo_item,
1891 { "Item", "cmp.generalInfo_item",
1892 FT_NONE, BASE_NONE, NULL, 0,
1893 "cmp.InfoTypeAndValue", HFILL }},
1894 { &hf_cmp_PKIFreeText_item,
1895 { "Item", "cmp.PKIFreeText_item",
1896 FT_STRING, BASE_NONE, NULL, 0,
1897 "cmp.UTF8String", HFILL }},
1900 FT_UINT32, BASE_DEC, NULL, 0,
1901 "crmf.CertReqMessages", HFILL }},
1904 FT_NONE, BASE_NONE, NULL, 0,
1905 "cmp.CertRepMessage", HFILL }},
1908 FT_UINT32, BASE_DEC, NULL, 0,
1909 "crmf.CertReqMessages", HFILL }},
1912 FT_NONE, BASE_NONE, NULL, 0,
1913 "cmp.CertRepMessage", HFILL }},
1915 { "p10cr", "cmp.p10cr",
1916 FT_NONE, BASE_NONE, NULL, 0,
1917 "cmp.NULL", HFILL }},
1919 { "popdecc", "cmp.popdecc",
1920 FT_UINT32, BASE_DEC, NULL, 0,
1921 "cmp.POPODecKeyChallContent", HFILL }},
1923 { "popdecr", "cmp.popdecr",
1924 FT_UINT32, BASE_DEC, NULL, 0,
1925 "cmp.POPODecKeyRespContent", HFILL }},
1928 FT_UINT32, BASE_DEC, NULL, 0,
1929 "crmf.CertReqMessages", HFILL }},
1932 FT_NONE, BASE_NONE, NULL, 0,
1933 "cmp.CertRepMessage", HFILL }},
1936 FT_UINT32, BASE_DEC, NULL, 0,
1937 "crmf.CertReqMessages", HFILL }},
1940 FT_NONE, BASE_NONE, NULL, 0,
1941 "cmp.KeyRecRepContent", HFILL }},
1944 FT_UINT32, BASE_DEC, NULL, 0,
1945 "cmp.RevReqContent", HFILL }},
1948 FT_NONE, BASE_NONE, NULL, 0,
1949 "cmp.RevRepContent", HFILL }},
1952 FT_UINT32, BASE_DEC, NULL, 0,
1953 "crmf.CertReqMessages", HFILL }},
1956 FT_NONE, BASE_NONE, NULL, 0,
1957 "cmp.CertRepMessage", HFILL }},
1959 { "ckuann", "cmp.ckuann",
1960 FT_NONE, BASE_NONE, NULL, 0,
1961 "cmp.CAKeyUpdAnnContent", HFILL }},
1963 { "cann", "cmp.cann",
1964 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
1965 "cmp.CertAnnContent", HFILL }},
1967 { "rann", "cmp.rann",
1968 FT_NONE, BASE_NONE, NULL, 0,
1969 "cmp.RevAnnContent", HFILL }},
1971 { "crlann", "cmp.crlann",
1972 FT_UINT32, BASE_DEC, NULL, 0,
1973 "cmp.CRLAnnContent", HFILL }},
1975 { "pkiconf", "cmp.pkiconf",
1976 FT_NONE, BASE_NONE, NULL, 0,
1977 "cmp.PKIConfirmContent", HFILL }},
1979 { "nested", "cmp.nested",
1980 FT_UINT32, BASE_DEC, NULL, 0,
1981 "cmp.NestedMessageContent", HFILL }},
1983 { "genm", "cmp.genm",
1984 FT_UINT32, BASE_DEC, NULL, 0,
1985 "cmp.GenMsgContent", HFILL }},
1987 { "genp", "cmp.genp",
1988 FT_UINT32, BASE_DEC, NULL, 0,
1989 "cmp.GenRepContent", HFILL }},
1991 { "error", "cmp.error",
1992 FT_NONE, BASE_NONE, NULL, 0,
1993 "cmp.ErrorMsgContent", HFILL }},
1995 { "certConf", "cmp.certConf",
1996 FT_UINT32, BASE_DEC, NULL, 0,
1997 "cmp.CertConfirmContent", HFILL }},
1999 { "pollReq", "cmp.pollReq",
2000 FT_UINT32, BASE_DEC, NULL, 0,
2001 "cmp.PollReqContent", HFILL }},
2003 { "pollRep", "cmp.pollRep",
2004 FT_UINT32, BASE_DEC, NULL, 0,
2005 "cmp.PollRepContent", HFILL }},
2007 { "salt", "cmp.salt",
2008 FT_BYTES, BASE_HEX, NULL, 0,
2009 "cmp.OCTET_STRING", HFILL }},
2012 FT_NONE, BASE_NONE, NULL, 0,
2013 "pkix1explicit.AlgorithmIdentifier", HFILL }},
2014 { &hf_cmp_iterationCount,
2015 { "iterationCount", "cmp.iterationCount",
2016 FT_INT32, BASE_DEC, NULL, 0,
2017 "cmp.INTEGER", HFILL }},
2020 FT_NONE, BASE_NONE, NULL, 0,
2021 "pkix1explicit.AlgorithmIdentifier", HFILL }},
2022 { &hf_cmp_pkistatus,
2023 { "status", "cmp.status",
2024 FT_INT32, BASE_DEC, VALS(cmp_PKIStatus_vals), 0,
2025 "cmp.PKIStatus", HFILL }},
2026 { &hf_cmp_statusString,
2027 { "statusString", "cmp.statusString",
2028 FT_UINT32, BASE_DEC, NULL, 0,
2029 "cmp.PKIFreeText", HFILL }},
2031 { "failInfo", "cmp.failInfo",
2032 FT_BYTES, BASE_HEX, NULL, 0,
2033 "cmp.PKIFailureInfo", HFILL }},
2035 { "hashAlg", "cmp.hashAlg",
2036 FT_NONE, BASE_NONE, NULL, 0,
2037 "pkix1explicit.AlgorithmIdentifier", HFILL }},
2039 { "certId", "cmp.certId",
2040 FT_NONE, BASE_NONE, NULL, 0,
2041 "crmf.CertId", HFILL }},
2043 { "hashVal", "cmp.hashVal",
2044 FT_BYTES, BASE_HEX, NULL, 0,
2045 "cmp.BIT_STRING", HFILL }},
2046 { &hf_cmp_POPODecKeyChallContent_item,
2047 { "Item", "cmp.POPODecKeyChallContent_item",
2048 FT_NONE, BASE_NONE, NULL, 0,
2049 "cmp.Challenge", HFILL }},
2051 { "witness", "cmp.witness",
2052 FT_BYTES, BASE_HEX, NULL, 0,
2053 "cmp.OCTET_STRING", HFILL }},
2054 { &hf_cmp_challenge,
2055 { "challenge", "cmp.challenge",
2056 FT_BYTES, BASE_HEX, NULL, 0,
2057 "cmp.OCTET_STRING", HFILL }},
2058 { &hf_cmp_POPODecKeyRespContent_item,
2059 { "Item", "cmp.POPODecKeyRespContent_item",
2060 FT_INT32, BASE_DEC, NULL, 0,
2061 "cmp.INTEGER", HFILL }},
2063 { "caPubs", "cmp.caPubs",
2064 FT_UINT32, BASE_DEC, NULL, 0,
2065 "cmp.SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
2066 { &hf_cmp_caPubs_item,
2067 { "Item", "cmp.caPubs_item",
2068 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2069 "cmp.CMPCertificate", HFILL }},
2071 { "response", "cmp.response",
2072 FT_UINT32, BASE_DEC, NULL, 0,
2073 "cmp.SEQUENCE_OF_CertResponse", HFILL }},
2074 { &hf_cmp_response_item,
2075 { "Item", "cmp.response_item",
2076 FT_NONE, BASE_NONE, NULL, 0,
2077 "cmp.CertResponse", HFILL }},
2078 { &hf_cmp_certReqId,
2079 { "certReqId", "cmp.certReqId",
2080 FT_INT32, BASE_DEC, NULL, 0,
2081 "cmp.INTEGER", HFILL }},
2082 { &hf_cmp_pkistatusinf,
2083 { "status", "cmp.status",
2084 FT_NONE, BASE_NONE, NULL, 0,
2085 "cmp.PKIStatusInfo", HFILL }},
2086 { &hf_cmp_certifiedKeyPair,
2087 { "certifiedKeyPair", "cmp.certifiedKeyPair",
2088 FT_NONE, BASE_NONE, NULL, 0,
2089 "cmp.CertifiedKeyPair", HFILL }},
2091 { "rspInfo", "cmp.rspInfo",
2092 FT_BYTES, BASE_HEX, NULL, 0,
2093 "cmp.OCTET_STRING", HFILL }},
2094 { &hf_cmp_certOrEncCert,
2095 { "certOrEncCert", "cmp.certOrEncCert",
2096 FT_UINT32, BASE_DEC, VALS(cmp_CertOrEncCert_vals), 0,
2097 "cmp.CertOrEncCert", HFILL }},
2098 { &hf_cmp_privateKey,
2099 { "privateKey", "cmp.privateKey",
2100 FT_NONE, BASE_NONE, NULL, 0,
2101 "crmf.EncryptedValue", HFILL }},
2102 { &hf_cmp_publicationInfo,
2103 { "publicationInfo", "cmp.publicationInfo",
2104 FT_NONE, BASE_NONE, NULL, 0,
2105 "crmf.PKIPublicationInfo", HFILL }},
2106 { &hf_cmp_certificate,
2107 { "certificate", "cmp.certificate",
2108 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2109 "cmp.CMPCertificate", HFILL }},
2110 { &hf_cmp_encryptedCert,
2111 { "encryptedCert", "cmp.encryptedCert",
2112 FT_NONE, BASE_NONE, NULL, 0,
2113 "crmf.EncryptedValue", HFILL }},
2114 { &hf_cmp_newSigCert,
2115 { "newSigCert", "cmp.newSigCert",
2116 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2117 "cmp.CMPCertificate", HFILL }},
2119 { "caCerts", "cmp.caCerts",
2120 FT_UINT32, BASE_DEC, NULL, 0,
2121 "cmp.SEQUENCE_SIZE_1_MAX_OF_CMPCertificate", HFILL }},
2122 { &hf_cmp_caCerts_item,
2123 { "Item", "cmp.caCerts_item",
2124 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2125 "cmp.CMPCertificate", HFILL }},
2126 { &hf_cmp_keyPairHist,
2127 { "keyPairHist", "cmp.keyPairHist",
2128 FT_UINT32, BASE_DEC, NULL, 0,
2129 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair", HFILL }},
2130 { &hf_cmp_keyPairHist_item,
2131 { "Item", "cmp.keyPairHist_item",
2132 FT_NONE, BASE_NONE, NULL, 0,
2133 "cmp.CertifiedKeyPair", HFILL }},
2134 { &hf_cmp_RevReqContent_item,
2135 { "Item", "cmp.RevReqContent_item",
2136 FT_NONE, BASE_NONE, NULL, 0,
2137 "cmp.RevDetails", HFILL }},
2138 { &hf_cmp_certDetails,
2139 { "certDetails", "cmp.certDetails",
2140 FT_NONE, BASE_NONE, NULL, 0,
2141 "crmf.CertTemplate", HFILL }},
2142 { &hf_cmp_crlEntryDetails,
2143 { "crlEntryDetails", "cmp.crlEntryDetails",
2144 FT_UINT32, BASE_DEC, NULL, 0,
2145 "pkix1explicit.Extensions", HFILL }},
2146 { &hf_cmp_rvrpcnt_status,
2147 { "status", "cmp.status",
2148 FT_UINT32, BASE_DEC, NULL, 0,
2149 "cmp.SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo", HFILL }},
2150 { &hf_cmp_rvrpcnt_status_item,
2151 { "Item", "cmp.status_item",
2152 FT_NONE, BASE_NONE, NULL, 0,
2153 "cmp.PKIStatusInfo", HFILL }},
2155 { "revCerts", "cmp.revCerts",
2156 FT_UINT32, BASE_DEC, NULL, 0,
2157 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertId", HFILL }},
2158 { &hf_cmp_revCerts_item,
2159 { "Item", "cmp.revCerts_item",
2160 FT_NONE, BASE_NONE, NULL, 0,
2161 "crmf.CertId", HFILL }},
2163 { "crls", "cmp.crls",
2164 FT_UINT32, BASE_DEC, NULL, 0,
2165 "cmp.SEQUENCE_SIZE_1_MAX_OF_CertificateList", HFILL }},
2166 { &hf_cmp_crls_item,
2167 { "Item", "cmp.crls_item",
2168 FT_NONE, BASE_NONE, NULL, 0,
2169 "pkix1explicit.CertificateList", HFILL }},
2170 { &hf_cmp_oldWithNew,
2171 { "oldWithNew", "cmp.oldWithNew",
2172 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2173 "cmp.CMPCertificate", HFILL }},
2174 { &hf_cmp_newWithOld,
2175 { "newWithOld", "cmp.newWithOld",
2176 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2177 "cmp.CMPCertificate", HFILL }},
2178 { &hf_cmp_newWithNew,
2179 { "newWithNew", "cmp.newWithNew",
2180 FT_UINT32, BASE_DEC, VALS(cmp_CMPCertificate_vals), 0,
2181 "cmp.CMPCertificate", HFILL }},
2182 { &hf_cmp_willBeRevokedAt,
2183 { "willBeRevokedAt", "cmp.willBeRevokedAt",
2184 FT_STRING, BASE_NONE, NULL, 0,
2185 "cmp.GeneralizedTime", HFILL }},
2186 { &hf_cmp_badSinceDate,
2187 { "badSinceDate", "cmp.badSinceDate",
2188 FT_STRING, BASE_NONE, NULL, 0,
2189 "cmp.GeneralizedTime", HFILL }},
2190 { &hf_cmp_crlDetails,
2191 { "crlDetails", "cmp.crlDetails",
2192 FT_UINT32, BASE_DEC, NULL, 0,
2193 "pkix1explicit.Extensions", HFILL }},
2194 { &hf_cmp_CRLAnnContent_item,
2195 { "Item", "cmp.CRLAnnContent_item",
2196 FT_NONE, BASE_NONE, NULL, 0,
2197 "pkix1explicit.CertificateList", HFILL }},
2198 { &hf_cmp_CertConfirmContent_item,
2199 { "Item", "cmp.CertConfirmContent_item",
2200 FT_NONE, BASE_NONE, NULL, 0,
2201 "cmp.CertStatus", HFILL }},
2203 { "certHash", "cmp.certHash",
2204 FT_BYTES, BASE_HEX, NULL, 0,
2205 "cmp.OCTET_STRING", HFILL }},
2206 { &hf_cmp_statusInfo,
2207 { "statusInfo", "cmp.statusInfo",
2208 FT_NONE, BASE_NONE, NULL, 0,
2209 "cmp.PKIStatusInfo", HFILL }},
2211 { "infoType", "cmp.infoType",
2212 FT_OID, BASE_NONE, NULL, 0,
2213 "cmp.T_infoType", HFILL }},
2214 { &hf_cmp_infoValue,
2215 { "infoValue", "cmp.infoValue",
2216 FT_NONE, BASE_NONE, NULL, 0,
2217 "cmp.T_infoValue", HFILL }},
2218 { &hf_cmp_SignKeyPairTypesValue_item,
2219 { "Item", "cmp.SignKeyPairTypesValue_item",
2220 FT_NONE, BASE_NONE, NULL, 0,
2221 "pkix1explicit.AlgorithmIdentifier", HFILL }},
2222 { &hf_cmp_EncKeyPairTypesValue_item,
2223 { "Item", "cmp.EncKeyPairTypesValue_item",
2224 FT_NONE, BASE_NONE, NULL, 0,
2225 "pkix1explicit.AlgorithmIdentifier", HFILL }},
2226 { &hf_cmp_UnsupportedOIDsValue_item,
2227 { "Item", "cmp.UnsupportedOIDsValue_item",
2228 FT_OID, BASE_NONE, NULL, 0,
2229 "cmp.OBJECT_IDENTIFIER", HFILL }},
2230 { &hf_cmp_SuppLangTagsValue_item,
2231 { "Item", "cmp.SuppLangTagsValue_item",
2232 FT_STRING, BASE_NONE, NULL, 0,
2233 "cmp.UTF8String", HFILL }},
2234 { &hf_cmp_GenMsgContent_item,
2235 { "Item", "cmp.GenMsgContent_item",
2236 FT_NONE, BASE_NONE, NULL, 0,
2237 "cmp.InfoTypeAndValue", HFILL }},
2238 { &hf_cmp_GenRepContent_item,
2239 { "Item", "cmp.GenRepContent_item",
2240 FT_NONE, BASE_NONE, NULL, 0,
2241 "cmp.InfoTypeAndValue", HFILL }},
2242 { &hf_cmp_pKIStatusInfo,
2243 { "pKIStatusInfo", "cmp.pKIStatusInfo",
2244 FT_NONE, BASE_NONE, NULL, 0,
2245 "cmp.PKIStatusInfo", HFILL }},
2246 { &hf_cmp_errorCode,
2247 { "errorCode", "cmp.errorCode",
2248 FT_INT32, BASE_DEC, NULL, 0,
2249 "cmp.INTEGER", HFILL }},
2250 { &hf_cmp_errorDetails,
2251 { "errorDetails", "cmp.errorDetails",
2252 FT_UINT32, BASE_DEC, NULL, 0,
2253 "cmp.PKIFreeText", HFILL }},
2254 { &hf_cmp_PollReqContent_item,
2255 { "Item", "cmp.PollReqContent_item",
2256 FT_NONE, BASE_NONE, NULL, 0,
2257 "cmp.PollReqContent_item", HFILL }},
2258 { &hf_cmp_PollRepContent_item,
2259 { "Item", "cmp.PollRepContent_item",
2260 FT_NONE, BASE_NONE, NULL, 0,
2261 "cmp.PollRepContent_item", HFILL }},
2262 { &hf_cmp_checkAfter,
2263 { "checkAfter", "cmp.checkAfter",
2264 FT_INT32, BASE_DEC, NULL, 0,
2265 "cmp.INTEGER", HFILL }},
2267 { "reason", "cmp.reason",
2268 FT_UINT32, BASE_DEC, NULL, 0,
2269 "cmp.PKIFreeText", HFILL }},
2270 { &hf_cmp_PKIFailureInfo_badAlg,
2271 { "badAlg", "cmp.badAlg",
2272 FT_BOOLEAN, 8, NULL, 0x80,
2274 { &hf_cmp_PKIFailureInfo_badMessageCheck,
2275 { "badMessageCheck", "cmp.badMessageCheck",
2276 FT_BOOLEAN, 8, NULL, 0x40,
2278 { &hf_cmp_PKIFailureInfo_badRequest,
2279 { "badRequest", "cmp.badRequest",
2280 FT_BOOLEAN, 8, NULL, 0x20,
2282 { &hf_cmp_PKIFailureInfo_badTime,
2283 { "badTime", "cmp.badTime",
2284 FT_BOOLEAN, 8, NULL, 0x10,
2286 { &hf_cmp_PKIFailureInfo_badCertId,
2287 { "badCertId", "cmp.badCertId",
2288 FT_BOOLEAN, 8, NULL, 0x08,
2290 { &hf_cmp_PKIFailureInfo_badDataFormat,
2291 { "badDataFormat", "cmp.badDataFormat",
2292 FT_BOOLEAN, 8, NULL, 0x04,
2294 { &hf_cmp_PKIFailureInfo_wrongAuthority,
2295 { "wrongAuthority", "cmp.wrongAuthority",
2296 FT_BOOLEAN, 8, NULL, 0x02,
2298 { &hf_cmp_PKIFailureInfo_incorrectData,
2299 { "incorrectData", "cmp.incorrectData",
2300 FT_BOOLEAN, 8, NULL, 0x01,
2302 { &hf_cmp_PKIFailureInfo_missingTimeStamp,
2303 { "missingTimeStamp", "cmp.missingTimeStamp",
2304 FT_BOOLEAN, 8, NULL, 0x80,
2306 { &hf_cmp_PKIFailureInfo_badPOP,
2307 { "badPOP", "cmp.badPOP",
2308 FT_BOOLEAN, 8, NULL, 0x40,
2310 { &hf_cmp_PKIFailureInfo_certRevoked,
2311 { "certRevoked", "cmp.certRevoked",
2312 FT_BOOLEAN, 8, NULL, 0x20,
2314 { &hf_cmp_PKIFailureInfo_certConfirmed,
2315 { "certConfirmed", "cmp.certConfirmed",
2316 FT_BOOLEAN, 8, NULL, 0x10,
2318 { &hf_cmp_PKIFailureInfo_wrongIntegrity,
2319 { "wrongIntegrity", "cmp.wrongIntegrity",
2320 FT_BOOLEAN, 8, NULL, 0x08,
2322 { &hf_cmp_PKIFailureInfo_badRecipientNonce,
2323 { "badRecipientNonce", "cmp.badRecipientNonce",
2324 FT_BOOLEAN, 8, NULL, 0x04,
2326 { &hf_cmp_PKIFailureInfo_timeNotAvailable,
2327 { "timeNotAvailable", "cmp.timeNotAvailable",
2328 FT_BOOLEAN, 8, NULL, 0x02,
2330 { &hf_cmp_PKIFailureInfo_unacceptedPolicy,
2331 { "unacceptedPolicy", "cmp.unacceptedPolicy",
2332 FT_BOOLEAN, 8, NULL, 0x01,
2334 { &hf_cmp_PKIFailureInfo_unacceptedExtension,
2335 { "unacceptedExtension", "cmp.unacceptedExtension",
2336 FT_BOOLEAN, 8, NULL, 0x80,
2338 { &hf_cmp_PKIFailureInfo_addInfoNotAvailable,
2339 { "addInfoNotAvailable", "cmp.addInfoNotAvailable",
2340 FT_BOOLEAN, 8, NULL, 0x40,
2342 { &hf_cmp_PKIFailureInfo_badSenderNonce,
2343 { "badSenderNonce", "cmp.badSenderNonce",
2344 FT_BOOLEAN, 8, NULL, 0x20,
2346 { &hf_cmp_PKIFailureInfo_badCertTemplate,
2347 { "badCertTemplate", "cmp.badCertTemplate",
2348 FT_BOOLEAN, 8, NULL, 0x10,
2350 { &hf_cmp_PKIFailureInfo_signerNotTrusted,
2351 { "signerNotTrusted", "cmp.signerNotTrusted",
2352 FT_BOOLEAN, 8, NULL, 0x08,
2354 { &hf_cmp_PKIFailureInfo_transactionIdInUse,
2355 { "transactionIdInUse", "cmp.transactionIdInUse",
2356 FT_BOOLEAN, 8, NULL, 0x04,
2358 { &hf_cmp_PKIFailureInfo_unsupportedVersion,
2359 { "unsupportedVersion", "cmp.unsupportedVersion",
2360 FT_BOOLEAN, 8, NULL, 0x02,
2362 { &hf_cmp_PKIFailureInfo_notAuthorized,
2363 { "notAuthorized", "cmp.notAuthorized",
2364 FT_BOOLEAN, 8, NULL, 0x01,
2366 { &hf_cmp_PKIFailureInfo_systemUnavail,
2367 { "systemUnavail", "cmp.systemUnavail",
2368 FT_BOOLEAN, 8, NULL, 0x80,
2370 { &hf_cmp_PKIFailureInfo_systemFailure,
2371 { "systemFailure", "cmp.systemFailure",
2372 FT_BOOLEAN, 8, NULL, 0x40,
2374 { &hf_cmp_PKIFailureInfo_duplicateCertReq,
2375 { "duplicateCertReq", "cmp.duplicateCertReq",
2376 FT_BOOLEAN, 8, NULL, 0x20,
2379 /*--- End of included file: packet-cmp-hfarr.c ---*/
2380 #line 362 "packet-cmp-template.c"
2383 /* List of subtrees */
2384 static gint *ett[] = {
2387 /*--- Included file: packet-cmp-ettarr.c ---*/
2388 #line 1 "packet-cmp-ettarr.c"
2389 &ett_cmp_CMPCertificate,
2390 &ett_cmp_PKIMessage,
2391 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate,
2392 &ett_cmp_PKIMessages,
2394 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue,
2395 &ett_cmp_PKIFreeText,
2397 &ett_cmp_ProtectedPart,
2398 &ett_cmp_PBMParameter,
2399 &ett_cmp_DHBMParameter,
2400 &ett_cmp_PKIFailureInfo,
2401 &ett_cmp_PKIStatusInfo,
2402 &ett_cmp_OOBCertHash,
2403 &ett_cmp_POPODecKeyChallContent,
2405 &ett_cmp_POPODecKeyRespContent,
2406 &ett_cmp_CertRepMessage,
2407 &ett_cmp_SEQUENCE_OF_CertResponse,
2408 &ett_cmp_CertResponse,
2409 &ett_cmp_CertifiedKeyPair,
2410 &ett_cmp_CertOrEncCert,
2411 &ett_cmp_KeyRecRepContent,
2412 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair,
2413 &ett_cmp_RevReqContent,
2414 &ett_cmp_RevDetails,
2415 &ett_cmp_RevRepContent,
2416 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo,
2417 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId,
2418 &ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList,
2419 &ett_cmp_CAKeyUpdAnnContent,
2420 &ett_cmp_RevAnnContent,
2421 &ett_cmp_CRLAnnContent,
2422 &ett_cmp_CertConfirmContent,
2423 &ett_cmp_CertStatus,
2424 &ett_cmp_InfoTypeAndValue,
2425 &ett_cmp_SignKeyPairTypesValue,
2426 &ett_cmp_EncKeyPairTypesValue,
2427 &ett_cmp_UnsupportedOIDsValue,
2428 &ett_cmp_SuppLangTagsValue,
2429 &ett_cmp_GenMsgContent,
2430 &ett_cmp_GenRepContent,
2431 &ett_cmp_ErrorMsgContent,
2432 &ett_cmp_PollReqContent,
2433 &ett_cmp_PollReqContent_item,
2434 &ett_cmp_PollRepContent,
2435 &ett_cmp_PollRepContent_item,
2437 /*--- End of included file: packet-cmp-ettarr.c ---*/
2438 #line 368 "packet-cmp-template.c"
2440 module_t *cmp_module;
2442 /* Register protocol */
2443 proto_cmp = proto_register_protocol(PNAME, PSNAME, PFNAME);
2445 /* Register fields and subtrees */
2446 proto_register_field_array(proto_cmp, hf, array_length(hf));
2447 proto_register_subtree_array(ett, array_length(ett));
2449 cmp_module = prefs_register_protocol(proto_cmp, proto_reg_handoff_cmp);
2450 prefs_register_bool_preference(cmp_module, "desegment",
2451 "Reassemble CMP-over-TCP messages spanning multiple TCP segments",
2452 "Whether the CMP-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
2453 "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2456 prefs_register_uint_preference(cmp_module, "tcp_alternate_port",
2457 "Alternate TCP port",
2458 "Decode this TCP port\'s traffic as CMP. Set to \"0\" to disable.",
2460 &cmp_alternate_tcp_port);
2462 prefs_register_uint_preference(cmp_module, "http_alternate_port",
2463 "Alternate HTTP port",
2464 "Decode this TCP port\'s traffic as CMP-over-HTTP. Set to \"0\" to disable. "
2465 "Use this if the Content-Type is not set correctly.",
2467 &cmp_alternate_http_port);
2469 prefs_register_uint_preference(cmp_module, "tcp_style_http_alternate_port",
2470 "Alternate TCP-style-HTTP port",
2471 "Decode this TCP port\'s traffic as TCP-transport-style CMP-over-HTTP. Set to \"0\" to disable. "
2472 "Use this if the Content-Type is not set correctly.",
2474 &cmp_alternate_tcp_style_http_port);
2478 /*--- proto_reg_handoff_cmp -------------------------------------------*/
2479 void proto_reg_handoff_cmp(void) {
2482 cmp_http_handle = new_create_dissector_handle(dissect_cmp_http, proto_cmp);
2483 dissector_add_string("media_type", "application/pkixcmp", cmp_http_handle);
2484 dissector_add_string("media_type", "application/x-pkixcmp", cmp_http_handle);
2486 cmp_tcp_style_http_handle = new_create_dissector_handle(dissect_cmp_tcp_pdu, proto_cmp);
2487 dissector_add_string("media_type", "application/pkixcmp-poll", cmp_tcp_style_http_handle);
2488 dissector_add_string("media_type", "application/x-pkixcmp-poll", cmp_tcp_style_http_handle);
2490 cmp_tcp_handle = new_create_dissector_handle(dissect_cmp_tcp, proto_cmp);
2491 dissector_add("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
2493 oid_add_from_string("Cryptlib-presence-check","1.3.6.1.4.1.3029.3.1.1");
2494 oid_add_from_string("Cryptlib-PKIBoot","1.3.6.1.4.1.3029.3.1.2");
2496 oid_add_from_string("HMAC MD5","1.3.6.1.5.5.8.1.1");
2497 oid_add_from_string("HMAC SHA-1","1.3.6.1.5.5.8.1.2");
2498 oid_add_from_string("HMAC TIGER","1.3.6.1.5.5.8.1.3");
2499 oid_add_from_string("HMAC RIPEMD-160","1.3.6.1.5.5.8.1.4");
2501 oid_add_from_string("sha256WithRSAEncryption","1.2.840.113549.1.1.11");
2504 /*--- Included file: packet-cmp-dis-tab.c ---*/
2505 #line 1 "packet-cmp-dis-tab.c"
2506 register_ber_oid_dissector("1.2.840.113533.7.66.13", dissect_PBMParameter_PDU, proto_cmp, "id-PasswordBasedMac");
2507 register_ber_oid_dissector("1.2.640.113533.7.66.30", dissect_DHBMParameter_PDU, proto_cmp, "id-DHBasedMac");
2508 register_ber_oid_dissector("1.3.6.1.5.5.7.4.1", dissect_CAProtEncCertValue_PDU, proto_cmp, "id-it-caProtEncCert");
2509 register_ber_oid_dissector("1.3.6.1.5.5.7.4.2", dissect_SignKeyPairTypesValue_PDU, proto_cmp, "id-it-signKeyPairTypes");
2510 register_ber_oid_dissector("1.3.6.1.5.5.7.4.3", dissect_EncKeyPairTypesValue_PDU, proto_cmp, "id-it-encKeyPairTypes");
2511 register_ber_oid_dissector("1.3.6.1.5.5.7.4.4", dissect_PreferredSymmAlgValue_PDU, proto_cmp, "id-it-preferredSymmAlg");
2512 register_ber_oid_dissector("1.3.6.1.5.5.7.4.5", dissect_CAKeyUpdateInfoValue_PDU, proto_cmp, "id-it-caKeyUpdateInfo");
2513 register_ber_oid_dissector("1.3.6.1.5.5.7.4.6", dissect_CurrentCRLValue_PDU, proto_cmp, "id-it-currentCRL");
2514 register_ber_oid_dissector("1.3.6.1.5.5.7.4.7", dissect_UnsupportedOIDsValue_PDU, proto_cmp, "id-it-unsupportedOIDs");
2515 register_ber_oid_dissector("1.3.6.1.5.5.7.4.10", dissect_KeyPairParamReqValue_PDU, proto_cmp, "id-it-keyPairParamReq");
2516 register_ber_oid_dissector("1.3.6.1.5.5.7.4.11", dissect_KeyPairParamRepValue_PDU, proto_cmp, "id-it-keyPairParamRep");
2517 register_ber_oid_dissector("1.3.6.1.5.5.7.4.12", dissect_RevPassphraseValue_PDU, proto_cmp, "id-it-revPassphrase");
2518 register_ber_oid_dissector("1.3.6.1.5.5.7.4.13", dissect_ImplicitConfirmValue_PDU, proto_cmp, "id-it-implicitConfirm");
2519 register_ber_oid_dissector("1.3.6.1.5.5.7.4.14", dissect_ConfirmWaitTimeValue_PDU, proto_cmp, "id-it-confirmWaitTime");
2520 register_ber_oid_dissector("1.3.6.1.5.5.7.4.15", dissect_OrigPKIMessageValue_PDU, proto_cmp, "id-it-origPKIMessage");
2521 register_ber_oid_dissector("1.3.6.1.5.5.7.4.16", dissect_SuppLangTagsValue_PDU, proto_cmp, "id-it-suppLangTags");
2524 /*--- End of included file: packet-cmp-dis-tab.c ---*/
2525 #line 433 "packet-cmp-template.c"
2529 /* change alternate TCP port if changed in the preferences */
2530 if (cmp_alternate_tcp_port != cmp_alternate_tcp_port_prev) {
2531 if (cmp_alternate_tcp_port_prev != 0)
2532 dissector_delete("tcp.port", cmp_alternate_tcp_port_prev, cmp_tcp_handle);
2533 if (cmp_alternate_tcp_port != 0)
2534 dissector_add("tcp.port", cmp_alternate_tcp_port, cmp_tcp_handle);
2535 cmp_alternate_tcp_port_prev = cmp_alternate_tcp_port;
2538 /* change alternate HTTP port if changed in the preferences */
2539 if (cmp_alternate_http_port != cmp_alternate_http_port_prev) {
2540 if (cmp_alternate_http_port_prev != 0) {
2541 dissector_delete("tcp.port", cmp_alternate_http_port_prev, NULL);
2542 dissector_delete("http.port", cmp_alternate_http_port_prev, NULL);
2544 if (cmp_alternate_http_port != 0)
2545 http_dissector_add( cmp_alternate_http_port, cmp_http_handle);
2546 cmp_alternate_http_port_prev = cmp_alternate_http_port;
2549 /* change alternate TCP-style-HTTP port if changed in the preferences */
2550 if (cmp_alternate_tcp_style_http_port != cmp_alternate_tcp_style_http_port_prev) {
2551 if (cmp_alternate_tcp_style_http_port_prev != 0) {
2552 dissector_delete("tcp.port", cmp_alternate_tcp_style_http_port_prev, NULL);
2553 dissector_delete("http.port", cmp_alternate_tcp_style_http_port_prev, NULL);
2555 if (cmp_alternate_tcp_style_http_port != 0)
2556 http_dissector_add( cmp_alternate_tcp_style_http_port, cmp_tcp_style_http_handle);
2557 cmp_alternate_tcp_style_http_port_prev = cmp_alternate_tcp_style_http_port;