Coverage Report

Created: 2026-06-30 07:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-crmf.c
Line
Count
Source
1
/* Do not modify this file. Changes will be overwritten.                      */
2
/* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
3
/* packet-crmf.c                                                              */
4
/* asn2wrs.py -b -q -L -p crmf -c ./crmf.cnf -s ./packet-crmf-template -D . -O ../.. CRMF.asn */
5
6
/* packet-crmf.c
7
 * Routines for RFC2511 Certificate Request Message Format packet dissection
8
 *   Ronnie Sahlberg 2004
9
 *
10
 * Wireshark - Network traffic analyzer
11
 * By Gerald Combs <gerald@wireshark.org>
12
 * Copyright 1998 Gerald Combs
13
 *
14
 * SPDX-License-Identifier: GPL-2.0-or-later
15
 */
16
17
#include "config.h"
18
19
#include <epan/packet.h>
20
#include <epan/oids.h>
21
#include <epan/asn1.h>
22
#include <wsutil/array.h>
23
24
#include "packet-ber.h"
25
#include "packet-crmf.h"
26
#include "packet-cms.h"
27
#include "packet-pkix1explicit.h"
28
#include "packet-pkix1implicit.h"
29
30
void proto_register_crmf(void);
31
void proto_reg_handoff_crmf(void);
32
33
/* Initialize the protocol and registered fields */
34
static int proto_crmf;
35
static int hf_crmf_type_oid;
36
static int hf_crmf_PBMParameter_PDU;              /* PBMParameter */
37
static int hf_crmf_RegToken_PDU;                  /* RegToken */
38
static int hf_crmf_Authenticator_PDU;             /* Authenticator */
39
static int hf_crmf_PKIPublicationInfo_PDU;        /* PKIPublicationInfo */
40
static int hf_crmf_PKIArchiveOptions_PDU;         /* PKIArchiveOptions */
41
static int hf_crmf_OldCertId_PDU;                 /* OldCertId */
42
static int hf_crmf_ProtocolEncrKey_PDU;           /* ProtocolEncrKey */
43
static int hf_crmf_UTF8Pairs_PDU;                 /* UTF8Pairs */
44
static int hf_crmf_CertReq_PDU;                   /* CertReq */
45
static int hf_crmf_EncKeyWithID_PDU;              /* EncKeyWithID */
46
static int hf_crmf_CertReqMessages_item;          /* CertReqMsg */
47
static int hf_crmf_certReq;                       /* CertRequest */
48
static int hf_crmf_popo;                          /* ProofOfPossession */
49
static int hf_crmf_regInfo;                       /* SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue */
50
static int hf_crmf_regInfo_item;                  /* AttributeTypeAndValue */
51
static int hf_crmf_certReqId;                     /* INTEGER */
52
static int hf_crmf_certTemplate;                  /* CertTemplate */
53
static int hf_crmf_controls;                      /* Controls */
54
static int hf_crmf_version;                       /* Version */
55
static int hf_crmf_serialNumber;                  /* INTEGER_MIN_MAX */
56
static int hf_crmf_signingAlg;                    /* AlgorithmIdentifier */
57
static int hf_crmf_template_issuer;               /* Name */
58
static int hf_crmf_validity;                      /* OptionalValidity */
59
static int hf_crmf_subject;                       /* Name */
60
static int hf_crmf_publicKey;                     /* SubjectPublicKeyInfo */
61
static int hf_crmf_issuerUID;                     /* UniqueIdentifier */
62
static int hf_crmf_subjectUID;                    /* UniqueIdentifier */
63
static int hf_crmf_extensions;                    /* Extensions */
64
static int hf_crmf_notBefore;                     /* Time */
65
static int hf_crmf_notAfter;                      /* Time */
66
static int hf_crmf_Controls_item;                 /* AttributeTypeAndValue */
67
static int hf_crmf_type;                          /* T_type */
68
static int hf_crmf_value;                         /* T_value */
69
static int hf_crmf_raVerified;                    /* NULL */
70
static int hf_crmf_signature;                     /* POPOSigningKey */
71
static int hf_crmf_keyEncipherment;               /* POPOPrivKey */
72
static int hf_crmf_keyAgreement;                  /* POPOPrivKey */
73
static int hf_crmf_poposkInput;                   /* POPOSigningKeyInput */
74
static int hf_crmf_algorithmIdentifier;           /* AlgorithmIdentifier */
75
static int hf_crmf_sk_signature;                  /* BIT_STRING */
76
static int hf_crmf_authInfo;                      /* T_authInfo */
77
static int hf_crmf_sender;                        /* GeneralName */
78
static int hf_crmf_publicKeyMAC;                  /* PKMACValue */
79
static int hf_crmf_algId;                         /* AlgorithmIdentifier */
80
static int hf_crmf_pkmac_value;                   /* BIT_STRING */
81
static int hf_crmf_salt;                          /* OCTET_STRING */
82
static int hf_crmf_owf;                           /* AlgorithmIdentifier */
83
static int hf_crmf_iterationCount;                /* INTEGER */
84
static int hf_crmf_mac;                           /* AlgorithmIdentifier */
85
static int hf_crmf_thisMessage;                   /* BIT_STRING */
86
static int hf_crmf_subsequentMessage;             /* SubsequentMessage */
87
static int hf_crmf_dhMAC;                         /* BIT_STRING */
88
static int hf_crmf_agreeMAC;                      /* PKMACValue */
89
static int hf_crmf_encryptedKey;                  /* EnvelopedData */
90
static int hf_crmf_action;                        /* T_action */
91
static int hf_crmf_pubInfos;                      /* SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo */
92
static int hf_crmf_pubInfos_item;                 /* SinglePubInfo */
93
static int hf_crmf_pubMethod;                     /* T_pubMethod */
94
static int hf_crmf_pubLocation;                   /* GeneralName */
95
static int hf_crmf_encryptedPrivKey;              /* EncryptedKey */
96
static int hf_crmf_keyGenParameters;              /* KeyGenParameters */
97
static int hf_crmf_archiveRemGenPrivKey;          /* BOOLEAN */
98
static int hf_crmf_encryptedValue;                /* EncryptedValue */
99
static int hf_crmf_envelopedData;                 /* EnvelopedData */
100
static int hf_crmf_intendedAlg;                   /* AlgorithmIdentifier */
101
static int hf_crmf_symmAlg;                       /* AlgorithmIdentifier */
102
static int hf_crmf_encSymmKey;                    /* BIT_STRING */
103
static int hf_crmf_keyAlg;                        /* AlgorithmIdentifier */
104
static int hf_crmf_valueHint;                     /* OCTET_STRING */
105
static int hf_crmf_encValue;                      /* BIT_STRING */
106
static int hf_crmf_issuer;                        /* GeneralName */
107
static int hf_crmf_enckeywid_privkey;             /* PrivateKeyInfo */
108
static int hf_crmf_identifier;                    /* T_identifier */
109
static int hf_crmf_string;                        /* UTF8String */
110
static int hf_crmf_generalName;                   /* GeneralName */
111
static int hf_crmf_privkey_version;               /* INTEGER */
112
static int hf_crmf_privateKeyAlgorithm;           /* AlgorithmIdentifier */
113
static int hf_crmf_privateKey;                    /* OCTET_STRING */
114
static int hf_crmf_attributes;                    /* Attributes */
115
static int hf_crmf_Attributes_item;               /* Attribute */
116
117
/* Initialize the subtree pointers */
118
static int ett_crmf_CertReqMessages;
119
static int ett_crmf_CertReqMsg;
120
static int ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue;
121
static int ett_crmf_CertRequest;
122
static int ett_crmf_CertTemplate;
123
static int ett_crmf_OptionalValidity;
124
static int ett_crmf_Controls;
125
static int ett_crmf_AttributeTypeAndValue;
126
static int ett_crmf_ProofOfPossession;
127
static int ett_crmf_POPOSigningKey;
128
static int ett_crmf_POPOSigningKeyInput;
129
static int ett_crmf_T_authInfo;
130
static int ett_crmf_PKMACValue;
131
static int ett_crmf_PBMParameter;
132
static int ett_crmf_POPOPrivKey;
133
static int ett_crmf_PKIPublicationInfo;
134
static int ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo;
135
static int ett_crmf_SinglePubInfo;
136
static int ett_crmf_PKIArchiveOptions;
137
static int ett_crmf_EncryptedKey;
138
static int ett_crmf_EncryptedValue;
139
static int ett_crmf_CertId;
140
static int ett_crmf_EncKeyWithID;
141
static int ett_crmf_T_identifier;
142
static int ett_crmf_PrivateKeyInfo;
143
static int ett_crmf_Attributes;
144
145
146
static unsigned
147
0
dissect_crmf_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
148
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
149
0
                                                NULL);
150
151
0
  return offset;
152
0
}
153
154
155
156
static unsigned
157
0
dissect_crmf_INTEGER_MIN_MAX(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
158
0
  offset = dissect_ber_constrained_integer64(implicit_tag, actx, tree, tvb, offset,
159
0
                                                            NO_BOUND, NO_BOUND, hf_index, NULL);
160
161
0
  return offset;
162
0
}
163
164
165
static const ber_sequence_t OptionalValidity_sequence[] = {
166
  { &hf_crmf_notBefore      , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Time },
167
  { &hf_crmf_notAfter       , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Time },
168
  { NULL, 0, 0, 0, NULL }
169
};
170
171
static unsigned
172
0
dissect_crmf_OptionalValidity(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
173
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
174
0
                                   OptionalValidity_sequence, hf_index, ett_crmf_OptionalValidity);
175
176
0
  return offset;
177
0
}
178
179
180
static const ber_sequence_t CertTemplate_sequence[] = {
181
  { &hf_crmf_version        , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Version },
182
  { &hf_crmf_serialNumber   , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_INTEGER_MIN_MAX },
183
  { &hf_crmf_signingAlg     , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier },
184
  { &hf_crmf_template_issuer, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Name },
185
  { &hf_crmf_validity       , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_OptionalValidity },
186
  { &hf_crmf_subject        , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Name },
187
  { &hf_crmf_publicKey      , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_SubjectPublicKeyInfo },
188
  { &hf_crmf_issuerUID      , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_UniqueIdentifier },
189
  { &hf_crmf_subjectUID     , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_UniqueIdentifier },
190
  { &hf_crmf_extensions     , BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
191
  { NULL, 0, 0, 0, NULL }
192
};
193
194
unsigned
195
0
dissect_crmf_CertTemplate(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
196
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
197
0
                                   CertTemplate_sequence, hf_index, ett_crmf_CertTemplate);
198
199
0
  return offset;
200
0
}
201
202
203
204
static unsigned
205
0
dissect_crmf_T_type(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
206
0
  offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_crmf_type_oid, &actx->external.direct_reference);
207
208
0
  return offset;
209
0
}
210
211
212
213
static unsigned
214
0
dissect_crmf_T_value(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
215
0
  offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
216
217
218
0
  return offset;
219
0
}
220
221
222
static const ber_sequence_t AttributeTypeAndValue_sequence[] = {
223
  { &hf_crmf_type           , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_crmf_T_type },
224
  { &hf_crmf_value          , BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_crmf_T_value },
225
  { NULL, 0, 0, 0, NULL }
226
};
227
228
unsigned
229
0
dissect_crmf_AttributeTypeAndValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
230
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
231
0
                                   AttributeTypeAndValue_sequence, hf_index, ett_crmf_AttributeTypeAndValue);
232
233
0
  return offset;
234
0
}
235
236
237
static const ber_sequence_t Controls_sequence_of[1] = {
238
  { &hf_crmf_Controls_item  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_AttributeTypeAndValue },
239
};
240
241
static unsigned
242
0
dissect_crmf_Controls(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
243
0
  offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
244
0
                                                  1, NO_BOUND, Controls_sequence_of, hf_index, ett_crmf_Controls);
245
246
0
  return offset;
247
0
}
248
249
250
static const ber_sequence_t CertRequest_sequence[] = {
251
  { &hf_crmf_certReqId      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER },
252
  { &hf_crmf_certTemplate   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertTemplate },
253
  { &hf_crmf_controls       , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_Controls },
254
  { NULL, 0, 0, 0, NULL }
255
};
256
257
static unsigned
258
0
dissect_crmf_CertRequest(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
259
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
260
0
                                   CertRequest_sequence, hf_index, ett_crmf_CertRequest);
261
262
0
  return offset;
263
0
}
264
265
266
267
static unsigned
268
0
dissect_crmf_NULL(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
269
0
  offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
270
271
0
  return offset;
272
0
}
273
274
275
276
static unsigned
277
0
dissect_crmf_BIT_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
278
0
  offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
279
0
                                    NULL, 0, hf_index, -1,
280
0
                                    NULL);
281
282
0
  return offset;
283
0
}
284
285
286
static const ber_sequence_t PKMACValue_sequence[] = {
287
  { &hf_crmf_algId          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
288
  { &hf_crmf_pkmac_value    , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING },
289
  { NULL, 0, 0, 0, NULL }
290
};
291
292
static unsigned
293
0
dissect_crmf_PKMACValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
294
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
295
0
                                   PKMACValue_sequence, hf_index, ett_crmf_PKMACValue);
296
297
0
  return offset;
298
0
}
299
300
301
static const value_string crmf_T_authInfo_vals[] = {
302
  {   0, "sender" },
303
  {   1, "publicKeyMAC" },
304
  { 0, NULL }
305
};
306
307
static const ber_choice_t T_authInfo_choice[] = {
308
  {   0, &hf_crmf_sender         , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName },
309
  {   1, &hf_crmf_publicKeyMAC   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_PKMACValue },
310
  { 0, NULL, 0, 0, 0, NULL }
311
};
312
313
static unsigned
314
0
dissect_crmf_T_authInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
315
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
316
0
                                 T_authInfo_choice, hf_index, ett_crmf_T_authInfo,
317
0
                                 NULL);
318
319
0
  return offset;
320
0
}
321
322
323
static const ber_sequence_t POPOSigningKeyInput_sequence[] = {
324
  { &hf_crmf_authInfo       , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_T_authInfo },
325
  { &hf_crmf_publicKey      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_SubjectPublicKeyInfo },
326
  { NULL, 0, 0, 0, NULL }
327
};
328
329
static unsigned
330
0
dissect_crmf_POPOSigningKeyInput(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
331
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
332
0
                                   POPOSigningKeyInput_sequence, hf_index, ett_crmf_POPOSigningKeyInput);
333
334
0
  return offset;
335
0
}
336
337
338
static const ber_sequence_t POPOSigningKey_sequence[] = {
339
  { &hf_crmf_poposkInput    , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_POPOSigningKeyInput },
340
  { &hf_crmf_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
341
  { &hf_crmf_sk_signature   , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING },
342
  { NULL, 0, 0, 0, NULL }
343
};
344
345
static unsigned
346
0
dissect_crmf_POPOSigningKey(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
347
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
348
0
                                   POPOSigningKey_sequence, hf_index, ett_crmf_POPOSigningKey);
349
350
0
  return offset;
351
0
}
352
353
354
static const value_string crmf_SubsequentMessage_vals[] = {
355
  {   0, "encrCert" },
356
  {   1, "challengeResp" },
357
  { 0, NULL }
358
};
359
360
361
static unsigned
362
0
dissect_crmf_SubsequentMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
363
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
364
0
                                                NULL);
365
366
0
  return offset;
367
0
}
368
369
370
static const value_string crmf_POPOPrivKey_vals[] = {
371
  {   0, "thisMessage" },
372
  {   1, "subsequentMessage" },
373
  {   2, "dhMAC" },
374
  {   3, "agreeMAC" },
375
  {   4, "encryptedKey" },
376
  { 0, NULL }
377
};
378
379
static const ber_choice_t POPOPrivKey_choice[] = {
380
  {   0, &hf_crmf_thisMessage    , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING },
381
  {   1, &hf_crmf_subsequentMessage, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_SubsequentMessage },
382
  {   2, &hf_crmf_dhMAC          , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING },
383
  {   3, &hf_crmf_agreeMAC       , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_crmf_PKMACValue },
384
  {   4, &hf_crmf_encryptedKey   , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_cms_EnvelopedData },
385
  { 0, NULL, 0, 0, 0, NULL }
386
};
387
388
static unsigned
389
0
dissect_crmf_POPOPrivKey(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
390
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
391
0
                                 POPOPrivKey_choice, hf_index, ett_crmf_POPOPrivKey,
392
0
                                 NULL);
393
394
0
  return offset;
395
0
}
396
397
398
static const value_string crmf_ProofOfPossession_vals[] = {
399
  {   0, "raVerified" },
400
  {   1, "signature" },
401
  {   2, "keyEncipherment" },
402
  {   3, "keyAgreement" },
403
  { 0, NULL }
404
};
405
406
static const ber_choice_t ProofOfPossession_choice[] = {
407
  {   0, &hf_crmf_raVerified     , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_NULL },
408
  {   1, &hf_crmf_signature      , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_POPOSigningKey },
409
  {   2, &hf_crmf_keyEncipherment, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_POPOPrivKey },
410
  {   3, &hf_crmf_keyAgreement   , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_crmf_POPOPrivKey },
411
  { 0, NULL, 0, 0, 0, NULL }
412
};
413
414
static unsigned
415
0
dissect_crmf_ProofOfPossession(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
416
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
417
0
                                 ProofOfPossession_choice, hf_index, ett_crmf_ProofOfPossession,
418
0
                                 NULL);
419
420
0
  return offset;
421
0
}
422
423
424
static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of[1] = {
425
  { &hf_crmf_regInfo_item   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_AttributeTypeAndValue },
426
};
427
428
static unsigned
429
0
dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
430
0
  offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
431
0
                                                  1, NO_BOUND, SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue);
432
433
0
  return offset;
434
0
}
435
436
437
static const ber_sequence_t CertReqMsg_sequence[] = {
438
  { &hf_crmf_certReq        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertRequest },
439
  { &hf_crmf_popo           , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_ProofOfPossession },
440
  { &hf_crmf_regInfo        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue },
441
  { NULL, 0, 0, 0, NULL }
442
};
443
444
static unsigned
445
0
dissect_crmf_CertReqMsg(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
446
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
447
0
                                   CertReqMsg_sequence, hf_index, ett_crmf_CertReqMsg);
448
449
0
  return offset;
450
0
}
451
452
453
static const ber_sequence_t CertReqMessages_sequence_of[1] = {
454
  { &hf_crmf_CertReqMessages_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertReqMsg },
455
};
456
457
unsigned
458
0
dissect_crmf_CertReqMessages(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
459
0
  offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
460
0
                                                  1, NO_BOUND, CertReqMessages_sequence_of, hf_index, ett_crmf_CertReqMessages);
461
462
0
  return offset;
463
0
}
464
465
466
467
static unsigned
468
0
dissect_crmf_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
469
0
  offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
470
0
                                       NULL);
471
472
0
  return offset;
473
0
}
474
475
476
static const ber_sequence_t PBMParameter_sequence[] = {
477
  { &hf_crmf_salt           , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_OCTET_STRING },
478
  { &hf_crmf_owf            , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
479
  { &hf_crmf_iterationCount , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER },
480
  { &hf_crmf_mac            , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
481
  { NULL, 0, 0, 0, NULL }
482
};
483
484
static unsigned
485
0
dissect_crmf_PBMParameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
486
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
487
0
                                   PBMParameter_sequence, hf_index, ett_crmf_PBMParameter);
488
489
0
  return offset;
490
0
}
491
492
493
494
static unsigned
495
0
dissect_crmf_RegToken(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
496
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
497
0
                                            actx, tree, tvb, offset, hf_index,
498
0
                                            NULL);
499
500
0
  return offset;
501
0
}
502
503
504
505
static unsigned
506
0
dissect_crmf_Authenticator(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
507
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
508
0
                                            actx, tree, tvb, offset, hf_index,
509
0
                                            NULL);
510
511
0
  return offset;
512
0
}
513
514
515
static const value_string crmf_T_action_vals[] = {
516
  {   0, "dontPublish" },
517
  {   1, "pleasePublish" },
518
  { 0, NULL }
519
};
520
521
522
static unsigned
523
0
dissect_crmf_T_action(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
524
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
525
0
                                                NULL);
526
527
0
  return offset;
528
0
}
529
530
531
static const value_string crmf_T_pubMethod_vals[] = {
532
  {   0, "dontCare" },
533
  {   1, "x500" },
534
  {   2, "web" },
535
  {   3, "ldap" },
536
  { 0, NULL }
537
};
538
539
540
static unsigned
541
0
dissect_crmf_T_pubMethod(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
542
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
543
0
                                                NULL);
544
545
0
  return offset;
546
0
}
547
548
549
static const ber_sequence_t SinglePubInfo_sequence[] = {
550
  { &hf_crmf_pubMethod      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_T_pubMethod },
551
  { &hf_crmf_pubLocation    , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
552
  { NULL, 0, 0, 0, NULL }
553
};
554
555
static unsigned
556
0
dissect_crmf_SinglePubInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
557
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
558
0
                                   SinglePubInfo_sequence, hf_index, ett_crmf_SinglePubInfo);
559
560
0
  return offset;
561
0
}
562
563
564
static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of[1] = {
565
  { &hf_crmf_pubInfos_item  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_SinglePubInfo },
566
};
567
568
static unsigned
569
0
dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
570
0
  offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
571
0
                                                  1, NO_BOUND, SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo);
572
573
0
  return offset;
574
0
}
575
576
577
static const ber_sequence_t PKIPublicationInfo_sequence[] = {
578
  { &hf_crmf_action         , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_T_action },
579
  { &hf_crmf_pubInfos       , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo },
580
  { NULL, 0, 0, 0, NULL }
581
};
582
583
unsigned
584
0
dissect_crmf_PKIPublicationInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
585
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
586
0
                                   PKIPublicationInfo_sequence, hf_index, ett_crmf_PKIPublicationInfo);
587
588
0
  return offset;
589
0
}
590
591
592
static const ber_sequence_t EncryptedValue_sequence[] = {
593
  { &hf_crmf_intendedAlg    , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier },
594
  { &hf_crmf_symmAlg        , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier },
595
  { &hf_crmf_encSymmKey     , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING },
596
  { &hf_crmf_keyAlg         , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier },
597
  { &hf_crmf_valueHint      , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_OCTET_STRING },
598
  { &hf_crmf_encValue       , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING },
599
  { NULL, 0, 0, 0, NULL }
600
};
601
602
unsigned
603
0
dissect_crmf_EncryptedValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
604
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
605
0
                                   EncryptedValue_sequence, hf_index, ett_crmf_EncryptedValue);
606
607
0
  return offset;
608
0
}
609
610
611
static const value_string crmf_EncryptedKey_vals[] = {
612
  {   0, "encryptedValue" },
613
  {   1, "envelopedData" },
614
  { 0, NULL }
615
};
616
617
static const ber_choice_t EncryptedKey_choice[] = {
618
  {   0, &hf_crmf_encryptedValue , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_EncryptedValue },
619
  {   1, &hf_crmf_envelopedData  , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_cms_EnvelopedData },
620
  { 0, NULL, 0, 0, 0, NULL }
621
};
622
623
static unsigned
624
0
dissect_crmf_EncryptedKey(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
625
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
626
0
                                 EncryptedKey_choice, hf_index, ett_crmf_EncryptedKey,
627
0
                                 NULL);
628
629
0
  return offset;
630
0
}
631
632
633
634
static unsigned
635
0
dissect_crmf_KeyGenParameters(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
636
0
  offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
637
0
                                       NULL);
638
639
0
  return offset;
640
0
}
641
642
643
644
static unsigned
645
0
dissect_crmf_BOOLEAN(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
646
0
  offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
647
648
0
  return offset;
649
0
}
650
651
652
static const value_string crmf_PKIArchiveOptions_vals[] = {
653
  {   0, "encryptedPrivKey" },
654
  {   1, "keyGenParameters" },
655
  {   2, "archiveRemGenPrivKey" },
656
  { 0, NULL }
657
};
658
659
static const ber_choice_t PKIArchiveOptions_choice[] = {
660
  {   0, &hf_crmf_encryptedPrivKey, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_EncryptedKey },
661
  {   1, &hf_crmf_keyGenParameters, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_KeyGenParameters },
662
  {   2, &hf_crmf_archiveRemGenPrivKey, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_BOOLEAN },
663
  { 0, NULL, 0, 0, 0, NULL }
664
};
665
666
static unsigned
667
0
dissect_crmf_PKIArchiveOptions(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
668
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
669
0
                                 PKIArchiveOptions_choice, hf_index, ett_crmf_PKIArchiveOptions,
670
0
                                 NULL);
671
672
0
  return offset;
673
0
}
674
675
676
static const ber_sequence_t CertId_sequence[] = {
677
  { &hf_crmf_issuer         , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
678
  { &hf_crmf_serialNumber   , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER_MIN_MAX },
679
  { NULL, 0, 0, 0, NULL }
680
};
681
682
unsigned
683
0
dissect_crmf_CertId(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
684
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
685
0
                                   CertId_sequence, hf_index, ett_crmf_CertId);
686
687
0
  return offset;
688
0
}
689
690
691
692
static unsigned
693
0
dissect_crmf_OldCertId(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
694
0
  offset = dissect_crmf_CertId(implicit_tag, tvb, offset, actx, tree, hf_index);
695
696
0
  return offset;
697
0
}
698
699
700
701
static unsigned
702
0
dissect_crmf_ProtocolEncrKey(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
703
0
  offset = dissect_pkix1explicit_SubjectPublicKeyInfo(implicit_tag, tvb, offset, actx, tree, hf_index);
704
705
0
  return offset;
706
0
}
707
708
709
710
static unsigned
711
0
dissect_crmf_UTF8Pairs(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
712
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
713
0
                                            actx, tree, tvb, offset, hf_index,
714
0
                                            NULL);
715
716
0
  return offset;
717
0
}
718
719
720
721
static unsigned
722
0
dissect_crmf_CertReq(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
723
0
  offset = dissect_crmf_CertRequest(implicit_tag, tvb, offset, actx, tree, hf_index);
724
725
0
  return offset;
726
0
}
727
728
729
static const ber_sequence_t Attributes_set_of[1] = {
730
  { &hf_crmf_Attributes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Attribute },
731
};
732
733
static unsigned
734
0
dissect_crmf_Attributes(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
735
0
  offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
736
0
                                 Attributes_set_of, hf_index, ett_crmf_Attributes);
737
738
0
  return offset;
739
0
}
740
741
742
static const ber_sequence_t PrivateKeyInfo_sequence[] = {
743
  { &hf_crmf_privkey_version, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER },
744
  { &hf_crmf_privateKeyAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
745
  { &hf_crmf_privateKey     , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_OCTET_STRING },
746
  { &hf_crmf_attributes     , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_Attributes },
747
  { NULL, 0, 0, 0, NULL }
748
};
749
750
static unsigned
751
0
dissect_crmf_PrivateKeyInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
752
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
753
0
                                   PrivateKeyInfo_sequence, hf_index, ett_crmf_PrivateKeyInfo);
754
755
0
  return offset;
756
0
}
757
758
759
760
static unsigned
761
0
dissect_crmf_UTF8String(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
762
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
763
0
                                            actx, tree, tvb, offset, hf_index,
764
0
                                            NULL);
765
766
0
  return offset;
767
0
}
768
769
770
static const value_string crmf_T_identifier_vals[] = {
771
  {   0, "string" },
772
  {   1, "generalName" },
773
  { 0, NULL }
774
};
775
776
static const ber_choice_t T_identifier_choice[] = {
777
  {   0, &hf_crmf_string         , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_crmf_UTF8String },
778
  {   1, &hf_crmf_generalName    , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName },
779
  { 0, NULL, 0, 0, 0, NULL }
780
};
781
782
static unsigned
783
0
dissect_crmf_T_identifier(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
784
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
785
0
                                 T_identifier_choice, hf_index, ett_crmf_T_identifier,
786
0
                                 NULL);
787
788
0
  return offset;
789
0
}
790
791
792
static const ber_sequence_t EncKeyWithID_sequence[] = {
793
  { &hf_crmf_enckeywid_privkey, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_PrivateKeyInfo },
794
  { &hf_crmf_identifier     , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_T_identifier },
795
  { NULL, 0, 0, 0, NULL }
796
};
797
798
static unsigned
799
0
dissect_crmf_EncKeyWithID(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
800
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
801
0
                                   EncKeyWithID_sequence, hf_index, ett_crmf_EncKeyWithID);
802
803
0
  return offset;
804
0
}
805
806
/*--- PDUs ---*/
807
808
0
static int dissect_PBMParameter_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
809
0
  unsigned offset = 0;
810
0
  asn1_ctx_t asn1_ctx;
811
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
812
0
  offset = dissect_crmf_PBMParameter(false, tvb, offset, &asn1_ctx, tree, hf_crmf_PBMParameter_PDU);
813
0
  return offset;
814
0
}
815
0
static int dissect_RegToken_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
816
0
  unsigned offset = 0;
817
0
  asn1_ctx_t asn1_ctx;
818
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
819
0
  offset = dissect_crmf_RegToken(false, tvb, offset, &asn1_ctx, tree, hf_crmf_RegToken_PDU);
820
0
  return offset;
821
0
}
822
0
static int dissect_Authenticator_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
823
0
  unsigned offset = 0;
824
0
  asn1_ctx_t asn1_ctx;
825
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
826
0
  offset = dissect_crmf_Authenticator(false, tvb, offset, &asn1_ctx, tree, hf_crmf_Authenticator_PDU);
827
0
  return offset;
828
0
}
829
0
static int dissect_PKIPublicationInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
830
0
  unsigned offset = 0;
831
0
  asn1_ctx_t asn1_ctx;
832
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
833
0
  offset = dissect_crmf_PKIPublicationInfo(false, tvb, offset, &asn1_ctx, tree, hf_crmf_PKIPublicationInfo_PDU);
834
0
  return offset;
835
0
}
836
0
static int dissect_PKIArchiveOptions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
837
0
  unsigned offset = 0;
838
0
  asn1_ctx_t asn1_ctx;
839
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
840
0
  offset = dissect_crmf_PKIArchiveOptions(false, tvb, offset, &asn1_ctx, tree, hf_crmf_PKIArchiveOptions_PDU);
841
0
  return offset;
842
0
}
843
0
static int dissect_OldCertId_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
844
0
  unsigned offset = 0;
845
0
  asn1_ctx_t asn1_ctx;
846
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
847
0
  offset = dissect_crmf_OldCertId(false, tvb, offset, &asn1_ctx, tree, hf_crmf_OldCertId_PDU);
848
0
  return offset;
849
0
}
850
0
static int dissect_ProtocolEncrKey_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
851
0
  unsigned offset = 0;
852
0
  asn1_ctx_t asn1_ctx;
853
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
854
0
  offset = dissect_crmf_ProtocolEncrKey(false, tvb, offset, &asn1_ctx, tree, hf_crmf_ProtocolEncrKey_PDU);
855
0
  return offset;
856
0
}
857
0
static int dissect_UTF8Pairs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
858
0
  unsigned offset = 0;
859
0
  asn1_ctx_t asn1_ctx;
860
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
861
0
  offset = dissect_crmf_UTF8Pairs(false, tvb, offset, &asn1_ctx, tree, hf_crmf_UTF8Pairs_PDU);
862
0
  return offset;
863
0
}
864
0
static int dissect_CertReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
865
0
  unsigned offset = 0;
866
0
  asn1_ctx_t asn1_ctx;
867
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
868
0
  offset = dissect_crmf_CertReq(false, tvb, offset, &asn1_ctx, tree, hf_crmf_CertReq_PDU);
869
0
  return offset;
870
0
}
871
0
static int dissect_EncKeyWithID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
872
0
  unsigned offset = 0;
873
0
  asn1_ctx_t asn1_ctx;
874
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
875
0
  offset = dissect_crmf_EncKeyWithID(false, tvb, offset, &asn1_ctx, tree, hf_crmf_EncKeyWithID_PDU);
876
0
  return offset;
877
0
}
878
879
880
881
/*--- proto_register_crmf ----------------------------------------------*/
882
14
void proto_register_crmf(void) {
883
884
  /* List of fields */
885
14
  static hf_register_info hf[] = {
886
14
    { &hf_crmf_type_oid,
887
14
      { "Type", "crmf.type.oid",
888
14
        FT_STRING, BASE_NONE, NULL, 0,
889
14
        "Type of AttributeTypeAndValue", HFILL }},
890
14
    { &hf_crmf_PBMParameter_PDU,
891
14
      { "PBMParameter", "crmf.PBMParameter_element",
892
14
        FT_NONE, BASE_NONE, NULL, 0,
893
14
        NULL, HFILL }},
894
14
    { &hf_crmf_RegToken_PDU,
895
14
      { "RegToken", "crmf.RegToken",
896
14
        FT_STRING, BASE_NONE, NULL, 0,
897
14
        NULL, HFILL }},
898
14
    { &hf_crmf_Authenticator_PDU,
899
14
      { "Authenticator", "crmf.Authenticator",
900
14
        FT_STRING, BASE_NONE, NULL, 0,
901
14
        NULL, HFILL }},
902
14
    { &hf_crmf_PKIPublicationInfo_PDU,
903
14
      { "PKIPublicationInfo", "crmf.PKIPublicationInfo_element",
904
14
        FT_NONE, BASE_NONE, NULL, 0,
905
14
        NULL, HFILL }},
906
14
    { &hf_crmf_PKIArchiveOptions_PDU,
907
14
      { "PKIArchiveOptions", "crmf.PKIArchiveOptions",
908
14
        FT_UINT32, BASE_DEC, VALS(crmf_PKIArchiveOptions_vals), 0,
909
14
        NULL, HFILL }},
910
14
    { &hf_crmf_OldCertId_PDU,
911
14
      { "OldCertId", "crmf.OldCertId_element",
912
14
        FT_NONE, BASE_NONE, NULL, 0,
913
14
        NULL, HFILL }},
914
14
    { &hf_crmf_ProtocolEncrKey_PDU,
915
14
      { "ProtocolEncrKey", "crmf.ProtocolEncrKey_element",
916
14
        FT_NONE, BASE_NONE, NULL, 0,
917
14
        NULL, HFILL }},
918
14
    { &hf_crmf_UTF8Pairs_PDU,
919
14
      { "UTF8Pairs", "crmf.UTF8Pairs",
920
14
        FT_STRING, BASE_NONE, NULL, 0,
921
14
        NULL, HFILL }},
922
14
    { &hf_crmf_CertReq_PDU,
923
14
      { "CertReq", "crmf.CertReq_element",
924
14
        FT_NONE, BASE_NONE, NULL, 0,
925
14
        NULL, HFILL }},
926
14
    { &hf_crmf_EncKeyWithID_PDU,
927
14
      { "EncKeyWithID", "crmf.EncKeyWithID_element",
928
14
        FT_NONE, BASE_NONE, NULL, 0,
929
14
        NULL, HFILL }},
930
14
    { &hf_crmf_CertReqMessages_item,
931
14
      { "CertReqMsg", "crmf.CertReqMsg_element",
932
14
        FT_NONE, BASE_NONE, NULL, 0,
933
14
        NULL, HFILL }},
934
14
    { &hf_crmf_certReq,
935
14
      { "certReq", "crmf.certReq_element",
936
14
        FT_NONE, BASE_NONE, NULL, 0,
937
14
        "CertRequest", HFILL }},
938
14
    { &hf_crmf_popo,
939
14
      { "popo", "crmf.popo",
940
14
        FT_UINT32, BASE_DEC, VALS(crmf_ProofOfPossession_vals), 0,
941
14
        "ProofOfPossession", HFILL }},
942
14
    { &hf_crmf_regInfo,
943
14
      { "regInfo", "crmf.regInfo",
944
14
        FT_UINT32, BASE_DEC, NULL, 0,
945
14
        "SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue", HFILL }},
946
14
    { &hf_crmf_regInfo_item,
947
14
      { "AttributeTypeAndValue", "crmf.AttributeTypeAndValue_element",
948
14
        FT_NONE, BASE_NONE, NULL, 0,
949
14
        NULL, HFILL }},
950
14
    { &hf_crmf_certReqId,
951
14
      { "certReqId", "crmf.certReqId",
952
14
        FT_INT32, BASE_DEC, NULL, 0,
953
14
        "INTEGER", HFILL }},
954
14
    { &hf_crmf_certTemplate,
955
14
      { "certTemplate", "crmf.certTemplate_element",
956
14
        FT_NONE, BASE_NONE, NULL, 0,
957
14
        NULL, HFILL }},
958
14
    { &hf_crmf_controls,
959
14
      { "controls", "crmf.controls",
960
14
        FT_UINT32, BASE_DEC, NULL, 0,
961
14
        NULL, HFILL }},
962
14
    { &hf_crmf_version,
963
14
      { "version", "crmf.version",
964
14
        FT_INT32, BASE_DEC, VALS(pkix1explicit_Version_vals), 0,
965
14
        NULL, HFILL }},
966
14
    { &hf_crmf_serialNumber,
967
14
      { "serialNumber", "crmf.serialNumber",
968
14
        FT_INT64, BASE_DEC, NULL, 0,
969
14
        "INTEGER_MIN_MAX", HFILL }},
970
14
    { &hf_crmf_signingAlg,
971
14
      { "signingAlg", "crmf.signingAlg_element",
972
14
        FT_NONE, BASE_NONE, NULL, 0,
973
14
        "AlgorithmIdentifier", HFILL }},
974
14
    { &hf_crmf_template_issuer,
975
14
      { "issuer", "crmf.template_issuer",
976
14
        FT_UINT32, BASE_DEC, NULL, 0,
977
14
        "Name", HFILL }},
978
14
    { &hf_crmf_validity,
979
14
      { "validity", "crmf.validity_element",
980
14
        FT_NONE, BASE_NONE, NULL, 0,
981
14
        "OptionalValidity", HFILL }},
982
14
    { &hf_crmf_subject,
983
14
      { "subject", "crmf.subject",
984
14
        FT_UINT32, BASE_DEC, NULL, 0,
985
14
        "Name", HFILL }},
986
14
    { &hf_crmf_publicKey,
987
14
      { "publicKey", "crmf.publicKey_element",
988
14
        FT_NONE, BASE_NONE, NULL, 0,
989
14
        "SubjectPublicKeyInfo", HFILL }},
990
14
    { &hf_crmf_issuerUID,
991
14
      { "issuerUID", "crmf.issuerUID",
992
14
        FT_BYTES, BASE_NONE, NULL, 0,
993
14
        "UniqueIdentifier", HFILL }},
994
14
    { &hf_crmf_subjectUID,
995
14
      { "subjectUID", "crmf.subjectUID",
996
14
        FT_BYTES, BASE_NONE, NULL, 0,
997
14
        "UniqueIdentifier", HFILL }},
998
14
    { &hf_crmf_extensions,
999
14
      { "extensions", "crmf.extensions",
1000
14
        FT_UINT32, BASE_DEC, NULL, 0,
1001
14
        NULL, HFILL }},
1002
14
    { &hf_crmf_notBefore,
1003
14
      { "notBefore", "crmf.notBefore",
1004
14
        FT_UINT32, BASE_DEC, VALS(pkix1explicit_Time_vals), 0,
1005
14
        "Time", HFILL }},
1006
14
    { &hf_crmf_notAfter,
1007
14
      { "notAfter", "crmf.notAfter",
1008
14
        FT_UINT32, BASE_DEC, VALS(pkix1explicit_Time_vals), 0,
1009
14
        "Time", HFILL }},
1010
14
    { &hf_crmf_Controls_item,
1011
14
      { "AttributeTypeAndValue", "crmf.AttributeTypeAndValue_element",
1012
14
        FT_NONE, BASE_NONE, NULL, 0,
1013
14
        NULL, HFILL }},
1014
14
    { &hf_crmf_type,
1015
14
      { "type", "crmf.type",
1016
14
        FT_OID, BASE_NONE, NULL, 0,
1017
14
        NULL, HFILL }},
1018
14
    { &hf_crmf_value,
1019
14
      { "value", "crmf.value_element",
1020
14
        FT_NONE, BASE_NONE, NULL, 0,
1021
14
        NULL, HFILL }},
1022
14
    { &hf_crmf_raVerified,
1023
14
      { "raVerified", "crmf.raVerified_element",
1024
14
        FT_NONE, BASE_NONE, NULL, 0,
1025
14
        NULL, HFILL }},
1026
14
    { &hf_crmf_signature,
1027
14
      { "signature", "crmf.signature_element",
1028
14
        FT_NONE, BASE_NONE, NULL, 0,
1029
14
        "POPOSigningKey", HFILL }},
1030
14
    { &hf_crmf_keyEncipherment,
1031
14
      { "keyEncipherment", "crmf.keyEncipherment",
1032
14
        FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1033
14
        "POPOPrivKey", HFILL }},
1034
14
    { &hf_crmf_keyAgreement,
1035
14
      { "keyAgreement", "crmf.keyAgreement",
1036
14
        FT_UINT32, BASE_DEC, VALS(crmf_POPOPrivKey_vals), 0,
1037
14
        "POPOPrivKey", HFILL }},
1038
14
    { &hf_crmf_poposkInput,
1039
14
      { "poposkInput", "crmf.poposkInput_element",
1040
14
        FT_NONE, BASE_NONE, NULL, 0,
1041
14
        "POPOSigningKeyInput", HFILL }},
1042
14
    { &hf_crmf_algorithmIdentifier,
1043
14
      { "algorithmIdentifier", "crmf.algorithmIdentifier_element",
1044
14
        FT_NONE, BASE_NONE, NULL, 0,
1045
14
        NULL, HFILL }},
1046
14
    { &hf_crmf_sk_signature,
1047
14
      { "signature", "crmf.sk_signature",
1048
14
        FT_BYTES, BASE_NONE, NULL, 0,
1049
14
        "BIT_STRING", HFILL }},
1050
14
    { &hf_crmf_authInfo,
1051
14
      { "authInfo", "crmf.authInfo",
1052
14
        FT_UINT32, BASE_DEC, VALS(crmf_T_authInfo_vals), 0,
1053
14
        NULL, HFILL }},
1054
14
    { &hf_crmf_sender,
1055
14
      { "sender", "crmf.sender",
1056
14
        FT_UINT32, BASE_DEC, NULL, 0,
1057
14
        "GeneralName", HFILL }},
1058
14
    { &hf_crmf_publicKeyMAC,
1059
14
      { "publicKeyMAC", "crmf.publicKeyMAC_element",
1060
14
        FT_NONE, BASE_NONE, NULL, 0,
1061
14
        "PKMACValue", HFILL }},
1062
14
    { &hf_crmf_algId,
1063
14
      { "algId", "crmf.algId_element",
1064
14
        FT_NONE, BASE_NONE, NULL, 0,
1065
14
        "AlgorithmIdentifier", HFILL }},
1066
14
    { &hf_crmf_pkmac_value,
1067
14
      { "value", "crmf.pkmac_value",
1068
14
        FT_BYTES, BASE_NONE, NULL, 0,
1069
14
        "BIT_STRING", HFILL }},
1070
14
    { &hf_crmf_salt,
1071
14
      { "salt", "crmf.salt",
1072
14
        FT_BYTES, BASE_NONE, NULL, 0,
1073
14
        "OCTET_STRING", HFILL }},
1074
14
    { &hf_crmf_owf,
1075
14
      { "owf", "crmf.owf_element",
1076
14
        FT_NONE, BASE_NONE, NULL, 0,
1077
14
        "AlgorithmIdentifier", HFILL }},
1078
14
    { &hf_crmf_iterationCount,
1079
14
      { "iterationCount", "crmf.iterationCount",
1080
14
        FT_INT32, BASE_DEC, NULL, 0,
1081
14
        "INTEGER", HFILL }},
1082
14
    { &hf_crmf_mac,
1083
14
      { "mac", "crmf.mac_element",
1084
14
        FT_NONE, BASE_NONE, NULL, 0,
1085
14
        "AlgorithmIdentifier", HFILL }},
1086
14
    { &hf_crmf_thisMessage,
1087
14
      { "thisMessage", "crmf.thisMessage",
1088
14
        FT_BYTES, BASE_NONE, NULL, 0,
1089
14
        "BIT_STRING", HFILL }},
1090
14
    { &hf_crmf_subsequentMessage,
1091
14
      { "subsequentMessage", "crmf.subsequentMessage",
1092
14
        FT_INT32, BASE_DEC, VALS(crmf_SubsequentMessage_vals), 0,
1093
14
        NULL, HFILL }},
1094
14
    { &hf_crmf_dhMAC,
1095
14
      { "dhMAC", "crmf.dhMAC",
1096
14
        FT_BYTES, BASE_NONE, NULL, 0,
1097
14
        "BIT_STRING", HFILL }},
1098
14
    { &hf_crmf_agreeMAC,
1099
14
      { "agreeMAC", "crmf.agreeMAC_element",
1100
14
        FT_NONE, BASE_NONE, NULL, 0,
1101
14
        "PKMACValue", HFILL }},
1102
14
    { &hf_crmf_encryptedKey,
1103
14
      { "encryptedKey", "crmf.encryptedKey_element",
1104
14
        FT_NONE, BASE_NONE, NULL, 0,
1105
14
        "EnvelopedData", HFILL }},
1106
14
    { &hf_crmf_action,
1107
14
      { "action", "crmf.action",
1108
14
        FT_INT32, BASE_DEC, VALS(crmf_T_action_vals), 0,
1109
14
        NULL, HFILL }},
1110
14
    { &hf_crmf_pubInfos,
1111
14
      { "pubInfos", "crmf.pubInfos",
1112
14
        FT_UINT32, BASE_DEC, NULL, 0,
1113
14
        "SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo", HFILL }},
1114
14
    { &hf_crmf_pubInfos_item,
1115
14
      { "SinglePubInfo", "crmf.SinglePubInfo_element",
1116
14
        FT_NONE, BASE_NONE, NULL, 0,
1117
14
        NULL, HFILL }},
1118
14
    { &hf_crmf_pubMethod,
1119
14
      { "pubMethod", "crmf.pubMethod",
1120
14
        FT_INT32, BASE_DEC, VALS(crmf_T_pubMethod_vals), 0,
1121
14
        NULL, HFILL }},
1122
14
    { &hf_crmf_pubLocation,
1123
14
      { "pubLocation", "crmf.pubLocation",
1124
14
        FT_UINT32, BASE_DEC, NULL, 0,
1125
14
        "GeneralName", HFILL }},
1126
14
    { &hf_crmf_encryptedPrivKey,
1127
14
      { "encryptedPrivKey", "crmf.encryptedPrivKey",
1128
14
        FT_UINT32, BASE_DEC, VALS(crmf_EncryptedKey_vals), 0,
1129
14
        "EncryptedKey", HFILL }},
1130
14
    { &hf_crmf_keyGenParameters,
1131
14
      { "keyGenParameters", "crmf.keyGenParameters",
1132
14
        FT_BYTES, BASE_NONE, NULL, 0,
1133
14
        NULL, HFILL }},
1134
14
    { &hf_crmf_archiveRemGenPrivKey,
1135
14
      { "archiveRemGenPrivKey", "crmf.archiveRemGenPrivKey",
1136
14
        FT_BOOLEAN, BASE_NONE, NULL, 0,
1137
14
        "BOOLEAN", HFILL }},
1138
14
    { &hf_crmf_encryptedValue,
1139
14
      { "encryptedValue", "crmf.encryptedValue_element",
1140
14
        FT_NONE, BASE_NONE, NULL, 0,
1141
14
        NULL, HFILL }},
1142
14
    { &hf_crmf_envelopedData,
1143
14
      { "envelopedData", "crmf.envelopedData_element",
1144
14
        FT_NONE, BASE_NONE, NULL, 0,
1145
14
        NULL, HFILL }},
1146
14
    { &hf_crmf_intendedAlg,
1147
14
      { "intendedAlg", "crmf.intendedAlg_element",
1148
14
        FT_NONE, BASE_NONE, NULL, 0,
1149
14
        "AlgorithmIdentifier", HFILL }},
1150
14
    { &hf_crmf_symmAlg,
1151
14
      { "symmAlg", "crmf.symmAlg_element",
1152
14
        FT_NONE, BASE_NONE, NULL, 0,
1153
14
        "AlgorithmIdentifier", HFILL }},
1154
14
    { &hf_crmf_encSymmKey,
1155
14
      { "encSymmKey", "crmf.encSymmKey",
1156
14
        FT_BYTES, BASE_NONE, NULL, 0,
1157
14
        "BIT_STRING", HFILL }},
1158
14
    { &hf_crmf_keyAlg,
1159
14
      { "keyAlg", "crmf.keyAlg_element",
1160
14
        FT_NONE, BASE_NONE, NULL, 0,
1161
14
        "AlgorithmIdentifier", HFILL }},
1162
14
    { &hf_crmf_valueHint,
1163
14
      { "valueHint", "crmf.valueHint",
1164
14
        FT_BYTES, BASE_NONE, NULL, 0,
1165
14
        "OCTET_STRING", HFILL }},
1166
14
    { &hf_crmf_encValue,
1167
14
      { "encValue", "crmf.encValue",
1168
14
        FT_BYTES, BASE_NONE, NULL, 0,
1169
14
        "BIT_STRING", HFILL }},
1170
14
    { &hf_crmf_issuer,
1171
14
      { "issuer", "crmf.issuer",
1172
14
        FT_UINT32, BASE_DEC, NULL, 0,
1173
14
        "GeneralName", HFILL }},
1174
14
    { &hf_crmf_enckeywid_privkey,
1175
14
      { "privateKey", "crmf.enckeywid_privkey_element",
1176
14
        FT_NONE, BASE_NONE, NULL, 0,
1177
14
        "PrivateKeyInfo", HFILL }},
1178
14
    { &hf_crmf_identifier,
1179
14
      { "identifier", "crmf.identifier",
1180
14
        FT_UINT32, BASE_DEC, VALS(crmf_T_identifier_vals), 0,
1181
14
        NULL, HFILL }},
1182
14
    { &hf_crmf_string,
1183
14
      { "string", "crmf.string",
1184
14
        FT_STRING, BASE_NONE, NULL, 0,
1185
14
        "UTF8String", HFILL }},
1186
14
    { &hf_crmf_generalName,
1187
14
      { "generalName", "crmf.generalName",
1188
14
        FT_UINT32, BASE_DEC, NULL, 0,
1189
14
        NULL, HFILL }},
1190
14
    { &hf_crmf_privkey_version,
1191
14
      { "version", "crmf.privkey_version",
1192
14
        FT_INT32, BASE_DEC, NULL, 0,
1193
14
        "INTEGER", HFILL }},
1194
14
    { &hf_crmf_privateKeyAlgorithm,
1195
14
      { "privateKeyAlgorithm", "crmf.privateKeyAlgorithm_element",
1196
14
        FT_NONE, BASE_NONE, NULL, 0,
1197
14
        "AlgorithmIdentifier", HFILL }},
1198
14
    { &hf_crmf_privateKey,
1199
14
      { "privateKey", "crmf.privateKey",
1200
14
        FT_BYTES, BASE_NONE, NULL, 0,
1201
14
        "OCTET_STRING", HFILL }},
1202
14
    { &hf_crmf_attributes,
1203
14
      { "attributes", "crmf.attributes",
1204
14
        FT_UINT32, BASE_DEC, NULL, 0,
1205
14
        NULL, HFILL }},
1206
14
    { &hf_crmf_Attributes_item,
1207
14
      { "Attribute", "crmf.Attribute_element",
1208
14
        FT_NONE, BASE_NONE, NULL, 0,
1209
14
        NULL, HFILL }},
1210
14
  };
1211
1212
  /* List of subtrees */
1213
14
  static int *ett[] = {
1214
14
    &ett_crmf_CertReqMessages,
1215
14
    &ett_crmf_CertReqMsg,
1216
14
    &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue,
1217
14
    &ett_crmf_CertRequest,
1218
14
    &ett_crmf_CertTemplate,
1219
14
    &ett_crmf_OptionalValidity,
1220
14
    &ett_crmf_Controls,
1221
14
    &ett_crmf_AttributeTypeAndValue,
1222
14
    &ett_crmf_ProofOfPossession,
1223
14
    &ett_crmf_POPOSigningKey,
1224
14
    &ett_crmf_POPOSigningKeyInput,
1225
14
    &ett_crmf_T_authInfo,
1226
14
    &ett_crmf_PKMACValue,
1227
14
    &ett_crmf_PBMParameter,
1228
14
    &ett_crmf_POPOPrivKey,
1229
14
    &ett_crmf_PKIPublicationInfo,
1230
14
    &ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo,
1231
14
    &ett_crmf_SinglePubInfo,
1232
14
    &ett_crmf_PKIArchiveOptions,
1233
14
    &ett_crmf_EncryptedKey,
1234
14
    &ett_crmf_EncryptedValue,
1235
14
    &ett_crmf_CertId,
1236
14
    &ett_crmf_EncKeyWithID,
1237
14
    &ett_crmf_T_identifier,
1238
14
    &ett_crmf_PrivateKeyInfo,
1239
14
    &ett_crmf_Attributes,
1240
14
  };
1241
1242
  /* Register protocol */
1243
14
  proto_crmf = proto_register_protocol("Certificate Request Message Format", "CRMF", "crmf");
1244
1245
  /* Register fields and subtrees */
1246
14
  proto_register_field_array(proto_crmf, hf, array_length(hf));
1247
14
  proto_register_subtree_array(ett, array_length(ett));
1248
1249
14
}
1250
1251
1252
/*--- proto_reg_handoff_crmf -------------------------------------------*/
1253
14
void proto_reg_handoff_crmf(void) {
1254
14
  oid_add_from_string("id-pkip","1.3.6.1.5.5.7.5");
1255
14
  oid_add_from_string("id-regCtrl","1.3.6.1.5.5.7.5.1");
1256
14
  oid_add_from_string("id-regInfo","1.3.6.1.5.5.7.5.2");
1257
14
  register_ber_oid_dissector("1.2.840.113549.1.9.16.1.21", dissect_EncKeyWithID_PDU, proto_crmf, "id-ct-encKeyWithID");
1258
14
  register_ber_oid_dissector("1.2.840.113533.7.66.13", dissect_PBMParameter_PDU, proto_crmf, "PasswordBasedMac");
1259
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.1", dissect_RegToken_PDU, proto_crmf, "id-regCtrl-regToken");
1260
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.2", dissect_Authenticator_PDU, proto_crmf, "id-regCtrl-authenticator");
1261
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.3", dissect_PKIPublicationInfo_PDU, proto_crmf, "id-regCtrl-pkiPublicationInfo");
1262
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.4", dissect_PKIArchiveOptions_PDU, proto_crmf, "id-regCtrl-pkiArchiveOptions");
1263
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.5", dissect_OldCertId_PDU, proto_crmf, "id-regCtrl-oldCertID");
1264
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.1.6", dissect_ProtocolEncrKey_PDU, proto_crmf, "id-regCtrl-protocolEncrKey");
1265
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.2.1", dissect_UTF8Pairs_PDU, proto_crmf, "id-regInfo-utf8Pairs");
1266
14
  register_ber_oid_dissector("1.3.6.1.5.5.7.5.2.2", dissect_CertReq_PDU, proto_crmf, "id-regInfo-certReq");
1267
1268
14
}
1269