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 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
380 if (check_col(pinfo->cinfo, COL_INFO)) {
381 col_set_str(pinfo->cinfo, COL_INFO, "Reply");
386 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
387 tree = proto_item_add_subtree(item, ett_pkixtsp);
390 return dissect_pkixtsp_TimeStampResp(FALSE, tvb, 0, &asn1_ctx, tree, -1);
394 dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
396 proto_item *item=NULL;
397 proto_tree *tree=NULL;
399 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
401 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
403 if (check_col(pinfo->cinfo, COL_INFO)) {
404 col_set_str(pinfo->cinfo, COL_INFO, "Query");
409 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
410 tree = proto_item_add_subtree(item, ett_pkixtsp);
413 return dissect_pkixtsp_TimeStampReq(FALSE, tvb, 0, &asn1_ctx, tree, -1);
417 /*--- proto_register_pkixtsp ----------------------------------------------*/
418 void proto_register_pkixtsp(void) {
421 static hf_register_info hf[] = {
423 /*--- Included file: packet-pkixtsp-hfarr.c ---*/
424 #line 1 "packet-pkixtsp-hfarr.c"
425 { &hf_pkixtsp_TSTInfo_PDU,
426 { "TSTInfo", "pkixtsp.TSTInfo",
427 FT_NONE, BASE_NONE, NULL, 0,
428 "pkixtsp.TSTInfo", HFILL }},
429 { &hf_pkixtsp_version,
430 { "version", "pkixtsp.version",
431 FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0,
432 "pkixtsp.T_version", HFILL }},
433 { &hf_pkixtsp_messageImprint,
434 { "messageImprint", "pkixtsp.messageImprint",
435 FT_NONE, BASE_NONE, NULL, 0,
436 "pkixtsp.MessageImprint", HFILL }},
437 { &hf_pkixtsp_reqPolicy,
438 { "reqPolicy", "pkixtsp.reqPolicy",
439 FT_OID, BASE_NONE, NULL, 0,
440 "pkixtsp.TSAPolicyId", HFILL }},
442 { "nonce", "pkixtsp.nonce",
443 FT_INT32, BASE_DEC, NULL, 0,
444 "pkixtsp.INTEGER", HFILL }},
445 { &hf_pkixtsp_certReq,
446 { "certReq", "pkixtsp.certReq",
447 FT_BOOLEAN, BASE_NONE, NULL, 0,
448 "pkixtsp.BOOLEAN", HFILL }},
449 { &hf_pkixtsp_extensions,
450 { "extensions", "pkixtsp.extensions",
451 FT_UINT32, BASE_DEC, NULL, 0,
452 "pkix1explicit.Extensions", HFILL }},
453 { &hf_pkixtsp_hashAlgorithm,
454 { "hashAlgorithm", "pkixtsp.hashAlgorithm",
455 FT_NONE, BASE_NONE, NULL, 0,
456 "pkix1explicit.AlgorithmIdentifier", HFILL }},
457 { &hf_pkixtsp_hashedMessage,
458 { "hashedMessage", "pkixtsp.hashedMessage",
459 FT_BYTES, BASE_NONE, NULL, 0,
460 "pkixtsp.OCTET_STRING", HFILL }},
461 { &hf_pkixtsp_status,
462 { "status", "pkixtsp.status",
463 FT_NONE, BASE_NONE, NULL, 0,
464 "pkixtsp.PKIStatusInfo", HFILL }},
465 { &hf_pkixtsp_timeStampToken,
466 { "timeStampToken", "pkixtsp.timeStampToken",
467 FT_NONE, BASE_NONE, NULL, 0,
468 "pkixtsp.TimeStampToken", HFILL }},
469 { &hf_pkixtsp_pki_status,
470 { "status", "pkixtsp.status",
471 FT_INT32, BASE_DEC, VALS(pkixtsp_PKIStatus_vals), 0,
472 "pkixtsp.PKIStatus", HFILL }},
473 { &hf_pkixtsp_failInfo,
474 { "failInfo", "pkixtsp.failInfo",
475 FT_BYTES, BASE_NONE, NULL, 0,
476 "pkixtsp.PKIFailureInfo", HFILL }},
477 { &hf_pkixtsp_tst_version,
478 { "version", "pkixtsp.version",
479 FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0,
480 "pkixtsp.Tst_version", HFILL }},
481 { &hf_pkixtsp_policy,
482 { "policy", "pkixtsp.policy",
483 FT_OID, BASE_NONE, NULL, 0,
484 "pkixtsp.TSAPolicyId", HFILL }},
485 { &hf_pkixtsp_serialNumber,
486 { "serialNumber", "pkixtsp.serialNumber",
487 FT_INT32, BASE_DEC, NULL, 0,
488 "pkixtsp.INTEGER", HFILL }},
489 { &hf_pkixtsp_genTime,
490 { "genTime", "pkixtsp.genTime",
491 FT_STRING, BASE_NONE, NULL, 0,
492 "pkixtsp.GeneralizedTime", HFILL }},
493 { &hf_pkixtsp_accuracy,
494 { "accuracy", "pkixtsp.accuracy",
495 FT_NONE, BASE_NONE, NULL, 0,
496 "pkixtsp.Accuracy", HFILL }},
497 { &hf_pkixtsp_ordering,
498 { "ordering", "pkixtsp.ordering",
499 FT_BOOLEAN, BASE_NONE, NULL, 0,
500 "pkixtsp.BOOLEAN", HFILL }},
502 { "tsa", "pkixtsp.tsa",
503 FT_UINT32, BASE_DEC, NULL, 0,
504 "pkix1implicit.GeneralName", HFILL }},
505 { &hf_pkixtsp_seconds,
506 { "seconds", "pkixtsp.seconds",
507 FT_INT32, BASE_DEC, NULL, 0,
508 "pkixtsp.INTEGER", HFILL }},
509 { &hf_pkixtsp_millis,
510 { "millis", "pkixtsp.millis",
511 FT_UINT32, BASE_DEC, NULL, 0,
512 "pkixtsp.INTEGER_1_999", HFILL }},
513 { &hf_pkixtsp_micros,
514 { "micros", "pkixtsp.micros",
515 FT_UINT32, BASE_DEC, NULL, 0,
516 "pkixtsp.INTEGER_1_999", HFILL }},
517 { &hf_pkixtsp_PKIFailureInfo_badAlg,
518 { "badAlg", "pkixtsp.badAlg",
519 FT_BOOLEAN, 8, NULL, 0x80,
521 { &hf_pkixtsp_PKIFailureInfo_badRequest,
522 { "badRequest", "pkixtsp.badRequest",
523 FT_BOOLEAN, 8, NULL, 0x20,
525 { &hf_pkixtsp_PKIFailureInfo_badDataFormat,
526 { "badDataFormat", "pkixtsp.badDataFormat",
527 FT_BOOLEAN, 8, NULL, 0x04,
529 { &hf_pkixtsp_PKIFailureInfo_timeNotAvailable,
530 { "timeNotAvailable", "pkixtsp.timeNotAvailable",
531 FT_BOOLEAN, 8, NULL, 0x02,
533 { &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy,
534 { "unacceptedPolicy", "pkixtsp.unacceptedPolicy",
535 FT_BOOLEAN, 8, NULL, 0x01,
537 { &hf_pkixtsp_PKIFailureInfo_unacceptedExtension,
538 { "unacceptedExtension", "pkixtsp.unacceptedExtension",
539 FT_BOOLEAN, 8, NULL, 0x80,
541 { &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable,
542 { "addInfoNotAvailable", "pkixtsp.addInfoNotAvailable",
543 FT_BOOLEAN, 8, NULL, 0x40,
545 { &hf_pkixtsp_PKIFailureInfo_systemFailure,
546 { "systemFailure", "pkixtsp.systemFailure",
547 FT_BOOLEAN, 8, NULL, 0x40,
550 /*--- End of included file: packet-pkixtsp-hfarr.c ---*/
551 #line 118 "packet-pkixtsp-template.c"
554 /* List of subtrees */
555 static gint *ett[] = {
558 /*--- Included file: packet-pkixtsp-ettarr.c ---*/
559 #line 1 "packet-pkixtsp-ettarr.c"
560 &ett_pkixtsp_TimeStampReq,
561 &ett_pkixtsp_MessageImprint,
562 &ett_pkixtsp_TimeStampResp,
563 &ett_pkixtsp_PKIStatusInfo,
564 &ett_pkixtsp_PKIFailureInfo,
565 &ett_pkixtsp_TSTInfo,
566 &ett_pkixtsp_Accuracy,
568 /*--- End of included file: packet-pkixtsp-ettarr.c ---*/
569 #line 124 "packet-pkixtsp-template.c"
572 /* Register protocol */
573 proto_pkixtsp = proto_register_protocol(PNAME, PSNAME, PFNAME);
575 /* Register fields and subtrees */
576 proto_register_field_array(proto_pkixtsp, hf, array_length(hf));
577 proto_register_subtree_array(ett, array_length(ett));
582 /*--- proto_reg_handoff_pkixtsp -------------------------------------------*/
583 void proto_reg_handoff_pkixtsp(void) {
584 dissector_handle_t timestamp_reply_handle;
585 dissector_handle_t timestamp_query_handle;
587 timestamp_reply_handle = new_create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
588 dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle);
590 timestamp_query_handle = new_create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
591 dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle);
594 /*--- Included file: packet-pkixtsp-dis-tab.c ---*/
595 #line 1 "packet-pkixtsp-dis-tab.c"
596 register_ber_oid_dissector("1.2.840.113549.1.9.16.1.4", dissect_TSTInfo_PDU, proto_pkixtsp, "id-ct-TSTInfo");
599 /*--- End of included file: packet-pkixtsp-dis-tab.c ---*/
600 #line 148 "packet-pkixtsp-template.c"