1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p pkixtsp -c ./pkixtsp.cnf -s ./packet-pkixtsp-template -D . PKIXTSP.asn */
6 /* Input file: packet-pkixtsp-template.c */
8 #line 1 "packet-pkixtsp-template.c"
10 * Routines for RFC2634 Extended Security Services 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>
44 #include <epan/asn1.h>
45 #include "packet-ber.h"
46 #include "packet-pkixtsp.h"
47 #include "packet-pkix1explicit.h"
48 #include "packet-pkix1implicit.h"
49 #include "packet-cms.h"
51 #define PNAME "PKIX Time Stamp Protocol"
52 #define PSNAME "PKIXTSP"
53 #define PFNAME "pkixtsp"
55 /* Initialize the protocol and registered fields */
56 static int proto_pkixtsp = -1;
58 /*--- Included file: packet-pkixtsp-hf.c ---*/
59 #line 1 "packet-pkixtsp-hf.c"
60 static int hf_pkixtsp_TSTInfo_PDU = -1; /* TSTInfo */
61 static int hf_pkixtsp_version = -1; /* T_version */
62 static int hf_pkixtsp_messageImprint = -1; /* MessageImprint */
63 static int hf_pkixtsp_reqPolicy = -1; /* TSAPolicyId */
64 static int hf_pkixtsp_nonce = -1; /* INTEGER */
65 static int hf_pkixtsp_certReq = -1; /* BOOLEAN */
66 static int hf_pkixtsp_extensions = -1; /* Extensions */
67 static int hf_pkixtsp_hashAlgorithm = -1; /* AlgorithmIdentifier */
68 static int hf_pkixtsp_hashedMessage = -1; /* OCTET_STRING */
69 static int hf_pkixtsp_status = -1; /* PKIStatusInfo */
70 static int hf_pkixtsp_timeStampToken = -1; /* TimeStampToken */
71 static int hf_pkixtsp_pki_status = -1; /* PKIStatus */
72 static int hf_pkixtsp_failInfo = -1; /* PKIFailureInfo */
73 static int hf_pkixtsp_tst_version = -1; /* Tst_version */
74 static int hf_pkixtsp_policy = -1; /* TSAPolicyId */
75 static int hf_pkixtsp_serialNumber = -1; /* INTEGER */
76 static int hf_pkixtsp_genTime = -1; /* GeneralizedTime */
77 static int hf_pkixtsp_accuracy = -1; /* Accuracy */
78 static int hf_pkixtsp_ordering = -1; /* BOOLEAN */
79 static int hf_pkixtsp_tsa = -1; /* GeneralName */
80 static int hf_pkixtsp_seconds = -1; /* INTEGER */
81 static int hf_pkixtsp_millis = -1; /* INTEGER_1_999 */
82 static int hf_pkixtsp_micros = -1; /* INTEGER_1_999 */
84 static int hf_pkixtsp_PKIFailureInfo_badAlg = -1;
85 static int hf_pkixtsp_PKIFailureInfo_badRequest = -1;
86 static int hf_pkixtsp_PKIFailureInfo_badDataFormat = -1;
87 static int hf_pkixtsp_PKIFailureInfo_timeNotAvailable = -1;
88 static int hf_pkixtsp_PKIFailureInfo_unacceptedPolicy = -1;
89 static int hf_pkixtsp_PKIFailureInfo_unacceptedExtension = -1;
90 static int hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable = -1;
91 static int hf_pkixtsp_PKIFailureInfo_systemFailure = -1;
93 /*--- End of included file: packet-pkixtsp-hf.c ---*/
94 #line 50 "packet-pkixtsp-template.c"
96 /* Initialize the subtree pointers */
97 static gint ett_pkixtsp = -1;
99 /*--- Included file: packet-pkixtsp-ett.c ---*/
100 #line 1 "packet-pkixtsp-ett.c"
101 static gint ett_pkixtsp_TimeStampReq = -1;
102 static gint ett_pkixtsp_MessageImprint = -1;
103 static gint ett_pkixtsp_TimeStampResp = -1;
104 static gint ett_pkixtsp_PKIStatusInfo = -1;
105 static gint ett_pkixtsp_PKIFailureInfo = -1;
106 static gint ett_pkixtsp_TSTInfo = -1;
107 static gint ett_pkixtsp_Accuracy = -1;
109 /*--- End of included file: packet-pkixtsp-ett.c ---*/
110 #line 54 "packet-pkixtsp-template.c"
114 /*--- Included file: packet-pkixtsp-fn.c ---*/
115 #line 1 "packet-pkixtsp-fn.c"
117 static const value_string pkixtsp_T_version_vals[] = {
124 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_) {
125 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
134 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_) {
135 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
142 static const ber_sequence_t MessageImprint_sequence[] = {
143 { &hf_pkixtsp_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
144 { &hf_pkixtsp_hashedMessage, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_OCTET_STRING },
145 { NULL, 0, 0, 0, NULL }
149 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_) {
150 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
151 MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint);
159 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_) {
160 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
168 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_) {
169 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
178 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_) {
179 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
185 static const ber_sequence_t TimeStampReq_sequence[] = {
186 { &hf_pkixtsp_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_T_version },
187 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
188 { &hf_pkixtsp_reqPolicy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
189 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
190 { &hf_pkixtsp_certReq , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
191 { &hf_pkixtsp_extensions , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
192 { NULL, 0, 0, 0, NULL }
196 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_) {
197 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
198 TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq);
204 static const value_string pkixtsp_PKIStatus_vals[] = {
206 { 1, "grantedWithMods" },
209 { 4, "revocationWarning" },
210 { 5, "revocationNotification" },
216 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_) {
217 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
224 static const asn_namedbit PKIFailureInfo_bits[] = {
225 { 0, &hf_pkixtsp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
226 { 2, &hf_pkixtsp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
227 { 5, &hf_pkixtsp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
228 { 14, &hf_pkixtsp_PKIFailureInfo_timeNotAvailable, -1, -1, "timeNotAvailable", NULL },
229 { 15, &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy, -1, -1, "unacceptedPolicy", NULL },
230 { 16, &hf_pkixtsp_PKIFailureInfo_unacceptedExtension, -1, -1, "unacceptedExtension", NULL },
231 { 17, &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable, -1, -1, "addInfoNotAvailable", NULL },
232 { 25, &hf_pkixtsp_PKIFailureInfo_systemFailure, -1, -1, "systemFailure", NULL },
233 { 0, NULL, 0, 0, NULL, NULL }
237 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_) {
238 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
239 PKIFailureInfo_bits, hf_index, ett_pkixtsp_PKIFailureInfo,
246 static const ber_sequence_t PKIStatusInfo_sequence[] = {
247 { &hf_pkixtsp_pki_status , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatus },
248 { &hf_pkixtsp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIFailureInfo },
249 { NULL, 0, 0, 0, NULL }
253 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_) {
254 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
255 PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo);
263 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_) {
264 offset = dissect_cms_ContentInfo(implicit_tag, tvb, offset, actx, tree, hf_index);
270 static const ber_sequence_t TimeStampResp_sequence[] = {
271 { &hf_pkixtsp_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatusInfo },
272 { &hf_pkixtsp_timeStampToken, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TimeStampToken },
273 { NULL, 0, 0, 0, NULL }
277 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_) {
278 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
279 TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp);
285 static const value_string pkixtsp_Tst_version_vals[] = {
292 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_) {
293 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
302 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_) {
303 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
311 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_) {
312 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
319 static const ber_sequence_t Accuracy_sequence[] = {
320 { &hf_pkixtsp_seconds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
321 { &hf_pkixtsp_millis , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
322 { &hf_pkixtsp_micros , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
323 { NULL, 0, 0, 0, NULL }
327 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_) {
328 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
329 Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy);
335 static const ber_sequence_t TSTInfo_sequence[] = {
336 { &hf_pkixtsp_tst_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Tst_version },
337 { &hf_pkixtsp_policy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
338 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
339 { &hf_pkixtsp_serialNumber, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
340 { &hf_pkixtsp_genTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_GeneralizedTime },
341 { &hf_pkixtsp_accuracy , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Accuracy },
342 { &hf_pkixtsp_ordering , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
343 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
344 { &hf_pkixtsp_tsa , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName },
345 { &hf_pkixtsp_extensions , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
346 { NULL, 0, 0, 0, NULL }
350 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_) {
351 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
352 TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo);
359 static void dissect_TSTInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
361 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
362 dissect_pkixtsp_TSTInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixtsp_TSTInfo_PDU);
366 /*--- End of included file: packet-pkixtsp-fn.c ---*/
367 #line 57 "packet-pkixtsp-template.c"
371 dissect_timestamp_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
373 proto_item *item=NULL;
374 proto_tree *tree=NULL;
376 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
378 if (check_col(pinfo->cinfo, COL_PROTOCOL))
379 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
381 if (check_col(pinfo->cinfo, COL_INFO)) {
382 col_clear(pinfo->cinfo, COL_INFO);
384 col_set_str(pinfo->cinfo, COL_INFO, "Reply");
389 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
390 tree = proto_item_add_subtree(item, ett_pkixtsp);
393 return dissect_pkixtsp_TimeStampResp(FALSE, tvb, 0, &asn1_ctx, tree, -1);
397 dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
399 proto_item *item=NULL;
400 proto_tree *tree=NULL;
402 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
404 if (check_col(pinfo->cinfo, COL_PROTOCOL))
405 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
407 if (check_col(pinfo->cinfo, COL_INFO)) {
408 col_clear(pinfo->cinfo, COL_INFO);
410 col_set_str(pinfo->cinfo, COL_INFO, "Query");
415 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
416 tree = proto_item_add_subtree(item, ett_pkixtsp);
419 return dissect_pkixtsp_TimeStampReq(FALSE, tvb, 0, &asn1_ctx, tree, -1);
423 /*--- proto_register_pkixtsp ----------------------------------------------*/
424 void proto_register_pkixtsp(void) {
427 static hf_register_info hf[] = {
429 /*--- Included file: packet-pkixtsp-hfarr.c ---*/
430 #line 1 "packet-pkixtsp-hfarr.c"
431 { &hf_pkixtsp_TSTInfo_PDU,
432 { "TSTInfo", "pkixtsp.TSTInfo",
433 FT_NONE, BASE_NONE, NULL, 0,
434 "pkixtsp.TSTInfo", HFILL }},
435 { &hf_pkixtsp_version,
436 { "version", "pkixtsp.version",
437 FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0,
438 "pkixtsp.T_version", HFILL }},
439 { &hf_pkixtsp_messageImprint,
440 { "messageImprint", "pkixtsp.messageImprint",
441 FT_NONE, BASE_NONE, NULL, 0,
442 "pkixtsp.MessageImprint", HFILL }},
443 { &hf_pkixtsp_reqPolicy,
444 { "reqPolicy", "pkixtsp.reqPolicy",
445 FT_OID, BASE_NONE, NULL, 0,
446 "pkixtsp.TSAPolicyId", HFILL }},
448 { "nonce", "pkixtsp.nonce",
449 FT_INT32, BASE_DEC, NULL, 0,
450 "pkixtsp.INTEGER", HFILL }},
451 { &hf_pkixtsp_certReq,
452 { "certReq", "pkixtsp.certReq",
453 FT_BOOLEAN, BASE_NONE, NULL, 0,
454 "pkixtsp.BOOLEAN", HFILL }},
455 { &hf_pkixtsp_extensions,
456 { "extensions", "pkixtsp.extensions",
457 FT_UINT32, BASE_DEC, NULL, 0,
458 "pkix1explicit.Extensions", HFILL }},
459 { &hf_pkixtsp_hashAlgorithm,
460 { "hashAlgorithm", "pkixtsp.hashAlgorithm",
461 FT_NONE, BASE_NONE, NULL, 0,
462 "pkix1explicit.AlgorithmIdentifier", HFILL }},
463 { &hf_pkixtsp_hashedMessage,
464 { "hashedMessage", "pkixtsp.hashedMessage",
465 FT_BYTES, BASE_NONE, NULL, 0,
466 "pkixtsp.OCTET_STRING", HFILL }},
467 { &hf_pkixtsp_status,
468 { "status", "pkixtsp.status",
469 FT_NONE, BASE_NONE, NULL, 0,
470 "pkixtsp.PKIStatusInfo", HFILL }},
471 { &hf_pkixtsp_timeStampToken,
472 { "timeStampToken", "pkixtsp.timeStampToken",
473 FT_NONE, BASE_NONE, NULL, 0,
474 "pkixtsp.TimeStampToken", HFILL }},
475 { &hf_pkixtsp_pki_status,
476 { "status", "pkixtsp.status",
477 FT_INT32, BASE_DEC, VALS(pkixtsp_PKIStatus_vals), 0,
478 "pkixtsp.PKIStatus", HFILL }},
479 { &hf_pkixtsp_failInfo,
480 { "failInfo", "pkixtsp.failInfo",
481 FT_BYTES, BASE_NONE, NULL, 0,
482 "pkixtsp.PKIFailureInfo", HFILL }},
483 { &hf_pkixtsp_tst_version,
484 { "version", "pkixtsp.version",
485 FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0,
486 "pkixtsp.Tst_version", HFILL }},
487 { &hf_pkixtsp_policy,
488 { "policy", "pkixtsp.policy",
489 FT_OID, BASE_NONE, NULL, 0,
490 "pkixtsp.TSAPolicyId", HFILL }},
491 { &hf_pkixtsp_serialNumber,
492 { "serialNumber", "pkixtsp.serialNumber",
493 FT_INT32, BASE_DEC, NULL, 0,
494 "pkixtsp.INTEGER", HFILL }},
495 { &hf_pkixtsp_genTime,
496 { "genTime", "pkixtsp.genTime",
497 FT_STRING, BASE_NONE, NULL, 0,
498 "pkixtsp.GeneralizedTime", HFILL }},
499 { &hf_pkixtsp_accuracy,
500 { "accuracy", "pkixtsp.accuracy",
501 FT_NONE, BASE_NONE, NULL, 0,
502 "pkixtsp.Accuracy", HFILL }},
503 { &hf_pkixtsp_ordering,
504 { "ordering", "pkixtsp.ordering",
505 FT_BOOLEAN, BASE_NONE, NULL, 0,
506 "pkixtsp.BOOLEAN", HFILL }},
508 { "tsa", "pkixtsp.tsa",
509 FT_UINT32, BASE_DEC, NULL, 0,
510 "pkix1implicit.GeneralName", HFILL }},
511 { &hf_pkixtsp_seconds,
512 { "seconds", "pkixtsp.seconds",
513 FT_INT32, BASE_DEC, NULL, 0,
514 "pkixtsp.INTEGER", HFILL }},
515 { &hf_pkixtsp_millis,
516 { "millis", "pkixtsp.millis",
517 FT_UINT32, BASE_DEC, NULL, 0,
518 "pkixtsp.INTEGER_1_999", HFILL }},
519 { &hf_pkixtsp_micros,
520 { "micros", "pkixtsp.micros",
521 FT_UINT32, BASE_DEC, NULL, 0,
522 "pkixtsp.INTEGER_1_999", HFILL }},
523 { &hf_pkixtsp_PKIFailureInfo_badAlg,
524 { "badAlg", "pkixtsp.badAlg",
525 FT_BOOLEAN, 8, NULL, 0x80,
527 { &hf_pkixtsp_PKIFailureInfo_badRequest,
528 { "badRequest", "pkixtsp.badRequest",
529 FT_BOOLEAN, 8, NULL, 0x20,
531 { &hf_pkixtsp_PKIFailureInfo_badDataFormat,
532 { "badDataFormat", "pkixtsp.badDataFormat",
533 FT_BOOLEAN, 8, NULL, 0x04,
535 { &hf_pkixtsp_PKIFailureInfo_timeNotAvailable,
536 { "timeNotAvailable", "pkixtsp.timeNotAvailable",
537 FT_BOOLEAN, 8, NULL, 0x02,
539 { &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy,
540 { "unacceptedPolicy", "pkixtsp.unacceptedPolicy",
541 FT_BOOLEAN, 8, NULL, 0x01,
543 { &hf_pkixtsp_PKIFailureInfo_unacceptedExtension,
544 { "unacceptedExtension", "pkixtsp.unacceptedExtension",
545 FT_BOOLEAN, 8, NULL, 0x80,
547 { &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable,
548 { "addInfoNotAvailable", "pkixtsp.addInfoNotAvailable",
549 FT_BOOLEAN, 8, NULL, 0x40,
551 { &hf_pkixtsp_PKIFailureInfo_systemFailure,
552 { "systemFailure", "pkixtsp.systemFailure",
553 FT_BOOLEAN, 8, NULL, 0x40,
556 /*--- End of included file: packet-pkixtsp-hfarr.c ---*/
557 #line 118 "packet-pkixtsp-template.c"
560 /* List of subtrees */
561 static gint *ett[] = {
564 /*--- Included file: packet-pkixtsp-ettarr.c ---*/
565 #line 1 "packet-pkixtsp-ettarr.c"
566 &ett_pkixtsp_TimeStampReq,
567 &ett_pkixtsp_MessageImprint,
568 &ett_pkixtsp_TimeStampResp,
569 &ett_pkixtsp_PKIStatusInfo,
570 &ett_pkixtsp_PKIFailureInfo,
571 &ett_pkixtsp_TSTInfo,
572 &ett_pkixtsp_Accuracy,
574 /*--- End of included file: packet-pkixtsp-ettarr.c ---*/
575 #line 124 "packet-pkixtsp-template.c"
578 /* Register protocol */
579 proto_pkixtsp = proto_register_protocol(PNAME, PSNAME, PFNAME);
581 /* Register fields and subtrees */
582 proto_register_field_array(proto_pkixtsp, hf, array_length(hf));
583 proto_register_subtree_array(ett, array_length(ett));
588 /*--- proto_reg_handoff_pkixtsp -------------------------------------------*/
589 void proto_reg_handoff_pkixtsp(void) {
590 dissector_handle_t timestamp_reply_handle;
591 dissector_handle_t timestamp_query_handle;
593 timestamp_reply_handle = new_create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
594 dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle);
596 timestamp_query_handle = new_create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
597 dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle);
600 /*--- Included file: packet-pkixtsp-dis-tab.c ---*/
601 #line 1 "packet-pkixtsp-dis-tab.c"
602 register_ber_oid_dissector("1.2.840.113549.1.9.16.1.4", dissect_TSTInfo_PDU, proto_pkixtsp, "id-ct-TSTInfo");
605 /*--- End of included file: packet-pkixtsp-dis-tab.c ---*/
606 #line 148 "packet-pkixtsp-template.c"