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