MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / epan / dissectors / packet-pkixtsp.c
blob187b6973fa3e425b93982fb1f3f1eb75162166c9
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-pkixtsp.c */
4 /* ../../tools/asn2wrs.py -b -p pkixtsp -c ./pkixtsp.cnf -s ./packet-pkixtsp-template -D . -O ../../epan/dissectors PKIXTSP.asn */
6 /* Input file: packet-pkixtsp-template.c */
8 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
9 /* packet-pkixtsp.c
10 * Routines for RFC2634 Extended Security Services packet dissection
11 * Ronnie Sahlberg 2004
13 * $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 #include "config.h"
36 #include <glib.h>
37 #include <epan/packet.h>
39 #include <epan/asn1.h>
40 #include "packet-ber.h"
41 #include "packet-pkixtsp.h"
42 #include "packet-pkix1explicit.h"
43 #include "packet-pkix1implicit.h"
44 #include "packet-cms.h"
46 #define PNAME "PKIX Time Stamp Protocol"
47 #define PSNAME "PKIXTSP"
48 #define PFNAME "pkixtsp"
50 /* Initialize the protocol and registered fields */
51 static int proto_pkixtsp = -1;
53 /*--- Included file: packet-pkixtsp-hf.c ---*/
54 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-hf.c"
55 static int hf_pkixtsp_TSTInfo_PDU = -1; /* TSTInfo */
56 static int hf_pkixtsp_version = -1; /* T_version */
57 static int hf_pkixtsp_messageImprint = -1; /* MessageImprint */
58 static int hf_pkixtsp_reqPolicy = -1; /* TSAPolicyId */
59 static int hf_pkixtsp_nonce = -1; /* INTEGER */
60 static int hf_pkixtsp_certReq = -1; /* BOOLEAN */
61 static int hf_pkixtsp_extensions = -1; /* Extensions */
62 static int hf_pkixtsp_hashAlgorithm = -1; /* AlgorithmIdentifier */
63 static int hf_pkixtsp_hashedMessage = -1; /* OCTET_STRING */
64 static int hf_pkixtsp_status = -1; /* PKIStatusInfo */
65 static int hf_pkixtsp_timeStampToken = -1; /* TimeStampToken */
66 static int hf_pkixtsp_pki_status = -1; /* PKIStatus */
67 static int hf_pkixtsp_failInfo = -1; /* PKIFailureInfo */
68 static int hf_pkixtsp_tst_version = -1; /* Tst_version */
69 static int hf_pkixtsp_policy = -1; /* TSAPolicyId */
70 static int hf_pkixtsp_serialNumber = -1; /* INTEGER */
71 static int hf_pkixtsp_genTime = -1; /* GeneralizedTime */
72 static int hf_pkixtsp_accuracy = -1; /* Accuracy */
73 static int hf_pkixtsp_ordering = -1; /* BOOLEAN */
74 static int hf_pkixtsp_tsa = -1; /* GeneralName */
75 static int hf_pkixtsp_seconds = -1; /* INTEGER */
76 static int hf_pkixtsp_millis = -1; /* INTEGER_1_999 */
77 static int hf_pkixtsp_micros = -1; /* INTEGER_1_999 */
78 /* named bits */
79 static int hf_pkixtsp_PKIFailureInfo_badAlg = -1;
80 static int hf_pkixtsp_PKIFailureInfo_badRequest = -1;
81 static int hf_pkixtsp_PKIFailureInfo_badDataFormat = -1;
82 static int hf_pkixtsp_PKIFailureInfo_timeNotAvailable = -1;
83 static int hf_pkixtsp_PKIFailureInfo_unacceptedPolicy = -1;
84 static int hf_pkixtsp_PKIFailureInfo_unacceptedExtension = -1;
85 static int hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable = -1;
86 static int hf_pkixtsp_PKIFailureInfo_systemFailure = -1;
88 /*--- End of included file: packet-pkixtsp-hf.c ---*/
89 #line 45 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
91 /* Initialize the subtree pointers */
92 static gint ett_pkixtsp = -1;
94 /*--- Included file: packet-pkixtsp-ett.c ---*/
95 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-ett.c"
96 static gint ett_pkixtsp_TimeStampReq = -1;
97 static gint ett_pkixtsp_MessageImprint = -1;
98 static gint ett_pkixtsp_TimeStampResp = -1;
99 static gint ett_pkixtsp_PKIStatusInfo = -1;
100 static gint ett_pkixtsp_PKIFailureInfo = -1;
101 static gint ett_pkixtsp_TSTInfo = -1;
102 static gint ett_pkixtsp_Accuracy = -1;
104 /*--- End of included file: packet-pkixtsp-ett.c ---*/
105 #line 49 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
109 /*--- Included file: packet-pkixtsp-fn.c ---*/
110 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-fn.c"
112 static const value_string pkixtsp_T_version_vals[] = {
113 { 1, "v1" },
114 { 0, NULL }
118 static int
119 dissect_pkixtsp_T_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
120 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
121 NULL);
123 return offset;
128 static int
129 dissect_pkixtsp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
130 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
131 NULL);
133 return offset;
137 static const ber_sequence_t MessageImprint_sequence[] = {
138 { &hf_pkixtsp_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
139 { &hf_pkixtsp_hashedMessage, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_OCTET_STRING },
140 { NULL, 0, 0, 0, NULL }
143 static int
144 dissect_pkixtsp_MessageImprint(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
145 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
146 MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint);
148 return offset;
153 static int
154 dissect_pkixtsp_TSAPolicyId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
155 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
157 return offset;
162 static int
163 dissect_pkixtsp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
164 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
165 NULL);
167 return offset;
172 static int
173 dissect_pkixtsp_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
174 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
176 return offset;
180 static const ber_sequence_t TimeStampReq_sequence[] = {
181 { &hf_pkixtsp_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_T_version },
182 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
183 { &hf_pkixtsp_reqPolicy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
184 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
185 { &hf_pkixtsp_certReq , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
186 { &hf_pkixtsp_extensions , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
187 { NULL, 0, 0, 0, NULL }
190 static int
191 dissect_pkixtsp_TimeStampReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
192 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
193 TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq);
195 return offset;
199 static const value_string pkixtsp_PKIStatus_vals[] = {
200 { 0, "granted" },
201 { 1, "grantedWithMods" },
202 { 2, "rejection" },
203 { 3, "waiting" },
204 { 4, "revocationWarning" },
205 { 5, "revocationNotification" },
206 { 0, NULL }
210 static int
211 dissect_pkixtsp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
212 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
213 NULL);
215 return offset;
219 static const asn_namedbit PKIFailureInfo_bits[] = {
220 { 0, &hf_pkixtsp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
221 { 2, &hf_pkixtsp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
222 { 5, &hf_pkixtsp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
223 { 14, &hf_pkixtsp_PKIFailureInfo_timeNotAvailable, -1, -1, "timeNotAvailable", NULL },
224 { 15, &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy, -1, -1, "unacceptedPolicy", NULL },
225 { 16, &hf_pkixtsp_PKIFailureInfo_unacceptedExtension, -1, -1, "unacceptedExtension", NULL },
226 { 17, &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable, -1, -1, "addInfoNotAvailable", NULL },
227 { 25, &hf_pkixtsp_PKIFailureInfo_systemFailure, -1, -1, "systemFailure", NULL },
228 { 0, NULL, 0, 0, NULL, NULL }
231 static int
232 dissect_pkixtsp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
233 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
234 PKIFailureInfo_bits, hf_index, ett_pkixtsp_PKIFailureInfo,
235 NULL);
237 return offset;
241 static const ber_sequence_t PKIStatusInfo_sequence[] = {
242 { &hf_pkixtsp_pki_status , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatus },
243 { &hf_pkixtsp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIFailureInfo },
244 { NULL, 0, 0, 0, NULL }
247 static int
248 dissect_pkixtsp_PKIStatusInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
249 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
250 PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo);
252 return offset;
257 static int
258 dissect_pkixtsp_TimeStampToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
259 offset = dissect_cms_ContentInfo(implicit_tag, tvb, offset, actx, tree, hf_index);
261 return offset;
265 static const ber_sequence_t TimeStampResp_sequence[] = {
266 { &hf_pkixtsp_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatusInfo },
267 { &hf_pkixtsp_timeStampToken, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TimeStampToken },
268 { NULL, 0, 0, 0, NULL }
271 static int
272 dissect_pkixtsp_TimeStampResp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
273 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
274 TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp);
276 return offset;
280 static const value_string pkixtsp_Tst_version_vals[] = {
281 { 1, "v1" },
282 { 0, NULL }
286 static int
287 dissect_pkixtsp_Tst_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
288 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
289 NULL);
291 return offset;
296 static int
297 dissect_pkixtsp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
298 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
300 return offset;
305 static int
306 dissect_pkixtsp_INTEGER_1_999(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
307 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
308 NULL);
310 return offset;
314 static const ber_sequence_t Accuracy_sequence[] = {
315 { &hf_pkixtsp_seconds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
316 { &hf_pkixtsp_millis , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
317 { &hf_pkixtsp_micros , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
318 { NULL, 0, 0, 0, NULL }
321 static int
322 dissect_pkixtsp_Accuracy(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
323 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
324 Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy);
326 return offset;
330 static const ber_sequence_t TSTInfo_sequence[] = {
331 { &hf_pkixtsp_tst_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Tst_version },
332 { &hf_pkixtsp_policy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
333 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
334 { &hf_pkixtsp_serialNumber, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
335 { &hf_pkixtsp_genTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_GeneralizedTime },
336 { &hf_pkixtsp_accuracy , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Accuracy },
337 { &hf_pkixtsp_ordering , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
338 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
339 { &hf_pkixtsp_tsa , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName },
340 { &hf_pkixtsp_extensions , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
341 { NULL, 0, 0, 0, NULL }
344 static int
345 dissect_pkixtsp_TSTInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
346 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
347 TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo);
349 return offset;
352 /*--- PDUs ---*/
354 static void dissect_TSTInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
355 asn1_ctx_t asn1_ctx;
356 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
357 dissect_pkixtsp_TSTInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixtsp_TSTInfo_PDU);
361 /*--- End of included file: packet-pkixtsp-fn.c ---*/
362 #line 52 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
365 static int
366 dissect_timestamp_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
368 proto_item *item=NULL;
369 proto_tree *tree=NULL;
370 asn1_ctx_t asn1_ctx;
371 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
373 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
375 col_set_str(pinfo->cinfo, COL_INFO, "Reply");
378 if(parent_tree){
379 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, ENC_NA);
380 tree = proto_item_add_subtree(item, ett_pkixtsp);
383 return dissect_pkixtsp_TimeStampResp(FALSE, tvb, 0, &asn1_ctx, tree, -1);
386 static int
387 dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
389 proto_item *item=NULL;
390 proto_tree *tree=NULL;
391 asn1_ctx_t asn1_ctx;
392 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
394 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
396 col_set_str(pinfo->cinfo, COL_INFO, "Query");
399 if(parent_tree){
400 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, ENC_NA);
401 tree = proto_item_add_subtree(item, ett_pkixtsp);
404 return dissect_pkixtsp_TimeStampReq(FALSE, tvb, 0, &asn1_ctx, tree, -1);
408 /*--- proto_register_pkixtsp ----------------------------------------------*/
409 void proto_register_pkixtsp(void) {
411 /* List of fields */
412 static hf_register_info hf[] = {
414 /*--- Included file: packet-pkixtsp-hfarr.c ---*/
415 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-hfarr.c"
416 { &hf_pkixtsp_TSTInfo_PDU,
417 { "TSTInfo", "pkixtsp.TSTInfo_element",
418 FT_NONE, BASE_NONE, NULL, 0,
419 NULL, HFILL }},
420 { &hf_pkixtsp_version,
421 { "version", "pkixtsp.version",
422 FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0,
423 NULL, HFILL }},
424 { &hf_pkixtsp_messageImprint,
425 { "messageImprint", "pkixtsp.messageImprint_element",
426 FT_NONE, BASE_NONE, NULL, 0,
427 NULL, HFILL }},
428 { &hf_pkixtsp_reqPolicy,
429 { "reqPolicy", "pkixtsp.reqPolicy",
430 FT_OID, BASE_NONE, NULL, 0,
431 "TSAPolicyId", HFILL }},
432 { &hf_pkixtsp_nonce,
433 { "nonce", "pkixtsp.nonce",
434 FT_INT32, BASE_DEC, NULL, 0,
435 "INTEGER", HFILL }},
436 { &hf_pkixtsp_certReq,
437 { "certReq", "pkixtsp.certReq",
438 FT_BOOLEAN, BASE_NONE, NULL, 0,
439 "BOOLEAN", HFILL }},
440 { &hf_pkixtsp_extensions,
441 { "extensions", "pkixtsp.extensions",
442 FT_UINT32, BASE_DEC, NULL, 0,
443 NULL, HFILL }},
444 { &hf_pkixtsp_hashAlgorithm,
445 { "hashAlgorithm", "pkixtsp.hashAlgorithm_element",
446 FT_NONE, BASE_NONE, NULL, 0,
447 "AlgorithmIdentifier", HFILL }},
448 { &hf_pkixtsp_hashedMessage,
449 { "hashedMessage", "pkixtsp.hashedMessage",
450 FT_BYTES, BASE_NONE, NULL, 0,
451 "OCTET_STRING", HFILL }},
452 { &hf_pkixtsp_status,
453 { "status", "pkixtsp.status_element",
454 FT_NONE, BASE_NONE, NULL, 0,
455 "PKIStatusInfo", HFILL }},
456 { &hf_pkixtsp_timeStampToken,
457 { "timeStampToken", "pkixtsp.timeStampToken_element",
458 FT_NONE, BASE_NONE, NULL, 0,
459 NULL, HFILL }},
460 { &hf_pkixtsp_pki_status,
461 { "status", "pkixtsp.status",
462 FT_INT32, BASE_DEC, VALS(pkixtsp_PKIStatus_vals), 0,
463 "PKIStatus", HFILL }},
464 { &hf_pkixtsp_failInfo,
465 { "failInfo", "pkixtsp.failInfo",
466 FT_BYTES, BASE_NONE, NULL, 0,
467 "PKIFailureInfo", HFILL }},
468 { &hf_pkixtsp_tst_version,
469 { "version", "pkixtsp.version",
470 FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0,
471 "Tst_version", HFILL }},
472 { &hf_pkixtsp_policy,
473 { "policy", "pkixtsp.policy",
474 FT_OID, BASE_NONE, NULL, 0,
475 "TSAPolicyId", HFILL }},
476 { &hf_pkixtsp_serialNumber,
477 { "serialNumber", "pkixtsp.serialNumber",
478 FT_INT32, BASE_DEC, NULL, 0,
479 "INTEGER", HFILL }},
480 { &hf_pkixtsp_genTime,
481 { "genTime", "pkixtsp.genTime",
482 FT_STRING, BASE_NONE, NULL, 0,
483 "GeneralizedTime", HFILL }},
484 { &hf_pkixtsp_accuracy,
485 { "accuracy", "pkixtsp.accuracy_element",
486 FT_NONE, BASE_NONE, NULL, 0,
487 NULL, HFILL }},
488 { &hf_pkixtsp_ordering,
489 { "ordering", "pkixtsp.ordering",
490 FT_BOOLEAN, BASE_NONE, NULL, 0,
491 "BOOLEAN", HFILL }},
492 { &hf_pkixtsp_tsa,
493 { "tsa", "pkixtsp.tsa",
494 FT_UINT32, BASE_DEC, NULL, 0,
495 "GeneralName", HFILL }},
496 { &hf_pkixtsp_seconds,
497 { "seconds", "pkixtsp.seconds",
498 FT_INT32, BASE_DEC, NULL, 0,
499 "INTEGER", HFILL }},
500 { &hf_pkixtsp_millis,
501 { "millis", "pkixtsp.millis",
502 FT_UINT32, BASE_DEC, NULL, 0,
503 "INTEGER_1_999", HFILL }},
504 { &hf_pkixtsp_micros,
505 { "micros", "pkixtsp.micros",
506 FT_UINT32, BASE_DEC, NULL, 0,
507 "INTEGER_1_999", HFILL }},
508 { &hf_pkixtsp_PKIFailureInfo_badAlg,
509 { "badAlg", "pkixtsp.badAlg",
510 FT_BOOLEAN, 8, NULL, 0x80,
511 NULL, HFILL }},
512 { &hf_pkixtsp_PKIFailureInfo_badRequest,
513 { "badRequest", "pkixtsp.badRequest",
514 FT_BOOLEAN, 8, NULL, 0x20,
515 NULL, HFILL }},
516 { &hf_pkixtsp_PKIFailureInfo_badDataFormat,
517 { "badDataFormat", "pkixtsp.badDataFormat",
518 FT_BOOLEAN, 8, NULL, 0x04,
519 NULL, HFILL }},
520 { &hf_pkixtsp_PKIFailureInfo_timeNotAvailable,
521 { "timeNotAvailable", "pkixtsp.timeNotAvailable",
522 FT_BOOLEAN, 8, NULL, 0x02,
523 NULL, HFILL }},
524 { &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy,
525 { "unacceptedPolicy", "pkixtsp.unacceptedPolicy",
526 FT_BOOLEAN, 8, NULL, 0x01,
527 NULL, HFILL }},
528 { &hf_pkixtsp_PKIFailureInfo_unacceptedExtension,
529 { "unacceptedExtension", "pkixtsp.unacceptedExtension",
530 FT_BOOLEAN, 8, NULL, 0x80,
531 NULL, HFILL }},
532 { &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable,
533 { "addInfoNotAvailable", "pkixtsp.addInfoNotAvailable",
534 FT_BOOLEAN, 8, NULL, 0x40,
535 NULL, HFILL }},
536 { &hf_pkixtsp_PKIFailureInfo_systemFailure,
537 { "systemFailure", "pkixtsp.systemFailure",
538 FT_BOOLEAN, 8, NULL, 0x40,
539 NULL, HFILL }},
541 /*--- End of included file: packet-pkixtsp-hfarr.c ---*/
542 #line 103 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
545 /* List of subtrees */
546 static gint *ett[] = {
547 &ett_pkixtsp,
549 /*--- Included file: packet-pkixtsp-ettarr.c ---*/
550 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-ettarr.c"
551 &ett_pkixtsp_TimeStampReq,
552 &ett_pkixtsp_MessageImprint,
553 &ett_pkixtsp_TimeStampResp,
554 &ett_pkixtsp_PKIStatusInfo,
555 &ett_pkixtsp_PKIFailureInfo,
556 &ett_pkixtsp_TSTInfo,
557 &ett_pkixtsp_Accuracy,
559 /*--- End of included file: packet-pkixtsp-ettarr.c ---*/
560 #line 109 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
563 /* Register protocol */
564 proto_pkixtsp = proto_register_protocol(PNAME, PSNAME, PFNAME);
566 /* Register fields and subtrees */
567 proto_register_field_array(proto_pkixtsp, hf, array_length(hf));
568 proto_register_subtree_array(ett, array_length(ett));
573 /*--- proto_reg_handoff_pkixtsp -------------------------------------------*/
574 void proto_reg_handoff_pkixtsp(void) {
575 dissector_handle_t timestamp_reply_handle;
576 dissector_handle_t timestamp_query_handle;
578 timestamp_reply_handle = new_create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
579 dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle);
581 timestamp_query_handle = new_create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
582 dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle);
585 /*--- Included file: packet-pkixtsp-dis-tab.c ---*/
586 #line 1 "../../asn1/pkixtsp/packet-pkixtsp-dis-tab.c"
587 register_ber_oid_dissector("1.2.840.113549.1.9.16.1.4", dissect_TSTInfo_PDU, proto_pkixtsp, "id-ct-TSTInfo");
590 /*--- End of included file: packet-pkixtsp-dis-tab.c ---*/
591 #line 133 "../../asn1/pkixtsp/packet-pkixtsp-template.c"