/src/wireshark/epan/dissectors/packet-pkixtsp.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-pkixtsp.c */ |
4 | | /* asn2wrs.py -b -q -L -p pkixtsp -c ./pkixtsp.cnf -s ./packet-pkixtsp-template -D . -O ../.. PKIXTSP.asn */ |
5 | | |
6 | | /* packet-pkixtsp.c |
7 | | * Routines for RFC2634 Extended Security Services 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 | | |
21 | | #include <epan/asn1.h> |
22 | | #include <wsutil/array.h> |
23 | | #include "packet-ber.h" |
24 | | #include "packet-pkix1explicit.h" |
25 | | #include "packet-pkix1implicit.h" |
26 | | #include "packet-cms.h" |
27 | | |
28 | | void proto_register_pkixtsp(void); |
29 | | void proto_reg_handoff_pkixtsp(void); |
30 | | |
31 | | static dissector_handle_t timestamp_reply_handle; |
32 | | static dissector_handle_t timestamp_query_handle; |
33 | | |
34 | | /* Initialize the protocol and registered fields */ |
35 | | static int proto_pkixtsp; |
36 | | static int hf_pkixtsp_TimeStampReq_PDU; /* TimeStampReq */ |
37 | | static int hf_pkixtsp_TimeStampResp_PDU; /* TimeStampResp */ |
38 | | static int hf_pkixtsp_TSTInfo_PDU; /* TSTInfo */ |
39 | | static int hf_pkixtsp_SignatureTimeStampToken_PDU; /* SignatureTimeStampToken */ |
40 | | static int hf_pkixtsp_version; /* T_version */ |
41 | | static int hf_pkixtsp_messageImprint; /* MessageImprint */ |
42 | | static int hf_pkixtsp_reqPolicy; /* TSAPolicyId */ |
43 | | static int hf_pkixtsp_nonce; /* INTEGER */ |
44 | | static int hf_pkixtsp_certReq; /* BOOLEAN */ |
45 | | static int hf_pkixtsp_extensions; /* Extensions */ |
46 | | static int hf_pkixtsp_hashAlgorithm; /* AlgorithmIdentifier */ |
47 | | static int hf_pkixtsp_hashedMessage; /* OCTET_STRING */ |
48 | | static int hf_pkixtsp_status; /* PKIStatusInfo */ |
49 | | static int hf_pkixtsp_timeStampToken; /* TimeStampToken */ |
50 | | static int hf_pkixtsp_pki_status; /* PKIStatus */ |
51 | | static int hf_pkixtsp_failInfo; /* PKIFailureInfo */ |
52 | | static int hf_pkixtsp_tst_version; /* Tst_version */ |
53 | | static int hf_pkixtsp_policy; /* TSAPolicyId */ |
54 | | static int hf_pkixtsp_serialNumber; /* INTEGER */ |
55 | | static int hf_pkixtsp_genTime; /* GeneralizedTime */ |
56 | | static int hf_pkixtsp_accuracy; /* Accuracy */ |
57 | | static int hf_pkixtsp_ordering; /* BOOLEAN */ |
58 | | static int hf_pkixtsp_tsa; /* GeneralName */ |
59 | | static int hf_pkixtsp_seconds; /* INTEGER */ |
60 | | static int hf_pkixtsp_millis; /* INTEGER_1_999 */ |
61 | | static int hf_pkixtsp_micros; /* INTEGER_1_999 */ |
62 | | /* named bits */ |
63 | | static int hf_pkixtsp_PKIFailureInfo_badAlg; |
64 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit1; |
65 | | static int hf_pkixtsp_PKIFailureInfo_badRequest; |
66 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit3; |
67 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit4; |
68 | | static int hf_pkixtsp_PKIFailureInfo_badDataFormat; |
69 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit6; |
70 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit7; |
71 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit8; |
72 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit9; |
73 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit10; |
74 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit11; |
75 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit12; |
76 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit13; |
77 | | static int hf_pkixtsp_PKIFailureInfo_timeNotAvailable; |
78 | | static int hf_pkixtsp_PKIFailureInfo_unacceptedPolicy; |
79 | | static int hf_pkixtsp_PKIFailureInfo_unacceptedExtension; |
80 | | static int hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable; |
81 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit18; |
82 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit19; |
83 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit20; |
84 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit21; |
85 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit22; |
86 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit23; |
87 | | static int hf_pkixtsp_PKIFailureInfo_spare_bit24; |
88 | | static int hf_pkixtsp_PKIFailureInfo_systemFailure; |
89 | | |
90 | | /* Initialize the subtree pointers */ |
91 | | static int ett_pkixtsp; |
92 | | static int ett_pkixtsp_TimeStampReq; |
93 | | static int ett_pkixtsp_MessageImprint; |
94 | | static int ett_pkixtsp_TimeStampResp; |
95 | | static int ett_pkixtsp_PKIStatusInfo; |
96 | | static int ett_pkixtsp_PKIFailureInfo; |
97 | | static int ett_pkixtsp_TSTInfo; |
98 | | static int ett_pkixtsp_Accuracy; |
99 | | |
100 | | |
101 | | |
102 | | static const value_string pkixtsp_T_version_vals[] = { |
103 | | { 1, "v1" }, |
104 | | { 0, NULL } |
105 | | }; |
106 | | |
107 | | |
108 | | static unsigned |
109 | 0 | dissect_pkixtsp_T_version(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
110 | 0 | offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, |
111 | 0 | NULL); |
112 | |
|
113 | 0 | return offset; |
114 | 0 | } |
115 | | |
116 | | |
117 | | |
118 | | static unsigned |
119 | 0 | dissect_pkixtsp_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_) { |
120 | 0 | offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, |
121 | 0 | NULL); |
122 | |
|
123 | 0 | return offset; |
124 | 0 | } |
125 | | |
126 | | |
127 | | static const ber_sequence_t MessageImprint_sequence[] = { |
128 | | { &hf_pkixtsp_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, |
129 | | { &hf_pkixtsp_hashedMessage, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_OCTET_STRING }, |
130 | | { NULL, 0, 0, 0, NULL } |
131 | | }; |
132 | | |
133 | | static unsigned |
134 | 0 | dissect_pkixtsp_MessageImprint(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
135 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
136 | 0 | MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint); |
137 | |
|
138 | 0 | return offset; |
139 | 0 | } |
140 | | |
141 | | |
142 | | |
143 | | static unsigned |
144 | 0 | dissect_pkixtsp_TSAPolicyId(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
145 | 0 | offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); |
146 | |
|
147 | 0 | return offset; |
148 | 0 | } |
149 | | |
150 | | |
151 | | |
152 | | static unsigned |
153 | 0 | dissect_pkixtsp_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_) { |
154 | 0 | offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, |
155 | 0 | NULL); |
156 | |
|
157 | 0 | return offset; |
158 | 0 | } |
159 | | |
160 | | |
161 | | |
162 | | static unsigned |
163 | 0 | dissect_pkixtsp_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_) { |
164 | 0 | offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); |
165 | |
|
166 | 0 | return offset; |
167 | 0 | } |
168 | | |
169 | | |
170 | | static const ber_sequence_t TimeStampReq_sequence[] = { |
171 | | { &hf_pkixtsp_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_T_version }, |
172 | | { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint }, |
173 | | { &hf_pkixtsp_reqPolicy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId }, |
174 | | { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, |
175 | | { &hf_pkixtsp_certReq , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN }, |
176 | | { &hf_pkixtsp_extensions , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions }, |
177 | | { NULL, 0, 0, 0, NULL } |
178 | | }; |
179 | | |
180 | | static unsigned |
181 | 0 | dissect_pkixtsp_TimeStampReq(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
182 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
183 | 0 | TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq); |
184 | |
|
185 | 0 | return offset; |
186 | 0 | } |
187 | | |
188 | | |
189 | | static const value_string pkixtsp_PKIStatus_vals[] = { |
190 | | { 0, "granted" }, |
191 | | { 1, "grantedWithMods" }, |
192 | | { 2, "rejection" }, |
193 | | { 3, "waiting" }, |
194 | | { 4, "revocationWarning" }, |
195 | | { 5, "revocationNotification" }, |
196 | | { 0, NULL } |
197 | | }; |
198 | | |
199 | | |
200 | | static unsigned |
201 | 0 | dissect_pkixtsp_PKIStatus(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
202 | 0 | offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, |
203 | 0 | NULL); |
204 | |
|
205 | 0 | return offset; |
206 | 0 | } |
207 | | |
208 | | |
209 | | static int * const PKIFailureInfo_bits[] = { |
210 | | &hf_pkixtsp_PKIFailureInfo_badAlg, |
211 | | &hf_pkixtsp_PKIFailureInfo_spare_bit1, |
212 | | &hf_pkixtsp_PKIFailureInfo_badRequest, |
213 | | &hf_pkixtsp_PKIFailureInfo_spare_bit3, |
214 | | &hf_pkixtsp_PKIFailureInfo_spare_bit4, |
215 | | &hf_pkixtsp_PKIFailureInfo_badDataFormat, |
216 | | &hf_pkixtsp_PKIFailureInfo_spare_bit6, |
217 | | &hf_pkixtsp_PKIFailureInfo_spare_bit7, |
218 | | &hf_pkixtsp_PKIFailureInfo_spare_bit8, |
219 | | &hf_pkixtsp_PKIFailureInfo_spare_bit9, |
220 | | &hf_pkixtsp_PKIFailureInfo_spare_bit10, |
221 | | &hf_pkixtsp_PKIFailureInfo_spare_bit11, |
222 | | &hf_pkixtsp_PKIFailureInfo_spare_bit12, |
223 | | &hf_pkixtsp_PKIFailureInfo_spare_bit13, |
224 | | &hf_pkixtsp_PKIFailureInfo_timeNotAvailable, |
225 | | &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy, |
226 | | &hf_pkixtsp_PKIFailureInfo_unacceptedExtension, |
227 | | &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable, |
228 | | &hf_pkixtsp_PKIFailureInfo_spare_bit18, |
229 | | &hf_pkixtsp_PKIFailureInfo_spare_bit19, |
230 | | &hf_pkixtsp_PKIFailureInfo_spare_bit20, |
231 | | &hf_pkixtsp_PKIFailureInfo_spare_bit21, |
232 | | &hf_pkixtsp_PKIFailureInfo_spare_bit22, |
233 | | &hf_pkixtsp_PKIFailureInfo_spare_bit23, |
234 | | &hf_pkixtsp_PKIFailureInfo_spare_bit24, |
235 | | &hf_pkixtsp_PKIFailureInfo_systemFailure, |
236 | | NULL |
237 | | }; |
238 | | |
239 | | static unsigned |
240 | 0 | dissect_pkixtsp_PKIFailureInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
241 | 0 | offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset, |
242 | 0 | PKIFailureInfo_bits, 26, hf_index, ett_pkixtsp_PKIFailureInfo, |
243 | 0 | NULL); |
244 | |
|
245 | 0 | return offset; |
246 | 0 | } |
247 | | |
248 | | |
249 | | static const ber_sequence_t PKIStatusInfo_sequence[] = { |
250 | | { &hf_pkixtsp_pki_status , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatus }, |
251 | | { &hf_pkixtsp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIFailureInfo }, |
252 | | { NULL, 0, 0, 0, NULL } |
253 | | }; |
254 | | |
255 | | static unsigned |
256 | 0 | dissect_pkixtsp_PKIStatusInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
257 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
258 | 0 | PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo); |
259 | |
|
260 | 0 | return offset; |
261 | 0 | } |
262 | | |
263 | | |
264 | | |
265 | | static unsigned |
266 | 0 | dissect_pkixtsp_TimeStampToken(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
267 | 0 | offset = dissect_cms_ContentInfo(implicit_tag, tvb, offset, actx, tree, hf_index); |
268 | |
|
269 | 0 | return offset; |
270 | 0 | } |
271 | | |
272 | | |
273 | | static const ber_sequence_t TimeStampResp_sequence[] = { |
274 | | { &hf_pkixtsp_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatusInfo }, |
275 | | { &hf_pkixtsp_timeStampToken, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TimeStampToken }, |
276 | | { NULL, 0, 0, 0, NULL } |
277 | | }; |
278 | | |
279 | | static unsigned |
280 | 0 | dissect_pkixtsp_TimeStampResp(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
281 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
282 | 0 | TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp); |
283 | |
|
284 | 0 | return offset; |
285 | 0 | } |
286 | | |
287 | | |
288 | | static const value_string pkixtsp_Tst_version_vals[] = { |
289 | | { 1, "v1" }, |
290 | | { 0, NULL } |
291 | | }; |
292 | | |
293 | | |
294 | | static unsigned |
295 | 0 | dissect_pkixtsp_Tst_version(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
296 | 0 | offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, |
297 | 0 | NULL); |
298 | |
|
299 | 0 | return offset; |
300 | 0 | } |
301 | | |
302 | | |
303 | | |
304 | | static unsigned |
305 | 0 | dissect_pkixtsp_GeneralizedTime(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
306 | 0 | offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index); |
307 | |
|
308 | 0 | return offset; |
309 | 0 | } |
310 | | |
311 | | |
312 | | |
313 | | static unsigned |
314 | 0 | dissect_pkixtsp_INTEGER_1_999(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_constrained_integer(implicit_tag, actx, tree, tvb, offset, |
316 | 0 | 1U, 999U, hf_index, NULL); |
317 | |
|
318 | 0 | return offset; |
319 | 0 | } |
320 | | |
321 | | |
322 | | static const ber_sequence_t Accuracy_sequence[] = { |
323 | | { &hf_pkixtsp_seconds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, |
324 | | { &hf_pkixtsp_millis , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 }, |
325 | | { &hf_pkixtsp_micros , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 }, |
326 | | { NULL, 0, 0, 0, NULL } |
327 | | }; |
328 | | |
329 | | static unsigned |
330 | 0 | dissect_pkixtsp_Accuracy(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 | Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy); |
333 | |
|
334 | 0 | return offset; |
335 | 0 | } |
336 | | |
337 | | |
338 | | static const ber_sequence_t TSTInfo_sequence[] = { |
339 | | { &hf_pkixtsp_tst_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Tst_version }, |
340 | | { &hf_pkixtsp_policy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId }, |
341 | | { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint }, |
342 | | { &hf_pkixtsp_serialNumber, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, |
343 | | { &hf_pkixtsp_genTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_GeneralizedTime }, |
344 | | { &hf_pkixtsp_accuracy , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Accuracy }, |
345 | | { &hf_pkixtsp_ordering , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN }, |
346 | | { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, |
347 | | { &hf_pkixtsp_tsa , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName }, |
348 | | { &hf_pkixtsp_extensions , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions }, |
349 | | { NULL, 0, 0, 0, NULL } |
350 | | }; |
351 | | |
352 | | static unsigned |
353 | 0 | dissect_pkixtsp_TSTInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
354 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
355 | 0 | TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo); |
356 | |
|
357 | 0 | return offset; |
358 | 0 | } |
359 | | |
360 | | |
361 | | |
362 | | static unsigned |
363 | 0 | dissect_pkixtsp_SignatureTimeStampToken(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
364 | 0 | offset = dissect_pkixtsp_TimeStampToken(implicit_tag, tvb, offset, actx, tree, hf_index); |
365 | |
|
366 | 0 | return offset; |
367 | 0 | } |
368 | | |
369 | | /*--- PDUs ---*/ |
370 | | |
371 | 0 | static int dissect_TimeStampReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
372 | 0 | unsigned offset = 0; |
373 | 0 | asn1_ctx_t asn1_ctx; |
374 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
375 | 0 | offset = dissect_pkixtsp_TimeStampReq(false, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_TimeStampReq_PDU); |
376 | 0 | return offset; |
377 | 0 | } |
378 | 0 | static int dissect_TimeStampResp_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
379 | 0 | unsigned offset = 0; |
380 | 0 | asn1_ctx_t asn1_ctx; |
381 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
382 | 0 | offset = dissect_pkixtsp_TimeStampResp(false, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_TimeStampResp_PDU); |
383 | 0 | return offset; |
384 | 0 | } |
385 | 0 | static int dissect_TSTInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
386 | 0 | unsigned offset = 0; |
387 | 0 | asn1_ctx_t asn1_ctx; |
388 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
389 | 0 | offset = dissect_pkixtsp_TSTInfo(false, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_TSTInfo_PDU); |
390 | 0 | return offset; |
391 | 0 | } |
392 | 0 | static int dissect_SignatureTimeStampToken_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
393 | 0 | unsigned offset = 0; |
394 | 0 | asn1_ctx_t asn1_ctx; |
395 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
396 | 0 | offset = dissect_pkixtsp_SignatureTimeStampToken(false, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_SignatureTimeStampToken_PDU); |
397 | 0 | return offset; |
398 | 0 | } |
399 | | |
400 | | |
401 | | |
402 | | static int |
403 | | dissect_timestamp_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) |
404 | 0 | { |
405 | 0 | proto_item *item=NULL; |
406 | 0 | proto_tree *tree=NULL; |
407 | 0 | asn1_ctx_t asn1_ctx; |
408 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
409 | |
|
410 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP"); |
411 | |
|
412 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "Reply"); |
413 | | |
414 | |
|
415 | 0 | if(parent_tree){ |
416 | 0 | item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, ENC_NA); |
417 | 0 | tree = proto_item_add_subtree(item, ett_pkixtsp); |
418 | 0 | } |
419 | |
|
420 | 0 | return dissect_pkixtsp_TimeStampResp(false, tvb, 0, &asn1_ctx, tree, -1); |
421 | 0 | } |
422 | | |
423 | | static int |
424 | | dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) |
425 | 0 | { |
426 | 0 | proto_item *item=NULL; |
427 | 0 | proto_tree *tree=NULL; |
428 | 0 | asn1_ctx_t asn1_ctx; |
429 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
430 | |
|
431 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIXTSP"); |
432 | |
|
433 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "Query"); |
434 | | |
435 | |
|
436 | 0 | if(parent_tree){ |
437 | 0 | item=proto_tree_add_item(parent_tree, proto_pkixtsp, tvb, 0, -1, ENC_NA); |
438 | 0 | tree = proto_item_add_subtree(item, ett_pkixtsp); |
439 | 0 | } |
440 | |
|
441 | 0 | return dissect_pkixtsp_TimeStampReq(false, tvb, 0, &asn1_ctx, tree, -1); |
442 | 0 | } |
443 | | |
444 | | |
445 | | /*--- proto_register_pkixtsp ----------------------------------------------*/ |
446 | 15 | void proto_register_pkixtsp(void) { |
447 | | |
448 | | /* List of fields */ |
449 | 15 | static hf_register_info hf[] = { |
450 | 15 | { &hf_pkixtsp_TimeStampReq_PDU, |
451 | 15 | { "TimeStampReq", "pkixtsp.TimeStampReq_element", |
452 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
453 | 15 | NULL, HFILL }}, |
454 | 15 | { &hf_pkixtsp_TimeStampResp_PDU, |
455 | 15 | { "TimeStampResp", "pkixtsp.TimeStampResp_element", |
456 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
457 | 15 | NULL, HFILL }}, |
458 | 15 | { &hf_pkixtsp_TSTInfo_PDU, |
459 | 15 | { "TSTInfo", "pkixtsp.TSTInfo_element", |
460 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
461 | 15 | NULL, HFILL }}, |
462 | 15 | { &hf_pkixtsp_SignatureTimeStampToken_PDU, |
463 | 15 | { "SignatureTimeStampToken", "pkixtsp.SignatureTimeStampToken_element", |
464 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
465 | 15 | NULL, HFILL }}, |
466 | 15 | { &hf_pkixtsp_version, |
467 | 15 | { "version", "pkixtsp.version", |
468 | 15 | FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0, |
469 | 15 | NULL, HFILL }}, |
470 | 15 | { &hf_pkixtsp_messageImprint, |
471 | 15 | { "messageImprint", "pkixtsp.messageImprint_element", |
472 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
473 | 15 | NULL, HFILL }}, |
474 | 15 | { &hf_pkixtsp_reqPolicy, |
475 | 15 | { "reqPolicy", "pkixtsp.reqPolicy", |
476 | 15 | FT_OID, BASE_NONE, NULL, 0, |
477 | 15 | "TSAPolicyId", HFILL }}, |
478 | 15 | { &hf_pkixtsp_nonce, |
479 | 15 | { "nonce", "pkixtsp.nonce", |
480 | 15 | FT_INT32, BASE_DEC, NULL, 0, |
481 | 15 | "INTEGER", HFILL }}, |
482 | 15 | { &hf_pkixtsp_certReq, |
483 | 15 | { "certReq", "pkixtsp.certReq", |
484 | 15 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
485 | 15 | "BOOLEAN", HFILL }}, |
486 | 15 | { &hf_pkixtsp_extensions, |
487 | 15 | { "extensions", "pkixtsp.extensions", |
488 | 15 | FT_UINT32, BASE_DEC, NULL, 0, |
489 | 15 | NULL, HFILL }}, |
490 | 15 | { &hf_pkixtsp_hashAlgorithm, |
491 | 15 | { "hashAlgorithm", "pkixtsp.hashAlgorithm_element", |
492 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
493 | 15 | "AlgorithmIdentifier", HFILL }}, |
494 | 15 | { &hf_pkixtsp_hashedMessage, |
495 | 15 | { "hashedMessage", "pkixtsp.hashedMessage", |
496 | 15 | FT_BYTES, BASE_NONE, NULL, 0, |
497 | 15 | "OCTET_STRING", HFILL }}, |
498 | 15 | { &hf_pkixtsp_status, |
499 | 15 | { "status", "pkixtsp.status_element", |
500 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
501 | 15 | "PKIStatusInfo", HFILL }}, |
502 | 15 | { &hf_pkixtsp_timeStampToken, |
503 | 15 | { "timeStampToken", "pkixtsp.timeStampToken_element", |
504 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
505 | 15 | NULL, HFILL }}, |
506 | 15 | { &hf_pkixtsp_pki_status, |
507 | 15 | { "status", "pkixtsp.pki_status", |
508 | 15 | FT_INT32, BASE_DEC, VALS(pkixtsp_PKIStatus_vals), 0, |
509 | 15 | "PKIStatus", HFILL }}, |
510 | 15 | { &hf_pkixtsp_failInfo, |
511 | 15 | { "failInfo", "pkixtsp.failInfo", |
512 | 15 | FT_BYTES, BASE_NONE, NULL, 0, |
513 | 15 | "PKIFailureInfo", HFILL }}, |
514 | 15 | { &hf_pkixtsp_tst_version, |
515 | 15 | { "version", "pkixtsp.tst_version", |
516 | 15 | FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0, |
517 | 15 | "Tst_version", HFILL }}, |
518 | 15 | { &hf_pkixtsp_policy, |
519 | 15 | { "policy", "pkixtsp.policy", |
520 | 15 | FT_OID, BASE_NONE, NULL, 0, |
521 | 15 | "TSAPolicyId", HFILL }}, |
522 | 15 | { &hf_pkixtsp_serialNumber, |
523 | 15 | { "serialNumber", "pkixtsp.serialNumber", |
524 | 15 | FT_INT32, BASE_DEC, NULL, 0, |
525 | 15 | "INTEGER", HFILL }}, |
526 | 15 | { &hf_pkixtsp_genTime, |
527 | 15 | { "genTime", "pkixtsp.genTime", |
528 | 15 | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, |
529 | 15 | "GeneralizedTime", HFILL }}, |
530 | 15 | { &hf_pkixtsp_accuracy, |
531 | 15 | { "accuracy", "pkixtsp.accuracy_element", |
532 | 15 | FT_NONE, BASE_NONE, NULL, 0, |
533 | 15 | NULL, HFILL }}, |
534 | 15 | { &hf_pkixtsp_ordering, |
535 | 15 | { "ordering", "pkixtsp.ordering", |
536 | 15 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
537 | 15 | "BOOLEAN", HFILL }}, |
538 | 15 | { &hf_pkixtsp_tsa, |
539 | 15 | { "tsa", "pkixtsp.tsa", |
540 | 15 | FT_UINT32, BASE_DEC, NULL, 0, |
541 | 15 | "GeneralName", HFILL }}, |
542 | 15 | { &hf_pkixtsp_seconds, |
543 | 15 | { "seconds", "pkixtsp.seconds", |
544 | 15 | FT_INT32, BASE_DEC, NULL, 0, |
545 | 15 | "INTEGER", HFILL }}, |
546 | 15 | { &hf_pkixtsp_millis, |
547 | 15 | { "millis", "pkixtsp.millis", |
548 | 15 | FT_UINT32, BASE_DEC, NULL, 0, |
549 | 15 | "INTEGER_1_999", HFILL }}, |
550 | 15 | { &hf_pkixtsp_micros, |
551 | 15 | { "micros", "pkixtsp.micros", |
552 | 15 | FT_UINT32, BASE_DEC, NULL, 0, |
553 | 15 | "INTEGER_1_999", HFILL }}, |
554 | 15 | { &hf_pkixtsp_PKIFailureInfo_badAlg, |
555 | 15 | { "badAlg", "pkixtsp.PKIFailureInfo.badAlg", |
556 | 15 | FT_BOOLEAN, 8, NULL, 0x80, |
557 | 15 | NULL, HFILL }}, |
558 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit1, |
559 | 15 | { "spare_bit1", "pkixtsp.PKIFailureInfo.spare.bit1", |
560 | 15 | FT_BOOLEAN, 8, NULL, 0x40, |
561 | 15 | NULL, HFILL }}, |
562 | 15 | { &hf_pkixtsp_PKIFailureInfo_badRequest, |
563 | 15 | { "badRequest", "pkixtsp.PKIFailureInfo.badRequest", |
564 | 15 | FT_BOOLEAN, 8, NULL, 0x20, |
565 | 15 | NULL, HFILL }}, |
566 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit3, |
567 | 15 | { "spare_bit3", "pkixtsp.PKIFailureInfo.spare.bit3", |
568 | 15 | FT_BOOLEAN, 8, NULL, 0x10, |
569 | 15 | NULL, HFILL }}, |
570 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit4, |
571 | 15 | { "spare_bit4", "pkixtsp.PKIFailureInfo.spare.bit4", |
572 | 15 | FT_BOOLEAN, 8, NULL, 0x08, |
573 | 15 | NULL, HFILL }}, |
574 | 15 | { &hf_pkixtsp_PKIFailureInfo_badDataFormat, |
575 | 15 | { "badDataFormat", "pkixtsp.PKIFailureInfo.badDataFormat", |
576 | 15 | FT_BOOLEAN, 8, NULL, 0x04, |
577 | 15 | NULL, HFILL }}, |
578 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit6, |
579 | 15 | { "spare_bit6", "pkixtsp.PKIFailureInfo.spare.bit6", |
580 | 15 | FT_BOOLEAN, 8, NULL, 0x02, |
581 | 15 | NULL, HFILL }}, |
582 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit7, |
583 | 15 | { "spare_bit7", "pkixtsp.PKIFailureInfo.spare.bit7", |
584 | 15 | FT_BOOLEAN, 8, NULL, 0x01, |
585 | 15 | NULL, HFILL }}, |
586 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit8, |
587 | 15 | { "spare_bit8", "pkixtsp.PKIFailureInfo.spare.bit8", |
588 | 15 | FT_BOOLEAN, 8, NULL, 0x80, |
589 | 15 | NULL, HFILL }}, |
590 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit9, |
591 | 15 | { "spare_bit9", "pkixtsp.PKIFailureInfo.spare.bit9", |
592 | 15 | FT_BOOLEAN, 8, NULL, 0x40, |
593 | 15 | NULL, HFILL }}, |
594 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit10, |
595 | 15 | { "spare_bit10", "pkixtsp.PKIFailureInfo.spare.bit10", |
596 | 15 | FT_BOOLEAN, 8, NULL, 0x20, |
597 | 15 | NULL, HFILL }}, |
598 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit11, |
599 | 15 | { "spare_bit11", "pkixtsp.PKIFailureInfo.spare.bit11", |
600 | 15 | FT_BOOLEAN, 8, NULL, 0x10, |
601 | 15 | NULL, HFILL }}, |
602 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit12, |
603 | 15 | { "spare_bit12", "pkixtsp.PKIFailureInfo.spare.bit12", |
604 | 15 | FT_BOOLEAN, 8, NULL, 0x08, |
605 | 15 | NULL, HFILL }}, |
606 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit13, |
607 | 15 | { "spare_bit13", "pkixtsp.PKIFailureInfo.spare.bit13", |
608 | 15 | FT_BOOLEAN, 8, NULL, 0x04, |
609 | 15 | NULL, HFILL }}, |
610 | 15 | { &hf_pkixtsp_PKIFailureInfo_timeNotAvailable, |
611 | 15 | { "timeNotAvailable", "pkixtsp.PKIFailureInfo.timeNotAvailable", |
612 | 15 | FT_BOOLEAN, 8, NULL, 0x02, |
613 | 15 | NULL, HFILL }}, |
614 | 15 | { &hf_pkixtsp_PKIFailureInfo_unacceptedPolicy, |
615 | 15 | { "unacceptedPolicy", "pkixtsp.PKIFailureInfo.unacceptedPolicy", |
616 | 15 | FT_BOOLEAN, 8, NULL, 0x01, |
617 | 15 | NULL, HFILL }}, |
618 | 15 | { &hf_pkixtsp_PKIFailureInfo_unacceptedExtension, |
619 | 15 | { "unacceptedExtension", "pkixtsp.PKIFailureInfo.unacceptedExtension", |
620 | 15 | FT_BOOLEAN, 8, NULL, 0x80, |
621 | 15 | NULL, HFILL }}, |
622 | 15 | { &hf_pkixtsp_PKIFailureInfo_addInfoNotAvailable, |
623 | 15 | { "addInfoNotAvailable", "pkixtsp.PKIFailureInfo.addInfoNotAvailable", |
624 | 15 | FT_BOOLEAN, 8, NULL, 0x40, |
625 | 15 | NULL, HFILL }}, |
626 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit18, |
627 | 15 | { "spare_bit18", "pkixtsp.PKIFailureInfo.spare.bit18", |
628 | 15 | FT_BOOLEAN, 8, NULL, 0x20, |
629 | 15 | NULL, HFILL }}, |
630 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit19, |
631 | 15 | { "spare_bit19", "pkixtsp.PKIFailureInfo.spare.bit19", |
632 | 15 | FT_BOOLEAN, 8, NULL, 0x10, |
633 | 15 | NULL, HFILL }}, |
634 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit20, |
635 | 15 | { "spare_bit20", "pkixtsp.PKIFailureInfo.spare.bit20", |
636 | 15 | FT_BOOLEAN, 8, NULL, 0x08, |
637 | 15 | NULL, HFILL }}, |
638 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit21, |
639 | 15 | { "spare_bit21", "pkixtsp.PKIFailureInfo.spare.bit21", |
640 | 15 | FT_BOOLEAN, 8, NULL, 0x04, |
641 | 15 | NULL, HFILL }}, |
642 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit22, |
643 | 15 | { "spare_bit22", "pkixtsp.PKIFailureInfo.spare.bit22", |
644 | 15 | FT_BOOLEAN, 8, NULL, 0x02, |
645 | 15 | NULL, HFILL }}, |
646 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit23, |
647 | 15 | { "spare_bit23", "pkixtsp.PKIFailureInfo.spare.bit23", |
648 | 15 | FT_BOOLEAN, 8, NULL, 0x01, |
649 | 15 | NULL, HFILL }}, |
650 | 15 | { &hf_pkixtsp_PKIFailureInfo_spare_bit24, |
651 | 15 | { "spare_bit24", "pkixtsp.PKIFailureInfo.spare.bit24", |
652 | 15 | FT_BOOLEAN, 8, NULL, 0x80, |
653 | 15 | NULL, HFILL }}, |
654 | 15 | { &hf_pkixtsp_PKIFailureInfo_systemFailure, |
655 | 15 | { "systemFailure", "pkixtsp.PKIFailureInfo.systemFailure", |
656 | 15 | FT_BOOLEAN, 8, NULL, 0x40, |
657 | 15 | NULL, HFILL }}, |
658 | 15 | }; |
659 | | |
660 | | /* List of subtrees */ |
661 | 15 | static int *ett[] = { |
662 | 15 | &ett_pkixtsp, |
663 | 15 | &ett_pkixtsp_TimeStampReq, |
664 | 15 | &ett_pkixtsp_MessageImprint, |
665 | 15 | &ett_pkixtsp_TimeStampResp, |
666 | 15 | &ett_pkixtsp_PKIStatusInfo, |
667 | 15 | &ett_pkixtsp_PKIFailureInfo, |
668 | 15 | &ett_pkixtsp_TSTInfo, |
669 | 15 | &ett_pkixtsp_Accuracy, |
670 | 15 | }; |
671 | | |
672 | | /* Register protocol */ |
673 | 15 | proto_pkixtsp = proto_register_protocol("PKIX Time Stamp Protocol", "PKIXTSP", "pkixtsp"); |
674 | | |
675 | | /* Register fields and subtrees */ |
676 | 15 | proto_register_field_array(proto_pkixtsp, hf, array_length(hf)); |
677 | 15 | proto_register_subtree_array(ett, array_length(ett)); |
678 | | |
679 | 15 | timestamp_reply_handle = register_dissector_with_description("pkixtsp_reply", "PKIXTSP Response", dissect_timestamp_reply, proto_pkixtsp); |
680 | 15 | timestamp_query_handle = register_dissector_with_description("pkixtsp_query", "PKIXTSP Request", dissect_timestamp_query, proto_pkixtsp); |
681 | | |
682 | 15 | register_ber_syntax_dissector("TimeStampReq", proto_pkixtsp, dissect_TimeStampReq_PDU); |
683 | 15 | register_ber_syntax_dissector("TimeStampResp", proto_pkixtsp, dissect_TimeStampResp_PDU); |
684 | | |
685 | 15 | register_ber_oid_syntax(".tsq", NULL, "TimeStampReq"); |
686 | 15 | register_ber_oid_syntax(".tsr", NULL, "TimeStampResp"); |
687 | 15 | } |
688 | | |
689 | | |
690 | | /*--- proto_reg_handoff_pkixtsp -------------------------------------------*/ |
691 | 15 | void proto_reg_handoff_pkixtsp(void) { |
692 | 15 | dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle); |
693 | 15 | dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle); |
694 | | |
695 | 15 | register_ber_oid_dissector("1.2.840.113549.1.9.16.2.14", dissect_SignatureTimeStampToken_PDU, proto_pkixtsp, "id-aa-timeStampToken"); |
696 | 15 | register_ber_oid_dissector("1.2.840.113549.1.9.16.1.4", dissect_TSTInfo_PDU, proto_pkixtsp, "id-ct-TSTInfo"); |
697 | | |
698 | 15 | } |
699 | | |