Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ts/ts_rsp_utils.c |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | /* $OpenBSD: ts_rsp_utils.c,v 1.7 2018/05/13 15:35:46 tb Exp $ */ | - | ||||||
2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL | - | ||||||
3 | * project 2002. | - | ||||||
4 | */ | - | ||||||
5 | /* ==================================================================== | - | ||||||
6 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | - | ||||||
7 | * | - | ||||||
8 | * Redistribution and use in source and binary forms, with or without | - | ||||||
9 | * modification, are permitted provided that the following conditions | - | ||||||
10 | * are met: | - | ||||||
11 | * | - | ||||||
12 | * 1. Redistributions of source code must retain the above copyright | - | ||||||
13 | * notice, this list of conditions and the following disclaimer. | - | ||||||
14 | * | - | ||||||
15 | * 2. Redistributions in binary form must reproduce the above copyright | - | ||||||
16 | * notice, this list of conditions and the following disclaimer in | - | ||||||
17 | * the documentation and/or other materials provided with the | - | ||||||
18 | * distribution. | - | ||||||
19 | * | - | ||||||
20 | * 3. All advertising materials mentioning features or use of this | - | ||||||
21 | * software must display the following acknowledgment: | - | ||||||
22 | * "This product includes software developed by the OpenSSL Project | - | ||||||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | - | ||||||
24 | * | - | ||||||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | - | ||||||
26 | * endorse or promote products derived from this software without | - | ||||||
27 | * prior written permission. For written permission, please contact | - | ||||||
28 | * licensing@OpenSSL.org. | - | ||||||
29 | * | - | ||||||
30 | * 5. Products derived from this software may not be called "OpenSSL" | - | ||||||
31 | * nor may "OpenSSL" appear in their names without prior written | - | ||||||
32 | * permission of the OpenSSL Project. | - | ||||||
33 | * | - | ||||||
34 | * 6. Redistributions of any form whatsoever must retain the following | - | ||||||
35 | * acknowledgment: | - | ||||||
36 | * "This product includes software developed by the OpenSSL Project | - | ||||||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | - | ||||||
38 | * | - | ||||||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | - | ||||||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | - | ||||||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | - | ||||||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | - | ||||||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | - | ||||||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | - | ||||||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | - | ||||||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | - | ||||||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | - | ||||||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | - | ||||||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | - | ||||||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | - | ||||||
51 | * ==================================================================== | - | ||||||
52 | * | - | ||||||
53 | * This product includes cryptographic software written by Eric Young | - | ||||||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | - | ||||||
55 | * Hudson (tjh@cryptsoft.com). | - | ||||||
56 | * | - | ||||||
57 | */ | - | ||||||
58 | - | |||||||
59 | #include <stdio.h> | - | ||||||
60 | - | |||||||
61 | #include <openssl/err.h> | - | ||||||
62 | #include <openssl/objects.h> | - | ||||||
63 | #include <openssl/pkcs7.h> | - | ||||||
64 | #include <openssl/ts.h> | - | ||||||
65 | - | |||||||
66 | /* Function definitions. */ | - | ||||||
67 | - | |||||||
68 | int | - | ||||||
69 | TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *status_info) | - | ||||||
70 | { | - | ||||||
71 | TS_STATUS_INFO *new_status_info; | - | ||||||
72 | - | |||||||
73 | if (a->status_info == status_info)
| 0 | ||||||
74 | return 1; never executed: return 1; | 0 | ||||||
75 | new_status_info = TS_STATUS_INFO_dup(status_info); | - | ||||||
76 | if (new_status_info == NULL) {
| 0 | ||||||
77 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
78 | return 0; never executed: return 0; | 0 | ||||||
79 | } | - | ||||||
80 | TS_STATUS_INFO_free(a->status_info); | - | ||||||
81 | a->status_info = new_status_info; | - | ||||||
82 | - | |||||||
83 | return 1; never executed: return 1; | 0 | ||||||
84 | } | - | ||||||
85 | - | |||||||
86 | TS_STATUS_INFO * | - | ||||||
87 | TS_RESP_get_status_info(TS_RESP *a) | - | ||||||
88 | { | - | ||||||
89 | return a->status_info; never executed: return a->status_info; | 0 | ||||||
90 | } | - | ||||||
91 | - | |||||||
92 | /* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */ | - | ||||||
93 | void | - | ||||||
94 | TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info) | - | ||||||
95 | { | - | ||||||
96 | /* Set new PKCS7 and TST_INFO objects. */ | - | ||||||
97 | PKCS7_free(a->token); | - | ||||||
98 | a->token = p7; | - | ||||||
99 | TS_TST_INFO_free(a->tst_info); | - | ||||||
100 | a->tst_info = tst_info; | - | ||||||
101 | } never executed: end of block | 0 | ||||||
102 | - | |||||||
103 | PKCS7 * | - | ||||||
104 | TS_RESP_get_token(TS_RESP *a) | - | ||||||
105 | { | - | ||||||
106 | return a->token; never executed: return a->token; | 0 | ||||||
107 | } | - | ||||||
108 | - | |||||||
109 | TS_TST_INFO * | - | ||||||
110 | TS_RESP_get_tst_info(TS_RESP *a) | - | ||||||
111 | { | - | ||||||
112 | return a->tst_info; never executed: return a->tst_info; | 0 | ||||||
113 | } | - | ||||||
114 | - | |||||||
115 | int | - | ||||||
116 | TS_TST_INFO_set_version(TS_TST_INFO *a, long version) | - | ||||||
117 | { | - | ||||||
118 | return ASN1_INTEGER_set(a->version, version); never executed: return ASN1_INTEGER_set(a->version, version); | 0 | ||||||
119 | } | - | ||||||
120 | - | |||||||
121 | long | - | ||||||
122 | TS_TST_INFO_get_version(const TS_TST_INFO *a) | - | ||||||
123 | { | - | ||||||
124 | return ASN1_INTEGER_get(a->version); never executed: return ASN1_INTEGER_get(a->version); | 0 | ||||||
125 | } | - | ||||||
126 | - | |||||||
127 | int | - | ||||||
128 | TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy) | - | ||||||
129 | { | - | ||||||
130 | ASN1_OBJECT *new_policy; | - | ||||||
131 | - | |||||||
132 | if (a->policy_id == policy)
| 0 | ||||||
133 | return 1; never executed: return 1; | 0 | ||||||
134 | new_policy = OBJ_dup(policy); | - | ||||||
135 | if (new_policy == NULL) {
| 0 | ||||||
136 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
137 | return 0; never executed: return 0; | 0 | ||||||
138 | } | - | ||||||
139 | ASN1_OBJECT_free(a->policy_id); | - | ||||||
140 | a->policy_id = new_policy; | - | ||||||
141 | return 1; never executed: return 1; | 0 | ||||||
142 | } | - | ||||||
143 | - | |||||||
144 | ASN1_OBJECT * | - | ||||||
145 | TS_TST_INFO_get_policy_id(TS_TST_INFO *a) | - | ||||||
146 | { | - | ||||||
147 | return a->policy_id; never executed: return a->policy_id; | 0 | ||||||
148 | } | - | ||||||
149 | - | |||||||
150 | int | - | ||||||
151 | TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint) | - | ||||||
152 | { | - | ||||||
153 | TS_MSG_IMPRINT *new_msg_imprint; | - | ||||||
154 | - | |||||||
155 | if (a->msg_imprint == msg_imprint)
| 0 | ||||||
156 | return 1; never executed: return 1; | 0 | ||||||
157 | new_msg_imprint = TS_MSG_IMPRINT_dup(msg_imprint); | - | ||||||
158 | if (new_msg_imprint == NULL) {
| 0 | ||||||
159 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
160 | return 0; never executed: return 0; | 0 | ||||||
161 | } | - | ||||||
162 | TS_MSG_IMPRINT_free(a->msg_imprint); | - | ||||||
163 | a->msg_imprint = new_msg_imprint; | - | ||||||
164 | return 1; never executed: return 1; | 0 | ||||||
165 | } | - | ||||||
166 | - | |||||||
167 | TS_MSG_IMPRINT * | - | ||||||
168 | TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a) | - | ||||||
169 | { | - | ||||||
170 | return a->msg_imprint; never executed: return a->msg_imprint; | 0 | ||||||
171 | } | - | ||||||
172 | - | |||||||
173 | int | - | ||||||
174 | TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial) | - | ||||||
175 | { | - | ||||||
176 | ASN1_INTEGER *new_serial; | - | ||||||
177 | - | |||||||
178 | if (a->serial == serial)
| 0 | ||||||
179 | return 1; never executed: return 1; | 0 | ||||||
180 | new_serial = ASN1_INTEGER_dup(serial); | - | ||||||
181 | if (new_serial == NULL) {
| 0 | ||||||
182 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
183 | return 0; never executed: return 0; | 0 | ||||||
184 | } | - | ||||||
185 | ASN1_INTEGER_free(a->serial); | - | ||||||
186 | a->serial = new_serial; | - | ||||||
187 | return 1; never executed: return 1; | 0 | ||||||
188 | } | - | ||||||
189 | - | |||||||
190 | const ASN1_INTEGER * | - | ||||||
191 | TS_TST_INFO_get_serial(const TS_TST_INFO *a) | - | ||||||
192 | { | - | ||||||
193 | return a->serial; never executed: return a->serial; | 0 | ||||||
194 | } | - | ||||||
195 | - | |||||||
196 | int | - | ||||||
197 | TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime) | - | ||||||
198 | { | - | ||||||
199 | ASN1_GENERALIZEDTIME *new_time; | - | ||||||
200 | - | |||||||
201 | if (a->time == gtime)
| 0 | ||||||
202 | return 1; never executed: return 1; | 0 | ||||||
203 | new_time = ASN1_STRING_dup(gtime); | - | ||||||
204 | if (new_time == NULL) {
| 0 | ||||||
205 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
206 | return 0; never executed: return 0; | 0 | ||||||
207 | } | - | ||||||
208 | ASN1_GENERALIZEDTIME_free(a->time); | - | ||||||
209 | a->time = new_time; | - | ||||||
210 | return 1; never executed: return 1; | 0 | ||||||
211 | } | - | ||||||
212 | - | |||||||
213 | const ASN1_GENERALIZEDTIME * | - | ||||||
214 | TS_TST_INFO_get_time(const TS_TST_INFO *a) | - | ||||||
215 | { | - | ||||||
216 | return a->time; never executed: return a->time; | 0 | ||||||
217 | } | - | ||||||
218 | - | |||||||
219 | int | - | ||||||
220 | TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy) | - | ||||||
221 | { | - | ||||||
222 | TS_ACCURACY *new_accuracy; | - | ||||||
223 | - | |||||||
224 | if (a->accuracy == accuracy)
| 0 | ||||||
225 | return 1; never executed: return 1; | 0 | ||||||
226 | new_accuracy = TS_ACCURACY_dup(accuracy); | - | ||||||
227 | if (new_accuracy == NULL) {
| 0 | ||||||
228 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
229 | return 0; never executed: return 0; | 0 | ||||||
230 | } | - | ||||||
231 | TS_ACCURACY_free(a->accuracy); | - | ||||||
232 | a->accuracy = new_accuracy; | - | ||||||
233 | return 1; never executed: return 1; | 0 | ||||||
234 | } | - | ||||||
235 | - | |||||||
236 | TS_ACCURACY * | - | ||||||
237 | TS_TST_INFO_get_accuracy(TS_TST_INFO *a) | - | ||||||
238 | { | - | ||||||
239 | return a->accuracy; never executed: return a->accuracy; | 0 | ||||||
240 | } | - | ||||||
241 | - | |||||||
242 | int | - | ||||||
243 | TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds) | - | ||||||
244 | { | - | ||||||
245 | ASN1_INTEGER *new_seconds; | - | ||||||
246 | - | |||||||
247 | if (a->seconds == seconds)
| 0 | ||||||
248 | return 1; never executed: return 1; | 0 | ||||||
249 | new_seconds = ASN1_INTEGER_dup(seconds); | - | ||||||
250 | if (new_seconds == NULL) {
| 0 | ||||||
251 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
252 | return 0; never executed: return 0; | 0 | ||||||
253 | } | - | ||||||
254 | ASN1_INTEGER_free(a->seconds); | - | ||||||
255 | a->seconds = new_seconds; | - | ||||||
256 | return 1; never executed: return 1; | 0 | ||||||
257 | } | - | ||||||
258 | - | |||||||
259 | const ASN1_INTEGER * | - | ||||||
260 | TS_ACCURACY_get_seconds(const TS_ACCURACY *a) | - | ||||||
261 | { | - | ||||||
262 | return a->seconds; never executed: return a->seconds; | 0 | ||||||
263 | } | - | ||||||
264 | - | |||||||
265 | int | - | ||||||
266 | TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis) | - | ||||||
267 | { | - | ||||||
268 | ASN1_INTEGER *new_millis = NULL; | - | ||||||
269 | - | |||||||
270 | if (a->millis == millis)
| 0 | ||||||
271 | return 1; never executed: return 1; | 0 | ||||||
272 | if (millis != NULL) {
| 0 | ||||||
273 | new_millis = ASN1_INTEGER_dup(millis); | - | ||||||
274 | if (new_millis == NULL) {
| 0 | ||||||
275 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
276 | return 0; never executed: return 0; | 0 | ||||||
277 | } | - | ||||||
278 | } never executed: end of block | 0 | ||||||
279 | ASN1_INTEGER_free(a->millis); | - | ||||||
280 | a->millis = new_millis; | - | ||||||
281 | return 1; never executed: return 1; | 0 | ||||||
282 | } | - | ||||||
283 | - | |||||||
284 | const ASN1_INTEGER * | - | ||||||
285 | TS_ACCURACY_get_millis(const TS_ACCURACY *a) | - | ||||||
286 | { | - | ||||||
287 | return a->millis; never executed: return a->millis; | 0 | ||||||
288 | } | - | ||||||
289 | - | |||||||
290 | int | - | ||||||
291 | TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros) | - | ||||||
292 | { | - | ||||||
293 | ASN1_INTEGER *new_micros = NULL; | - | ||||||
294 | - | |||||||
295 | if (a->micros == micros)
| 0 | ||||||
296 | return 1; never executed: return 1; | 0 | ||||||
297 | if (micros != NULL) {
| 0 | ||||||
298 | new_micros = ASN1_INTEGER_dup(micros); | - | ||||||
299 | if (new_micros == NULL) {
| 0 | ||||||
300 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
301 | return 0; never executed: return 0; | 0 | ||||||
302 | } | - | ||||||
303 | } never executed: end of block | 0 | ||||||
304 | ASN1_INTEGER_free(a->micros); | - | ||||||
305 | a->micros = new_micros; | - | ||||||
306 | return 1; never executed: return 1; | 0 | ||||||
307 | } | - | ||||||
308 | - | |||||||
309 | const ASN1_INTEGER * | - | ||||||
310 | TS_ACCURACY_get_micros(const TS_ACCURACY *a) | - | ||||||
311 | { | - | ||||||
312 | return a->micros; never executed: return a->micros; | 0 | ||||||
313 | } | - | ||||||
314 | - | |||||||
315 | int | - | ||||||
316 | TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering) | - | ||||||
317 | { | - | ||||||
318 | a->ordering = ordering ? 0xFF : 0x00;
| 0 | ||||||
319 | return 1; never executed: return 1; | 0 | ||||||
320 | } | - | ||||||
321 | - | |||||||
322 | int | - | ||||||
323 | TS_TST_INFO_get_ordering(const TS_TST_INFO *a) | - | ||||||
324 | { | - | ||||||
325 | return a->ordering ? 1 : 0; never executed: return a->ordering ? 1 : 0;
| 0 | ||||||
326 | } | - | ||||||
327 | - | |||||||
328 | int | - | ||||||
329 | TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce) | - | ||||||
330 | { | - | ||||||
331 | ASN1_INTEGER *new_nonce; | - | ||||||
332 | - | |||||||
333 | if (a->nonce == nonce)
| 0 | ||||||
334 | return 1; never executed: return 1; | 0 | ||||||
335 | new_nonce = ASN1_INTEGER_dup(nonce); | - | ||||||
336 | if (new_nonce == NULL) {
| 0 | ||||||
337 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
338 | return 0; never executed: return 0; | 0 | ||||||
339 | } | - | ||||||
340 | ASN1_INTEGER_free(a->nonce); | - | ||||||
341 | a->nonce = new_nonce; | - | ||||||
342 | return 1; never executed: return 1; | 0 | ||||||
343 | } | - | ||||||
344 | - | |||||||
345 | const ASN1_INTEGER * | - | ||||||
346 | TS_TST_INFO_get_nonce(const TS_TST_INFO *a) | - | ||||||
347 | { | - | ||||||
348 | return a->nonce; never executed: return a->nonce; | 0 | ||||||
349 | } | - | ||||||
350 | - | |||||||
351 | int | - | ||||||
352 | TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa) | - | ||||||
353 | { | - | ||||||
354 | GENERAL_NAME *new_tsa; | - | ||||||
355 | - | |||||||
356 | if (a->tsa == tsa)
| 0 | ||||||
357 | return 1; never executed: return 1; | 0 | ||||||
358 | new_tsa = GENERAL_NAME_dup(tsa); | - | ||||||
359 | if (new_tsa == NULL) {
| 0 | ||||||
360 | TSerror(ERR_R_MALLOC_FAILURE); | - | ||||||
361 | return 0; never executed: return 0; | 0 | ||||||
362 | } | - | ||||||
363 | GENERAL_NAME_free(a->tsa); | - | ||||||
364 | a->tsa = new_tsa; | - | ||||||
365 | return 1; never executed: return 1; | 0 | ||||||
366 | } | - | ||||||
367 | - | |||||||
368 | GENERAL_NAME * | - | ||||||
369 | TS_TST_INFO_get_tsa(TS_TST_INFO *a) | - | ||||||
370 | { | - | ||||||
371 | return a->tsa; never executed: return a->tsa; | 0 | ||||||
372 | } | - | ||||||
373 | - | |||||||
374 | STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a) | - | ||||||
375 | { | - | ||||||
376 | return a->extensions; never executed: return a->extensions; | 0 | ||||||
377 | } | - | ||||||
378 | - | |||||||
379 | void | - | ||||||
380 | TS_TST_INFO_ext_free(TS_TST_INFO *a) | - | ||||||
381 | { | - | ||||||
382 | if (!a)
| 0-1 | ||||||
383 | return; executed 1 time by 1 test: return; Executed by:
| 1 | ||||||
384 | sk_X509_EXTENSION_pop_free(a->extensions, X509_EXTENSION_free); | - | ||||||
385 | a->extensions = NULL; | - | ||||||
386 | } never executed: end of block | 0 | ||||||
387 | - | |||||||
388 | int | - | ||||||
389 | TS_TST_INFO_get_ext_count(TS_TST_INFO *a) | - | ||||||
390 | { | - | ||||||
391 | return X509v3_get_ext_count(a->extensions); never executed: return X509v3_get_ext_count(a->extensions); | 0 | ||||||
392 | } | - | ||||||
393 | - | |||||||
394 | int | - | ||||||
395 | TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos) | - | ||||||
396 | { | - | ||||||
397 | return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); never executed: return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); | 0 | ||||||
398 | } | - | ||||||
399 | - | |||||||
400 | int | - | ||||||
401 | TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj, int lastpos) | - | ||||||
402 | { | - | ||||||
403 | return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); never executed: return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); | 0 | ||||||
404 | } | - | ||||||
405 | - | |||||||
406 | int | - | ||||||
407 | TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos) | - | ||||||
408 | { | - | ||||||
409 | return X509v3_get_ext_by_critical(a->extensions, crit, lastpos); never executed: return X509v3_get_ext_by_critical(a->extensions, crit, lastpos); | 0 | ||||||
410 | } | - | ||||||
411 | - | |||||||
412 | X509_EXTENSION * | - | ||||||
413 | TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc) | - | ||||||
414 | { | - | ||||||
415 | return X509v3_get_ext(a->extensions, loc); never executed: return X509v3_get_ext(a->extensions, loc); | 0 | ||||||
416 | } | - | ||||||
417 | - | |||||||
418 | X509_EXTENSION * | - | ||||||
419 | TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc) | - | ||||||
420 | { | - | ||||||
421 | return X509v3_delete_ext(a->extensions, loc); never executed: return X509v3_delete_ext(a->extensions, loc); | 0 | ||||||
422 | } | - | ||||||
423 | - | |||||||
424 | int | - | ||||||
425 | TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc) | - | ||||||
426 | { | - | ||||||
427 | return X509v3_add_ext(&a->extensions, ex, loc) != NULL; never executed: return X509v3_add_ext(&a->extensions, ex, loc) != ((void *)0) ; | 0 | ||||||
428 | } | - | ||||||
429 | - | |||||||
430 | void * | - | ||||||
431 | TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx) | - | ||||||
432 | { | - | ||||||
433 | return X509V3_get_d2i(a->extensions, nid, crit, idx); never executed: return X509V3_get_d2i(a->extensions, nid, crit, idx); | 0 | ||||||
434 | } | - | ||||||
Source code | Switch to Preprocessed file |