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 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_version = -1; /* T_version */
61 static int hf_pkixtsp_messageImprint = -1; /* MessageImprint */
62 static int hf_pkixtsp_reqPolicy = -1; /* TSAPolicyId */
63 static int hf_pkixtsp_nonce = -1; /* INTEGER */
64 static int hf_pkixtsp_certReq = -1; /* BOOLEAN */
65 static int hf_pkixtsp_extensions = -1; /* Extensions */
66 static int hf_pkixtsp_hashAlgorithm = -1; /* AlgorithmIdentifier */
67 static int hf_pkixtsp_hashedMessage = -1; /* OCTET_STRING */
68 static int hf_pkixtsp_status = -1; /* PKIStatusInfo */
69 static int hf_pkixtsp_timeStampToken = -1; /* TimeStampToken */
70 static int hf_pkixtsp_pki_status = -1; /* PKIStatus */
71 static int hf_pkixtsp_failInfo = -1; /* PKIFailureInfo */
72 static int hf_pkixtsp_tst_version = -1; /* Tst_version */
73 static int hf_pkixtsp_policy = -1; /* TSAPolicyId */
74 static int hf_pkixtsp_serialNumber = -1; /* INTEGER */
75 static int hf_pkixtsp_genTime = -1; /* GeneralizedTime */
76 static int hf_pkixtsp_accuracy = -1; /* Accuracy */
77 static int hf_pkixtsp_ordering = -1; /* BOOLEAN */
78 static int hf_pkixtsp_tsa = -1; /* GeneralName */
79 static int hf_pkixtsp_seconds = -1; /* INTEGER */
80 static int hf_pkixtsp_millis = -1; /* INTEGER_1_999 */
81 static int hf_pkixtsp_micros = -1; /* INTEGER_1_999 */
83 static int hf_pkixtsp_PKIFailureInfo_badAlg = -1;
84 static int hf_pkixtsp_PKIFailureInfo_badRequest = -1;
85 static int hf_pkixtsp_PKIFailureInfo_badDataFormat = -1;
86 static int hf_pkixtsp_PKIFailureInfo_timeNotAvailable = -1;
87 static int hf_pkixtsp_PKIFailureInfo_unacceptedPolicy = -1;
88 static int hf_pkixtsp_PKIFailureInfo_unacceptedExtension = -1;
89 static int hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable = -1;
90 static int hf_pkixtsp_PKIFailureInfo_systemFailure = -1;
92 /*--- End of included file: packet-pkixtsp-hf.c ---*/
93 #line 50 "packet-pkixtsp-template.c"
95 /* Initialize the subtree pointers */
96 static gint ett_pkixtsp = -1;
98 /*--- Included file: packet-pkixtsp-ett.c ---*/
99 #line 1 "packet-pkixtsp-ett.c"
100 static gint ett_pkixtsp_TimeStampReq = -1;
101 static gint ett_pkixtsp_MessageImprint = -1;
102 static gint ett_pkixtsp_TimeStampResp = -1;
103 static gint ett_pkixtsp_PKIStatusInfo = -1;
104 static gint ett_pkixtsp_PKIFailureInfo = -1;
105 static gint ett_pkixtsp_TSTInfo = -1;
106 static gint ett_pkixtsp_Accuracy = -1;
108 /*--- End of included file: packet-pkixtsp-ett.c ---*/
109 #line 54 "packet-pkixtsp-template.c"
113 /*--- Included file: packet-pkixtsp-fn.c ---*/
114 #line 1 "packet-pkixtsp-fn.c"
116 static const value_string pkixtsp_T_version_vals[] = {
123 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_) {
124 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
133 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_) {
134 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
141 static const ber_sequence_t MessageImprint_sequence[] = {
142 { &hf_pkixtsp_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
143 { &hf_pkixtsp_hashedMessage, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_OCTET_STRING },
144 { NULL, 0, 0, 0, NULL }
148 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_) {
149 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
150 MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint);
158 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_) {
159 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
167 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_) {
168 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
177 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_) {
178 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
184 static const ber_sequence_t TimeStampReq_sequence[] = {
185 { &hf_pkixtsp_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_T_version },
186 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
187 { &hf_pkixtsp_reqPolicy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
188 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
189 { &hf_pkixtsp_certReq , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
190 { &hf_pkixtsp_extensions , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
191 { NULL, 0, 0, 0, NULL }
195 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_) {
196 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
197 TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq);
203 static const value_string pkixtsp_PKIStatus_vals[] = {
205 { 1, "grantedWithMods" },
208 { 4, "revocationWarning" },
209 { 5, "revocationNotification" },
215 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_) {
216 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
223 static const asn_namedbit PKIFailureInfo_bits[] = {
224 { 0, &hf_pkixtsp_PKIFailureInfo_badAlg, -1, -1, "badAlg", NULL },
225 { 2, &hf_pkixtsp_PKIFailureInfo_badRequest, -1, -1, "badRequest", NULL },
226 { 5, &hf_pkixtsp_PKIFailureInfo_badDataFormat, -1, -1, "badDataFormat", NULL },
227 { 14, &hf_pkixtsp_PKIFailureInfo_timeNotAvailable, -1, -1, "timeNotAvailable", NULL },
228 { 15, &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy, -1, -1, "unacceptedPolicy", NULL },
229 { 16, &hf_pkixtsp_PKIFailureInfo_unacceptedExtension, -1, -1, "unacceptedExtension", NULL },
230 { 17, &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable, -1, -1, "addInfoNotAvailable", NULL },
231 { 25, &hf_pkixtsp_PKIFailureInfo_systemFailure, -1, -1, "systemFailure", NULL },
232 { 0, NULL, 0, 0, NULL, NULL }
236 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_) {
237 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
238 PKIFailureInfo_bits, hf_index, ett_pkixtsp_PKIFailureInfo,
245 static const ber_sequence_t PKIStatusInfo_sequence[] = {
246 { &hf_pkixtsp_pki_status , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatus },
247 { &hf_pkixtsp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIFailureInfo },
248 { NULL, 0, 0, 0, NULL }
252 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_) {
253 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
254 PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo);
262 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_) {
263 offset = dissect_cms_ContentInfo(implicit_tag, tvb, offset, actx, tree, hf_index);
269 static const ber_sequence_t TimeStampResp_sequence[] = {
270 { &hf_pkixtsp_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatusInfo },
271 { &hf_pkixtsp_timeStampToken, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TimeStampToken },
272 { NULL, 0, 0, 0, NULL }
276 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_) {
277 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
278 TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp);
284 static const value_string pkixtsp_Tst_version_vals[] = {
291 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_) {
292 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
301 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_) {
302 offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
310 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_) {
311 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
318 static const ber_sequence_t Accuracy_sequence[] = {
319 { &hf_pkixtsp_seconds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
320 { &hf_pkixtsp_millis , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
321 { &hf_pkixtsp_micros , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 },
322 { NULL, 0, 0, 0, NULL }
326 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_) {
327 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
328 Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy);
334 static const ber_sequence_t TSTInfo_sequence[] = {
335 { &hf_pkixtsp_tst_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Tst_version },
336 { &hf_pkixtsp_policy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId },
337 { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint },
338 { &hf_pkixtsp_serialNumber, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
339 { &hf_pkixtsp_genTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_GeneralizedTime },
340 { &hf_pkixtsp_accuracy , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Accuracy },
341 { &hf_pkixtsp_ordering , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN },
342 { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER },
343 { &hf_pkixtsp_tsa , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName },
344 { &hf_pkixtsp_extensions , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions },
345 { NULL, 0, 0, 0, NULL }
349 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_) {
350 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
351 TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo);
357 /*--- End of included file: packet-pkixtsp-fn.c ---*/
358 #line 57 "packet-pkixtsp-template.c"
362 dissect_timestamp_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
364 proto_item *item=NULL;
365 proto_tree *tree=NULL;
367 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
369 if (check_col(pinfo->cinfo, COL_PROTOCOL))
370 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
372 if (check_col(pinfo->cinfo, COL_INFO)) {
373 col_clear(pinfo->cinfo, COL_INFO);
375 col_set_str(pinfo->cinfo, COL_INFO, "Reply");
380 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
381 tree = proto_item_add_subtree(item, ett_pkixtsp);
384 return dissect_pkixtsp_TimeStampResp(FALSE, tvb, 0, &asn1_ctx, tree, -1);
388 dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
390 proto_item *item=NULL;
391 proto_tree *tree=NULL;
393 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
395 if (check_col(pinfo->cinfo, COL_PROTOCOL))
396 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP");
398 if (check_col(pinfo->cinfo, COL_INFO)) {
399 col_clear(pinfo->cinfo, COL_INFO);
401 col_set_str(pinfo->cinfo, COL_INFO, "Query");
406 item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, FALSE);
407 tree = proto_item_add_subtree(item, ett_pkixtsp);
410 return dissect_pkixtsp_TimeStampReq(FALSE, tvb, 0, &asn1_ctx, tree, -1);
414 /*--- proto_register_pkixtsp ----------------------------------------------*/
415 void proto_register_pkixtsp(void) {
418 static hf_register_info hf[] = {
420 /*--- Included file: packet-pkixtsp-hfarr.c ---*/
421 #line 1 "packet-pkixtsp-hfarr.c"
422 { &hf_pkixtsp_version,
423 { "version", "pkixtsp.version",
424 FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0,
425 "pkixtsp.T_version", HFILL }},
426 { &hf_pkixtsp_messageImprint,
427 { "messageImprint", "pkixtsp.messageImprint",
428 FT_NONE, BASE_NONE, NULL, 0,
429 "pkixtsp.MessageImprint", HFILL }},
430 { &hf_pkixtsp_reqPolicy,
431 { "reqPolicy", "pkixtsp.reqPolicy",
432 FT_OID, BASE_NONE, NULL, 0,
433 "pkixtsp.TSAPolicyId", HFILL }},
435 { "nonce", "pkixtsp.nonce",
436 FT_INT32, BASE_DEC, NULL, 0,
437 "pkixtsp.INTEGER", HFILL }},
438 { &hf_pkixtsp_certReq,
439 { "certReq", "pkixtsp.certReq",
440 FT_BOOLEAN, 8, NULL, 0,
441 "pkixtsp.BOOLEAN", HFILL }},
442 { &hf_pkixtsp_extensions,
443 { "extensions", "pkixtsp.extensions",
444 FT_UINT32, BASE_DEC, NULL, 0,
445 "pkix1explicit.Extensions", HFILL }},
446 { &hf_pkixtsp_hashAlgorithm,
447 { "hashAlgorithm", "pkixtsp.hashAlgorithm",
448 FT_NONE, BASE_NONE, NULL, 0,
449 "pkix1explicit.AlgorithmIdentifier", HFILL }},
450 { &hf_pkixtsp_hashedMessage,
451 { "hashedMessage", "pkixtsp.hashedMessage",
452 FT_BYTES, BASE_HEX, NULL, 0,
453 "pkixtsp.OCTET_STRING", HFILL }},
454 { &hf_pkixtsp_status,
455 { "status", "pkixtsp.status",
456 FT_NONE, BASE_NONE, NULL, 0,
457 "pkixtsp.PKIStatusInfo", HFILL }},
458 { &hf_pkixtsp_timeStampToken,
459 { "timeStampToken", "pkixtsp.timeStampToken",
460 FT_NONE, BASE_NONE, NULL, 0,
461 "pkixtsp.TimeStampToken", HFILL }},
462 { &hf_pkixtsp_pki_status,
463 { "status", "pkixtsp.status",
464 FT_INT32, BASE_DEC, VALS(pkixtsp_PKIStatus_vals), 0,
465 "pkixtsp.PKIStatus", HFILL }},
466 { &hf_pkixtsp_failInfo,
467 { "failInfo", "pkixtsp.failInfo",
468 FT_BYTES, BASE_HEX, NULL, 0,
469 "pkixtsp.PKIFailureInfo", HFILL }},
470 { &hf_pkixtsp_tst_version,
471 { "version", "pkixtsp.version",
472 FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0,
473 "pkixtsp.Tst_version", HFILL }},
474 { &hf_pkixtsp_policy,
475 { "policy", "pkixtsp.policy",
476 FT_OID, BASE_NONE, NULL, 0,
477 "pkixtsp.TSAPolicyId", HFILL }},
478 { &hf_pkixtsp_serialNumber,
479 { "serialNumber", "pkixtsp.serialNumber",
480 FT_INT32, BASE_DEC, NULL, 0,
481 "pkixtsp.INTEGER", HFILL }},
482 { &hf_pkixtsp_genTime,
483 { "genTime", "pkixtsp.genTime",
484 FT_STRING, BASE_NONE, NULL, 0,
485 "pkixtsp.GeneralizedTime", HFILL }},
486 { &hf_pkixtsp_accuracy,
487 { "accuracy", "pkixtsp.accuracy",
488 FT_NONE, BASE_NONE, NULL, 0,
489 "pkixtsp.Accuracy", HFILL }},
490 { &hf_pkixtsp_ordering,
491 { "ordering", "pkixtsp.ordering",
492 FT_BOOLEAN, 8, NULL, 0,
493 "pkixtsp.BOOLEAN", HFILL }},
495 { "tsa", "pkixtsp.tsa",
496 FT_UINT32, BASE_DEC, NULL, 0,
497 "pkix1implicit.GeneralName", HFILL }},
498 { &hf_pkixtsp_seconds,
499 { "seconds", "pkixtsp.seconds",
500 FT_INT32, BASE_DEC, NULL, 0,
501 "pkixtsp.INTEGER", HFILL }},
502 { &hf_pkixtsp_millis,
503 { "millis", "pkixtsp.millis",
504 FT_UINT32, BASE_DEC, NULL, 0,
505 "pkixtsp.INTEGER_1_999", HFILL }},
506 { &hf_pkixtsp_micros,
507 { "micros", "pkixtsp.micros",
508 FT_UINT32, BASE_DEC, NULL, 0,
509 "pkixtsp.INTEGER_1_999", HFILL }},
510 { &hf_pkixtsp_PKIFailureInfo_badAlg,
511 { "badAlg", "pkixtsp.badAlg",
512 FT_BOOLEAN, 8, NULL, 0x80,
514 { &hf_pkixtsp_PKIFailureInfo_badRequest,
515 { "badRequest", "pkixtsp.badRequest",
516 FT_BOOLEAN, 8, NULL, 0x20,
518 { &hf_pkixtsp_PKIFailureInfo_badDataFormat,
519 { "badDataFormat", "pkixtsp.badDataFormat",
520 FT_BOOLEAN, 8, NULL, 0x04,
522 { &hf_pkixtsp_PKIFailureInfo_timeNotAvailable,
523 { "timeNotAvailable", "pkixtsp.timeNotAvailable",
524 FT_BOOLEAN, 8, NULL, 0x02,
526 { &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy,
527 { "unacceptedPolicy", "pkixtsp.unacceptedPolicy",
528 FT_BOOLEAN, 8, NULL, 0x01,
530 { &hf_pkixtsp_PKIFailureInfo_unacceptedExtension,
531 { "unacceptedExtension", "pkixtsp.unacceptedExtension",
532 FT_BOOLEAN, 8, NULL, 0x80,
534 { &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable,
535 { "addInfoNotAvailable", "pkixtsp.addInfoNotAvailable",
536 FT_BOOLEAN, 8, NULL, 0x40,
538 { &hf_pkixtsp_PKIFailureInfo_systemFailure,
539 { "systemFailure", "pkixtsp.systemFailure",
540 FT_BOOLEAN, 8, NULL, 0x40,
543 /*--- End of included file: packet-pkixtsp-hfarr.c ---*/
544 #line 118 "packet-pkixtsp-template.c"
547 /* List of subtrees */
548 static gint *ett[] = {
551 /*--- Included file: packet-pkixtsp-ettarr.c ---*/
552 #line 1 "packet-pkixtsp-ettarr.c"
553 &ett_pkixtsp_TimeStampReq,
554 &ett_pkixtsp_MessageImprint,
555 &ett_pkixtsp_TimeStampResp,
556 &ett_pkixtsp_PKIStatusInfo,
557 &ett_pkixtsp_PKIFailureInfo,
558 &ett_pkixtsp_TSTInfo,
559 &ett_pkixtsp_Accuracy,
561 /*--- End of included file: packet-pkixtsp-ettarr.c ---*/
562 #line 124 "packet-pkixtsp-template.c"
565 /* Register protocol */
566 proto_pkixtsp = proto_register_protocol(PNAME, PSNAME, PFNAME);
568 /* Register fields and subtrees */
569 proto_register_field_array(proto_pkixtsp, hf, array_length(hf));
570 proto_register_subtree_array(ett, array_length(ett));
575 /*--- proto_reg_handoff_pkixtsp -------------------------------------------*/
576 void proto_reg_handoff_pkixtsp(void) {
577 dissector_handle_t timestamp_reply_handle;
578 dissector_handle_t timestamp_query_handle;
580 timestamp_reply_handle = new_create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
581 dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle);
583 timestamp_query_handle = new_create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
584 dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle);
586 /*#include "packet-pkixtsp-dis-tab.c"*/