1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2eth.py -X -b -e -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */
6 /* Input file: packet-crmf-template.c */
8 #line 1 "packet-crmf-template.c"
10 * Routines for RFC2511 Certificate Request Message Format packet dissection
11 * Ronnie Sahlberg 2004
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/conversation.h>
45 #include "packet-ber.h"
46 #include "packet-crmf.h"
47 #include "packet-cms.h"
48 #include "packet-pkix1explicit.h"
49 #include "packet-pkix1implicit.h"
51 #define PNAME "Certificate Request Message Format"
55 /* Initialize the protocol and registered fields */
57 static int hf_crmf_type_oid = -1;
59 /*--- Included file: packet-crmf-hf.c ---*/
60 #line 1 "packet-crmf-hf.c"
61 static int hf_crmf_PBMParameter_PDU = -1; /* PBMParameter */
62 static int hf_crmf_utcTime = -1; /* UTCTime */
63 static int hf_crmf_generalTime = -1; /* GeneralizedTime */
64 static int hf_crmf_CertReqMessages_item = -1; /* CertReqMsg */
65 static int hf_crmf_certReq = -1; /* CertRequest */
66 static int hf_crmf_pop = -1; /* ProofOfPossession */
67 static int hf_crmf_regInfo = -1; /* SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue */
68 static int hf_crmf_regInfo_item = -1; /* AttributeTypeAndValue */
69 static int hf_crmf_certReqId = -1; /* INTEGER */
70 static int hf_crmf_certTemplate = -1; /* CertTemplate */
71 static int hf_crmf_controls = -1; /* Controls */
72 static int hf_crmf_version = -1; /* Version */
73 static int hf_crmf_serialNumber = -1; /* INTEGER */
74 static int hf_crmf_signingAlg = -1; /* AlgorithmIdentifier */
75 static int hf_crmf_template_issuer = -1; /* Name */
76 static int hf_crmf_validity = -1; /* OptionalValidity */
77 static int hf_crmf_subject = -1; /* Name */
78 static int hf_crmf_publicKey = -1; /* SubjectPublicKeyInfo */
79 static int hf_crmf_issuerUID = -1; /* UniqueIdentifier */
80 static int hf_crmf_subjectUID = -1; /* UniqueIdentifier */
81 static int hf_crmf_extensions = -1; /* Extensions */
82 static int hf_crmf_notBefore = -1; /* Time */
83 static int hf_crmf_notAfter = -1; /* Time */
84 static int hf_crmf_Controls_item = -1; /* AttributeTypeAndValue */
85 static int hf_crmf_type = -1; /* T_type */
86 static int hf_crmf_value = -1; /* T_value */
87 static int hf_crmf_raVerified = -1; /* NULL */
88 static int hf_crmf_signature = -1; /* POPOSigningKey */
89 static int hf_crmf_keyEncipherment = -1; /* POPOPrivKey */
90 static int hf_crmf_keyAgreement = -1; /* POPOPrivKey */
91 static int hf_crmf_poposkInput = -1; /* POPOSigningKeyInput */
92 static int hf_crmf_algorithmIdentifier = -1; /* AlgorithmIdentifier */
93 static int hf_crmf_sk_signature = -1; /* BIT_STRING */
94 static int hf_crmf_authInfo = -1; /* T_authInfo */
95 static int hf_crmf_sender = -1; /* GeneralName */
96 static int hf_crmf_publicKeyMAC = -1; /* PKMACValue */
97 static int hf_crmf_algId = -1; /* AlgorithmIdentifier */
98 static int hf_crmf_pkmac_value = -1; /* BIT_STRING */
99 static int hf_crmf_salt = -1; /* OCTET_STRING */
100 static int hf_crmf_owf = -1; /* AlgorithmIdentifier */
101 static int hf_crmf_iterationCount = -1; /* INTEGER */
102 static int hf_crmf_mac = -1; /* AlgorithmIdentifier */
103 static int hf_crmf_thisMessage = -1; /* BIT_STRING */
104 static int hf_crmf_subsequentMessage = -1; /* SubsequentMessage */
105 static int hf_crmf_dhMAC = -1; /* BIT_STRING */
106 static int hf_crmf_action = -1; /* T_action */
107 static int hf_crmf_pubInfos = -1; /* SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo */
108 static int hf_crmf_pubInfos_item = -1; /* SinglePubInfo */
109 static int hf_crmf_pubMethod = -1; /* T_pubMethod */
110 static int hf_crmf_pubLocation = -1; /* GeneralName */
111 static int hf_crmf_encryptedPrivKey = -1; /* EncryptedKey */
112 static int hf_crmf_keyGenParameters = -1; /* KeyGenParameters */
113 static int hf_crmf_archiveRemGenPrivKey = -1; /* BOOLEAN */
114 static int hf_crmf_encryptedValue = -1; /* EncryptedValue */
115 static int hf_crmf_envelopedData = -1; /* EnvelopedData */
116 static int hf_crmf_intendedAlg = -1; /* AlgorithmIdentifier */
117 static int hf_crmf_symmAlg = -1; /* AlgorithmIdentifier */
118 static int hf_crmf_encSymmKey = -1; /* BIT_STRING */
119 static int hf_crmf_keyAlg = -1; /* AlgorithmIdentifier */
120 static int hf_crmf_valueHint = -1; /* OCTET_STRING */
121 static int hf_crmf_encValue = -1; /* BIT_STRING */
122 static int hf_crmf_issuer = -1; /* GeneralName */
124 /*--- End of included file: packet-crmf-hf.c ---*/
125 #line 51 "packet-crmf-template.c"
127 /* Initialize the subtree pointers */
129 /*--- Included file: packet-crmf-ett.c ---*/
130 #line 1 "packet-crmf-ett.c"
131 static gint ett_crmf_Time = -1;
132 static gint ett_crmf_CertReqMessages = -1;
133 static gint ett_crmf_CertReqMsg = -1;
134 static gint ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue = -1;
135 static gint ett_crmf_CertRequest = -1;
136 static gint ett_crmf_CertTemplate = -1;
137 static gint ett_crmf_OptionalValidity = -1;
138 static gint ett_crmf_Controls = -1;
139 static gint ett_crmf_AttributeTypeAndValue = -1;
140 static gint ett_crmf_ProofOfPossession = -1;
141 static gint ett_crmf_POPOSigningKey = -1;
142 static gint ett_crmf_POPOSigningKeyInput = -1;
143 static gint ett_crmf_T_authInfo = -1;
144 static gint ett_crmf_PKMACValue = -1;
145 static gint ett_crmf_PBMParameter = -1;
146 static gint ett_crmf_POPOPrivKey = -1;
147 static gint ett_crmf_PKIPublicationInfo = -1;
148 static gint ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo = -1;
149 static gint ett_crmf_SinglePubInfo = -1;
150 static gint ett_crmf_PKIArchiveOptions = -1;
151 static gint ett_crmf_EncryptedKey = -1;
152 static gint ett_crmf_EncryptedValue = -1;
153 static gint ett_crmf_CertId = -1;
155 /*--- End of included file: packet-crmf-ett.c ---*/
156 #line 54 "packet-crmf-template.c"
158 static const char *object_identifier_id;
161 /*--- Included file: packet-crmf-fn.c ---*/
162 #line 1 "packet-crmf-fn.c"
163 /*--- Fields for imported types ---*/
165 static int dissect_signingAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
166 return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_signingAlg);
168 static int dissect_template_issuer_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
169 return dissect_pkix1explicit_Name(TRUE, tvb, offset, pinfo, tree, hf_crmf_template_issuer);
171 static int dissect_subject_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
172 return dissect_pkix1explicit_Name(TRUE, tvb, offset, pinfo, tree, hf_crmf_subject);
174 static int dissect_publicKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
175 return dissect_pkix1explicit_SubjectPublicKeyInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_publicKey);
177 static int dissect_publicKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
178 return dissect_pkix1explicit_SubjectPublicKeyInfo(TRUE, tvb, offset, pinfo, tree, hf_crmf_publicKey);
180 static int dissect_extensions_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
181 return dissect_pkix1explicit_Extensions(TRUE, tvb, offset, pinfo, tree, hf_crmf_extensions);
183 static int dissect_algorithmIdentifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
184 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_algorithmIdentifier);
186 static int dissect_sender_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
187 return dissect_pkix1implicit_GeneralName(TRUE, tvb, offset, pinfo, tree, hf_crmf_sender);
189 static int dissect_algId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
190 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_algId);
192 static int dissect_owf(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
193 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_owf);
195 static int dissect_mac(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
196 return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_crmf_mac);
198 static int dissect_pubLocation(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
199 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubLocation);
201 static int dissect_envelopedData_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
202 return dissect_cms_EnvelopedData(TRUE, tvb, offset, pinfo, tree, hf_crmf_envelopedData);
204 static int dissect_intendedAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
205 return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_intendedAlg);
207 static int dissect_symmAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
208 return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_symmAlg);
210 static int dissect_keyAlg_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
211 return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyAlg);
213 static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
214 return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, pinfo, tree, hf_crmf_issuer);
218 static const value_string crmf_Version_vals[] = {
227 dissect_crmf_Version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
228 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
233 static int dissect_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
234 return dissect_crmf_Version(TRUE, tvb, offset, pinfo, tree, hf_crmf_version);
240 dissect_crmf_UniqueIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
241 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
247 static int dissect_issuerUID_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
248 return dissect_crmf_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_issuerUID);
250 static int dissect_subjectUID_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
251 return dissect_crmf_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_crmf_subjectUID);
257 dissect_crmf_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
258 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
259 pinfo, tree, tvb, offset, hf_index,
264 static int dissect_utcTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
265 return dissect_crmf_UTCTime(FALSE, tvb, offset, pinfo, tree, hf_crmf_utcTime);
271 dissect_crmf_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
272 offset = dissect_ber_GeneralizedTime(implicit_tag, pinfo, tree, tvb, offset, hf_index);
276 static int dissect_generalTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
277 return dissect_crmf_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_crmf_generalTime);
281 static const value_string crmf_Time_vals[] = {
283 { 1, "generalTime" },
287 static const ber_choice_t Time_choice[] = {
288 { 0, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_utcTime },
289 { 1, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_generalTime },
294 dissect_crmf_Time(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
295 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
296 Time_choice, hf_index, ett_crmf_Time,
301 static int dissect_notBefore_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
302 return dissect_crmf_Time(TRUE, tvb, offset, pinfo, tree, hf_crmf_notBefore);
304 static int dissect_notAfter_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
305 return dissect_crmf_Time(TRUE, tvb, offset, pinfo, tree, hf_crmf_notAfter);
311 dissect_crmf_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
312 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
317 static int dissect_certReqId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
318 return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_certReqId);
320 static int dissect_serialNumber(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
321 return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_serialNumber);
323 static int dissect_serialNumber_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
324 return dissect_crmf_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_crmf_serialNumber);
326 static int dissect_iterationCount(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
327 return dissect_crmf_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_crmf_iterationCount);
331 static const ber_sequence_t OptionalValidity_sequence[] = {
332 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_notBefore_impl },
333 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_notAfter_impl },
338 dissect_crmf_OptionalValidity(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
339 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
340 OptionalValidity_sequence, hf_index, ett_crmf_OptionalValidity);
344 static int dissect_validity_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
345 return dissect_crmf_OptionalValidity(TRUE, tvb, offset, pinfo, tree, hf_crmf_validity);
349 static const ber_sequence_t CertTemplate_sequence[] = {
350 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_version_impl },
351 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_serialNumber_impl },
352 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_signingAlg_impl },
353 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_template_issuer_impl },
354 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_validity_impl },
355 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subject_impl },
356 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_publicKey_impl },
357 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_issuerUID_impl },
358 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subjectUID_impl },
359 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
364 dissect_crmf_CertTemplate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
365 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
366 CertTemplate_sequence, hf_index, ett_crmf_CertTemplate);
370 static int dissect_certTemplate(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
371 return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_crmf_certTemplate);
377 dissect_crmf_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
378 offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_crmf_type_oid, &object_identifier_id);
382 static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
383 return dissect_crmf_T_type(FALSE, tvb, offset, pinfo, tree, hf_crmf_type);
389 dissect_crmf_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
391 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
397 static int dissect_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
398 return dissect_crmf_T_value(FALSE, tvb, offset, pinfo, tree, hf_crmf_value);
402 static const ber_sequence_t AttributeTypeAndValue_sequence[] = {
403 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type },
404 { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value },
409 dissect_crmf_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
410 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
411 AttributeTypeAndValue_sequence, hf_index, ett_crmf_AttributeTypeAndValue);
415 static int dissect_regInfo_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
416 return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_regInfo_item);
418 static int dissect_Controls_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
419 return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_Controls_item);
423 static const ber_sequence_t Controls_sequence_of[1] = {
424 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Controls_item },
428 dissect_crmf_Controls(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
429 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
430 Controls_sequence_of, hf_index, ett_crmf_Controls);
434 static int dissect_controls(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
435 return dissect_crmf_Controls(FALSE, tvb, offset, pinfo, tree, hf_crmf_controls);
439 static const ber_sequence_t CertRequest_sequence[] = {
440 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId },
441 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certTemplate },
442 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_controls },
447 dissect_crmf_CertRequest(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
448 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
449 CertRequest_sequence, hf_index, ett_crmf_CertRequest);
453 static int dissect_certReq(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
454 return dissect_crmf_CertRequest(FALSE, tvb, offset, pinfo, tree, hf_crmf_certReq);
460 dissect_crmf_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
461 offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
465 static int dissect_raVerified_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
466 return dissect_crmf_NULL(TRUE, tvb, offset, pinfo, tree, hf_crmf_raVerified);
472 dissect_crmf_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
473 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
479 static int dissect_sk_signature(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
480 return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_sk_signature);
482 static int dissect_pkmac_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
483 return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_pkmac_value);
485 static int dissect_thisMessage_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
486 return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_thisMessage);
488 static int dissect_dhMAC_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
489 return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_dhMAC);
491 static int dissect_encSymmKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
492 return dissect_crmf_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_encSymmKey);
494 static int dissect_encValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
495 return dissect_crmf_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_encValue);
499 static const ber_sequence_t PKMACValue_sequence[] = {
500 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algId },
501 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkmac_value },
506 dissect_crmf_PKMACValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
507 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
508 PKMACValue_sequence, hf_index, ett_crmf_PKMACValue);
512 static int dissect_publicKeyMAC(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
513 return dissect_crmf_PKMACValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_publicKeyMAC);
517 static const value_string crmf_T_authInfo_vals[] = {
519 { 1, "publicKeyMAC" },
523 static const ber_choice_t T_authInfo_choice[] = {
524 { 0, BER_CLASS_CON, 0, 0, dissect_sender_impl },
525 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKeyMAC },
530 dissect_crmf_T_authInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
531 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
532 T_authInfo_choice, hf_index, ett_crmf_T_authInfo,
537 static int dissect_authInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
538 return dissect_crmf_T_authInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_authInfo);
542 static const ber_sequence_t POPOSigningKeyInput_sequence[] = {
543 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_authInfo },
544 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKey },
549 dissect_crmf_POPOSigningKeyInput(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
550 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
551 POPOSigningKeyInput_sequence, hf_index, ett_crmf_POPOSigningKeyInput);
555 static int dissect_poposkInput_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
556 return dissect_crmf_POPOSigningKeyInput(TRUE, tvb, offset, pinfo, tree, hf_crmf_poposkInput);
560 static const ber_sequence_t POPOSigningKey_sequence[] = {
561 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_poposkInput_impl },
562 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier },
563 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_sk_signature },
568 dissect_crmf_POPOSigningKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
569 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
570 POPOSigningKey_sequence, hf_index, ett_crmf_POPOSigningKey);
574 static int dissect_signature_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
575 return dissect_crmf_POPOSigningKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_signature);
579 const value_string crmf_SubsequentMessage_vals[] = {
581 { 1, "challengeResp" },
587 dissect_crmf_SubsequentMessage(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
588 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
593 static int dissect_subsequentMessage_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
594 return dissect_crmf_SubsequentMessage(TRUE, tvb, offset, pinfo, tree, hf_crmf_subsequentMessage);
598 const value_string crmf_POPOPrivKey_vals[] = {
599 { 0, "thisMessage" },
600 { 1, "subsequentMessage" },
605 static const ber_choice_t POPOPrivKey_choice[] = {
606 { 0, BER_CLASS_CON, 0, 0, dissect_thisMessage_impl },
607 { 1, BER_CLASS_CON, 1, 0, dissect_subsequentMessage_impl },
608 { 2, BER_CLASS_CON, 2, 0, dissect_dhMAC_impl },
613 dissect_crmf_POPOPrivKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
614 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
615 POPOPrivKey_choice, hf_index, ett_crmf_POPOPrivKey,
620 static int dissect_keyEncipherment_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
621 return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyEncipherment);
623 static int dissect_keyAgreement_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
624 return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyAgreement);
628 const value_string crmf_ProofOfPossession_vals[] = {
631 { 2, "keyEncipherment" },
632 { 3, "keyAgreement" },
636 static const ber_choice_t ProofOfPossession_choice[] = {
637 { 0, BER_CLASS_CON, 0, 0, dissect_raVerified_impl },
638 { 1, BER_CLASS_CON, 1, 0, dissect_signature_impl },
639 { 2, BER_CLASS_CON, 2, 0, dissect_keyEncipherment_impl },
640 { 3, BER_CLASS_CON, 3, 0, dissect_keyAgreement_impl },
645 dissect_crmf_ProofOfPossession(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
646 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
647 ProofOfPossession_choice, hf_index, ett_crmf_ProofOfPossession,
652 static int dissect_pop(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
653 return dissect_crmf_ProofOfPossession(FALSE, tvb, offset, pinfo, tree, hf_crmf_pop);
657 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of[1] = {
658 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_regInfo_item },
662 dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
663 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
664 SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue);
668 static int dissect_regInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
669 return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_regInfo);
673 static const ber_sequence_t CertReqMsg_sequence[] = {
674 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certReq },
675 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pop },
676 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_regInfo },
681 dissect_crmf_CertReqMsg(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
682 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
683 CertReqMsg_sequence, hf_index, ett_crmf_CertReqMsg);
687 static int dissect_CertReqMessages_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
688 return dissect_crmf_CertReqMsg(FALSE, tvb, offset, pinfo, tree, hf_crmf_CertReqMessages_item);
692 static const ber_sequence_t CertReqMessages_sequence_of[1] = {
693 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CertReqMessages_item },
697 dissect_crmf_CertReqMessages(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
698 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
699 CertReqMessages_sequence_of, hf_index, ett_crmf_CertReqMessages);
707 dissect_crmf_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
708 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
713 static int dissect_salt(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
714 return dissect_crmf_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_crmf_salt);
716 static int dissect_valueHint_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
717 return dissect_crmf_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_crmf_valueHint);
721 static const ber_sequence_t PBMParameter_sequence[] = {
722 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt },
723 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf },
724 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount },
725 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac },
730 dissect_crmf_PBMParameter(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
731 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
732 PBMParameter_sequence, hf_index, ett_crmf_PBMParameter);
740 dissect_crmf_RegToken(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
741 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
742 pinfo, tree, tvb, offset, hf_index,
751 dissect_crmf_Authenticator(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
752 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
753 pinfo, tree, tvb, offset, hf_index,
760 static const value_string crmf_T_action_vals[] = {
761 { 0, "dontPublish" },
762 { 1, "pleasePublish" },
768 dissect_crmf_T_action(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
769 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
774 static int dissect_action(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
775 return dissect_crmf_T_action(FALSE, tvb, offset, pinfo, tree, hf_crmf_action);
779 static const value_string crmf_T_pubMethod_vals[] = {
789 dissect_crmf_T_pubMethod(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
790 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
795 static int dissect_pubMethod(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
796 return dissect_crmf_T_pubMethod(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubMethod);
800 static const ber_sequence_t SinglePubInfo_sequence[] = {
801 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pubMethod },
802 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubLocation },
807 dissect_crmf_SinglePubInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
808 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
809 SinglePubInfo_sequence, hf_index, ett_crmf_SinglePubInfo);
813 static int dissect_pubInfos_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
814 return dissect_crmf_SinglePubInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubInfos_item);
818 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of[1] = {
819 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pubInfos_item },
823 dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
824 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
825 SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo);
829 static int dissect_pubInfos(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
830 return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(FALSE, tvb, offset, pinfo, tree, hf_crmf_pubInfos);
834 static const ber_sequence_t PKIPublicationInfo_sequence[] = {
835 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_action },
836 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubInfos },
841 dissect_crmf_PKIPublicationInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
842 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
843 PKIPublicationInfo_sequence, hf_index, ett_crmf_PKIPublicationInfo);
849 static const ber_sequence_t EncryptedValue_sequence[] = {
850 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_intendedAlg_impl },
851 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_symmAlg_impl },
852 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_encSymmKey_impl },
853 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_keyAlg_impl },
854 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_valueHint_impl },
855 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encValue },
860 dissect_crmf_EncryptedValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
861 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
862 EncryptedValue_sequence, hf_index, ett_crmf_EncryptedValue);
866 static int dissect_encryptedValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
867 return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_crmf_encryptedValue);
871 const value_string crmf_EncryptedKey_vals[] = {
872 { 0, "encryptedValue" },
873 { 1, "envelopedData" },
877 static const ber_choice_t EncryptedKey_choice[] = {
878 { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_encryptedValue },
879 { 1, BER_CLASS_CON, 0, 0, dissect_envelopedData_impl },
884 dissect_crmf_EncryptedKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
885 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
886 EncryptedKey_choice, hf_index, ett_crmf_EncryptedKey,
891 static int dissect_encryptedPrivKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
892 return dissect_crmf_EncryptedKey(TRUE, tvb, offset, pinfo, tree, hf_crmf_encryptedPrivKey);
898 dissect_crmf_KeyGenParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
899 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
904 static int dissect_keyGenParameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
905 return dissect_crmf_KeyGenParameters(TRUE, tvb, offset, pinfo, tree, hf_crmf_keyGenParameters);
911 dissect_crmf_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
912 offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index);
916 static int dissect_archiveRemGenPrivKey_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
917 return dissect_crmf_BOOLEAN(TRUE, tvb, offset, pinfo, tree, hf_crmf_archiveRemGenPrivKey);
921 const value_string crmf_PKIArchiveOptions_vals[] = {
922 { 0, "encryptedPrivKey" },
923 { 1, "keyGenParameters" },
924 { 2, "archiveRemGenPrivKey" },
928 static const ber_choice_t PKIArchiveOptions_choice[] = {
929 { 0, BER_CLASS_CON, 0, 0, dissect_encryptedPrivKey_impl },
930 { 1, BER_CLASS_CON, 1, 0, dissect_keyGenParameters_impl },
931 { 2, BER_CLASS_CON, 2, 0, dissect_archiveRemGenPrivKey_impl },
936 dissect_crmf_PKIArchiveOptions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
937 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
938 PKIArchiveOptions_choice, hf_index, ett_crmf_PKIArchiveOptions,
945 static const ber_sequence_t CertId_sequence[] = {
946 { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer },
947 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber },
952 dissect_crmf_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
953 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
954 CertId_sequence, hf_index, ett_crmf_CertId);
962 dissect_crmf_OldCertId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
963 offset = dissect_crmf_CertId(implicit_tag, tvb, offset, pinfo, tree, hf_index);
971 dissect_crmf_ProtocolEncrKey(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
972 offset = dissect_pkix1explicit_SubjectPublicKeyInfo(implicit_tag, tvb, offset, pinfo, tree, hf_index);
980 dissect_crmf_UTF8Pairs(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
981 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
982 pinfo, tree, tvb, offset, hf_index,
991 dissect_crmf_CertReq(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
992 offset = dissect_crmf_CertRequest(implicit_tag, tvb, offset, pinfo, tree, hf_index);
999 static void dissect_PBMParameter_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
1000 dissect_crmf_PBMParameter(FALSE, tvb, 0, pinfo, tree, hf_crmf_PBMParameter_PDU);
1004 /*--- End of included file: packet-crmf-fn.c ---*/
1005 #line 58 "packet-crmf-template.c"
1008 /*--- proto_register_crmf ----------------------------------------------*/
1009 void proto_register_crmf(void) {
1011 /* List of fields */
1012 static hf_register_info hf[] = {
1013 { &hf_crmf_type_oid,
1014 { "Type", "crmf.type.oid",
1015 FT_STRING, BASE_NONE, NULL, 0,
1016 "Type of AttributeTypeAndValue", HFILL }},
1018 /*--- Included file: packet-crmf-hfarr.c ---*/
1019 #line 1 "packet-crmf-hfarr.c"
1020 { &hf_crmf_PBMParameter_PDU,
1021 { "PBMParameter", "crmf.PBMParameter",
1022 FT_NONE, BASE_NONE, NULL, 0,
1023 "PBMParameter", HFILL }},
1025 { "utcTime", "crmf.utcTime",
1026 FT_STRING, BASE_NONE, NULL, 0,
1027 "Time/utcTime", HFILL }},
1028 { &hf_crmf_generalTime,
1029 { "generalTime", "crmf.generalTime",
1030 FT_STRING, BASE_NONE, NULL, 0,
1031 "Time/generalTime", HFILL }},
1032 { &hf_crmf_CertReqMessages_item,
1033 { "Item", "crmf.CertReqMessages_item",
1034 FT_NONE, BASE_NONE, NULL, 0,
1035 "CertReqMessages/_item", HFILL }},
1037 { "certReq", "crmf.certReq",
1038 FT_NONE, BASE_NONE, NULL, 0,
1039 "CertReqMsg/certReq", HFILL }},
1041 { "pop", "crmf.pop",
1042 FT_UINT32, BASE_DEC, VALS(crmf_ProofOfPossession_vals), 0,
1043 "CertReqMsg/pop", HFILL }},
1045 { "regInfo", "crmf.regInfo",
1046 FT_UINT32, BASE_DEC, NULL, 0,
1047 "CertReqMsg/regInfo", HFILL }},
1048 { &hf_crmf_regInfo_item,
1049 { "Item", "crmf.regInfo_item",
1050 FT_NONE, BASE_NONE, NULL, 0,
1051 "CertReqMsg/regInfo/_item", HFILL }},
1052 { &hf_crmf_certReqId,
1053 { "certReqId", "crmf.certReqId",
1054 FT_INT32, BASE_DEC, NULL, 0,
1055 "CertRequest/certReqId", HFILL }},
1056 { &hf_crmf_certTemplate,
1057 { "certTemplate", "crmf.certTemplate",
1058 FT_NONE, BASE_NONE, NULL, 0,
1059 "CertRequest/certTemplate", HFILL }},
1060 { &hf_crmf_controls,
1061 { "controls", "crmf.controls",
1062 FT_UINT32, BASE_DEC, NULL, 0,
1063 "CertRequest/controls", HFILL }},
1065 { "version", "crmf.version",
1066 FT_INT32, BASE_DEC, VALS(crmf_Version_vals), 0,
1067 "CertTemplate/version", HFILL }},
1068 { &hf_crmf_serialNumber,
1069 { "serialNumber", "crmf.serialNumber",
1070 FT_INT32, BASE_DEC, NULL, 0,
1072 { &hf_crmf_signingAlg,
1073 { "signingAlg", "crmf.signingAlg",
1074 FT_NONE, BASE_NONE, NULL, 0,
1075 "CertTemplate/signingAlg", HFILL }},
1076 { &hf_crmf_template_issuer,
1077 { "issuer", "crmf.issuer",
1078 FT_UINT32, BASE_DEC, NULL, 0,
1079 "CertTemplate/issuer", HFILL }},
1080 { &hf_crmf_validity,
1081 { "validity", "crmf.validity",
1082 FT_NONE, BASE_NONE, NULL, 0,
1083 "CertTemplate/validity", HFILL }},
1085 { "subject", "crmf.subject",
1086 FT_UINT32, BASE_DEC, NULL, 0,
1087 "CertTemplate/subject", HFILL }},
1088 { &hf_crmf_publicKey,
1089 { "publicKey", "crmf.publicKey",
1090 FT_NONE, BASE_NONE, NULL, 0,
1092 { &hf_crmf_issuerUID,
1093 { "issuerUID", "crmf.issuerUID",
1094 FT_BYTES, BASE_HEX, NULL, 0,
1095 "CertTemplate/issuerUID", HFILL }},
1096 { &hf_crmf_subjectUID,
1097 { "subjectUID", "crmf.subjectUID",
1098 FT_BYTES, BASE_HEX, NULL, 0,
1099 "CertTemplate/subjectUID", HFILL }},
1100 { &hf_crmf_extensions,
1101 { "extensions", "crmf.extensions",
1102 FT_UINT32, BASE_DEC, NULL, 0,
1103 "CertTemplate/extensions", HFILL }},
1104 { &hf_crmf_notBefore,
1105 { "notBefore", "crmf.notBefore",
1106 FT_UINT32, BASE_DEC, VALS(crmf_Time_vals), 0,
1107 "OptionalValidity/notBefore", HFILL }},
1108 { &hf_crmf_notAfter,
1109 { "notAfter", "crmf.notAfter",
1110 FT_UINT32, BASE_DEC, VALS(crmf_Time_vals), 0,
1111 "OptionalValidity/notAfter", HFILL }},
1112 { &hf_crmf_Controls_item,
1113 { "Item", "crmf.Controls_item",
1114 FT_NONE, BASE_NONE, NULL, 0,
1115 "Controls/_item", HFILL }},
1117 { "type", "crmf.type",
1118 FT_OID, BASE_NONE, NULL, 0,
1119 "AttributeTypeAndValue/type", HFILL }},
1121 { "value", "crmf.value",
1122 FT_NONE, BASE_NONE, NULL, 0,
1123 "AttributeTypeAndValue/value", HFILL }},
1124 { &hf_crmf_raVerified,
1125 { "raVerified", "crmf.raVerified",
1126 FT_NONE, BASE_NONE, NULL, 0,
1127 "ProofOfPossession/raVerified", HFILL }},
1128 { &hf_crmf_signature,
1129 { "signature", "crmf.signature",
1130 FT_NONE, BASE_NONE, NULL, 0,
1131 "ProofOfPossession/signature", HFILL }},
1132 { &hf_crmf_keyEncipherment,
1133 { "keyEncipherment", "crmf.keyEncipherment",
1134 FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1135 "ProofOfPossession/keyEncipherment", HFILL }},
1136 { &hf_crmf_keyAgreement,
1137 { "keyAgreement", "crmf.keyAgreement",
1138 FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1139 "ProofOfPossession/keyAgreement", HFILL }},
1140 { &hf_crmf_poposkInput,
1141 { "poposkInput", "crmf.poposkInput",
1142 FT_NONE, BASE_NONE, NULL, 0,
1143 "POPOSigningKey/poposkInput", HFILL }},
1144 { &hf_crmf_algorithmIdentifier,
1145 { "algorithmIdentifier", "crmf.algorithmIdentifier",
1146 FT_NONE, BASE_NONE, NULL, 0,
1147 "POPOSigningKey/algorithmIdentifier", HFILL }},
1148 { &hf_crmf_sk_signature,
1149 { "signature", "crmf.signature",
1150 FT_BYTES, BASE_HEX, NULL, 0,
1151 "POPOSigningKey/signature", HFILL }},
1152 { &hf_crmf_authInfo,
1153 { "authInfo", "crmf.authInfo",
1154 FT_UINT32, BASE_DEC, VALS(crmf_T_authInfo_vals), 0,
1155 "POPOSigningKeyInput/authInfo", HFILL }},
1157 { "sender", "crmf.sender",
1158 FT_UINT32, BASE_DEC, NULL, 0,
1159 "POPOSigningKeyInput/authInfo/sender", HFILL }},
1160 { &hf_crmf_publicKeyMAC,
1161 { "publicKeyMAC", "crmf.publicKeyMAC",
1162 FT_NONE, BASE_NONE, NULL, 0,
1163 "POPOSigningKeyInput/authInfo/publicKeyMAC", HFILL }},
1165 { "algId", "crmf.algId",
1166 FT_NONE, BASE_NONE, NULL, 0,
1167 "PKMACValue/algId", HFILL }},
1168 { &hf_crmf_pkmac_value,
1169 { "value", "crmf.value",
1170 FT_BYTES, BASE_HEX, NULL, 0,
1171 "PKMACValue/value", HFILL }},
1173 { "salt", "crmf.salt",
1174 FT_BYTES, BASE_HEX, NULL, 0,
1175 "PBMParameter/salt", HFILL }},
1177 { "owf", "crmf.owf",
1178 FT_NONE, BASE_NONE, NULL, 0,
1179 "PBMParameter/owf", HFILL }},
1180 { &hf_crmf_iterationCount,
1181 { "iterationCount", "crmf.iterationCount",
1182 FT_INT32, BASE_DEC, NULL, 0,
1183 "PBMParameter/iterationCount", HFILL }},
1185 { "mac", "crmf.mac",
1186 FT_NONE, BASE_NONE, NULL, 0,
1187 "PBMParameter/mac", HFILL }},
1188 { &hf_crmf_thisMessage,
1189 { "thisMessage", "crmf.thisMessage",
1190 FT_BYTES, BASE_HEX, NULL, 0,
1191 "POPOPrivKey/thisMessage", HFILL }},
1192 { &hf_crmf_subsequentMessage,
1193 { "subsequentMessage", "crmf.subsequentMessage",
1194 FT_INT32, BASE_DEC, VALS(crmf_SubsequentMessage_vals), 0,
1195 "POPOPrivKey/subsequentMessage", HFILL }},
1197 { "dhMAC", "crmf.dhMAC",
1198 FT_BYTES, BASE_HEX, NULL, 0,
1199 "POPOPrivKey/dhMAC", HFILL }},
1201 { "action", "crmf.action",
1202 FT_INT32, BASE_DEC, VALS(crmf_T_action_vals), 0,
1203 "PKIPublicationInfo/action", HFILL }},
1204 { &hf_crmf_pubInfos,
1205 { "pubInfos", "crmf.pubInfos",
1206 FT_UINT32, BASE_DEC, NULL, 0,
1207 "PKIPublicationInfo/pubInfos", HFILL }},
1208 { &hf_crmf_pubInfos_item,
1209 { "Item", "crmf.pubInfos_item",
1210 FT_NONE, BASE_NONE, NULL, 0,
1211 "PKIPublicationInfo/pubInfos/_item", HFILL }},
1212 { &hf_crmf_pubMethod,
1213 { "pubMethod", "crmf.pubMethod",
1214 FT_INT32, BASE_DEC, VALS(crmf_T_pubMethod_vals), 0,
1215 "SinglePubInfo/pubMethod", HFILL }},
1216 { &hf_crmf_pubLocation,
1217 { "pubLocation", "crmf.pubLocation",
1218 FT_UINT32, BASE_DEC, NULL, 0,
1219 "SinglePubInfo/pubLocation", HFILL }},
1220 { &hf_crmf_encryptedPrivKey,
1221 { "encryptedPrivKey", "crmf.encryptedPrivKey",
1222 FT_UINT32, BASE_DEC, VALS(crmf_EncryptedKey_vals), 0,
1223 "PKIArchiveOptions/encryptedPrivKey", HFILL }},
1224 { &hf_crmf_keyGenParameters,
1225 { "keyGenParameters", "crmf.keyGenParameters",
1226 FT_BYTES, BASE_HEX, NULL, 0,
1227 "PKIArchiveOptions/keyGenParameters", HFILL }},
1228 { &hf_crmf_archiveRemGenPrivKey,
1229 { "archiveRemGenPrivKey", "crmf.archiveRemGenPrivKey",
1230 FT_BOOLEAN, 8, NULL, 0,
1231 "PKIArchiveOptions/archiveRemGenPrivKey", HFILL }},
1232 { &hf_crmf_encryptedValue,
1233 { "encryptedValue", "crmf.encryptedValue",
1234 FT_NONE, BASE_NONE, NULL, 0,
1235 "EncryptedKey/encryptedValue", HFILL }},
1236 { &hf_crmf_envelopedData,
1237 { "envelopedData", "crmf.envelopedData",
1238 FT_NONE, BASE_NONE, NULL, 0,
1239 "EncryptedKey/envelopedData", HFILL }},
1240 { &hf_crmf_intendedAlg,
1241 { "intendedAlg", "crmf.intendedAlg",
1242 FT_NONE, BASE_NONE, NULL, 0,
1243 "EncryptedValue/intendedAlg", HFILL }},
1245 { "symmAlg", "crmf.symmAlg",
1246 FT_NONE, BASE_NONE, NULL, 0,
1247 "EncryptedValue/symmAlg", HFILL }},
1248 { &hf_crmf_encSymmKey,
1249 { "encSymmKey", "crmf.encSymmKey",
1250 FT_BYTES, BASE_HEX, NULL, 0,
1251 "EncryptedValue/encSymmKey", HFILL }},
1253 { "keyAlg", "crmf.keyAlg",
1254 FT_NONE, BASE_NONE, NULL, 0,
1255 "EncryptedValue/keyAlg", HFILL }},
1256 { &hf_crmf_valueHint,
1257 { "valueHint", "crmf.valueHint",
1258 FT_BYTES, BASE_HEX, NULL, 0,
1259 "EncryptedValue/valueHint", HFILL }},
1260 { &hf_crmf_encValue,
1261 { "encValue", "crmf.encValue",
1262 FT_BYTES, BASE_HEX, NULL, 0,
1263 "EncryptedValue/encValue", HFILL }},
1265 { "issuer", "crmf.issuer",
1266 FT_UINT32, BASE_DEC, NULL, 0,
1267 "CertId/issuer", HFILL }},
1269 /*--- End of included file: packet-crmf-hfarr.c ---*/
1270 #line 70 "packet-crmf-template.c"
1273 /* List of subtrees */
1274 static gint *ett[] = {
1276 /*--- Included file: packet-crmf-ettarr.c ---*/
1277 #line 1 "packet-crmf-ettarr.c"
1279 &ett_crmf_CertReqMessages,
1280 &ett_crmf_CertReqMsg,
1281 &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue,
1282 &ett_crmf_CertRequest,
1283 &ett_crmf_CertTemplate,
1284 &ett_crmf_OptionalValidity,
1286 &ett_crmf_AttributeTypeAndValue,
1287 &ett_crmf_ProofOfPossession,
1288 &ett_crmf_POPOSigningKey,
1289 &ett_crmf_POPOSigningKeyInput,
1290 &ett_crmf_T_authInfo,
1291 &ett_crmf_PKMACValue,
1292 &ett_crmf_PBMParameter,
1293 &ett_crmf_POPOPrivKey,
1294 &ett_crmf_PKIPublicationInfo,
1295 &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo,
1296 &ett_crmf_SinglePubInfo,
1297 &ett_crmf_PKIArchiveOptions,
1298 &ett_crmf_EncryptedKey,
1299 &ett_crmf_EncryptedValue,
1302 /*--- End of included file: packet-crmf-ettarr.c ---*/
1303 #line 75 "packet-crmf-template.c"
1306 /* Register protocol */
1307 proto_crmf = proto_register_protocol(PNAME, PSNAME, PFNAME);
1309 /* Register fields and subtrees */
1310 proto_register_field_array(proto_crmf, hf, array_length(hf));
1311 proto_register_subtree_array(ett, array_length(ett));
1316 /*--- proto_reg_handoff_crmf -------------------------------------------*/
1317 void proto_reg_handoff_crmf(void) {
1319 /*--- Included file: packet-crmf-dis-tab.c ---*/
1320 #line 1 "packet-crmf-dis-tab.c"
1321 register_ber_oid_dissector("1.2.840.113533.7.66.13", dissect_PBMParameter_PDU, proto_crmf, "PasswordBasedMac");
1324 /*--- End of included file: packet-crmf-dis-tab.c ---*/
1325 #line 90 "packet-crmf-template.c"