OpenCoverage

eck_prn.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ec/eck_prn.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/* $OpenBSD: eck_prn.c,v 1.15 2018/07/15 16:27:39 tb Exp $ */-
2/*-
3 * Written by Nils Larsch for the OpenSSL project.-
4 */-
5/* ====================================================================-
6 * Copyright (c) 1998-2005 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 * openssl-core@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 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.-
60 * Portions originally developed by SUN MICROSYSTEMS, INC., and-
61 * contributed to the OpenSSL project.-
62 */-
63-
64#include <stdio.h>-
65#include <string.h>-
66-
67#include <openssl/opensslconf.h>-
68-
69#include <openssl/bn.h>-
70#include <openssl/ec.h>-
71#include <openssl/err.h>-
72#include <openssl/evp.h>-
73-
74int -
75ECPKParameters_print_fp(FILE * fp, const EC_GROUP * x, int off)-
76{-
77 BIO *b;-
78 int ret;-
79-
80 if ((b = BIO_new(BIO_s_file())) == NULL) {
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
81 ECerror(ERR_R_BUF_LIB);-
82 return (0);
never executed: return (0);
0
83 }-
84 BIO_set_fp(b, fp, BIO_NOCLOSE);-
85 ret = ECPKParameters_print(b, x, off);-
86 BIO_free(b);-
87 return (ret);
never executed: return (ret);
0
88}-
89-
90int -
91EC_KEY_print_fp(FILE * fp, const EC_KEY * x, int off)-
92{-
93 BIO *b;-
94 int ret;-
95-
96 if ((b = BIO_new(BIO_s_file())) == NULL) {
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
97 ECerror(ERR_R_BIO_LIB);-
98 return (0);
never executed: return (0);
0
99 }-
100 BIO_set_fp(b, fp, BIO_NOCLOSE);-
101 ret = EC_KEY_print(b, x, off);-
102 BIO_free(b);-
103 return (ret);
never executed: return (ret);
0
104}-
105-
106int -
107ECParameters_print_fp(FILE * fp, const EC_KEY * x)-
108{-
109 BIO *b;-
110 int ret;-
111-
112 if ((b = BIO_new(BIO_s_file())) == NULL) {
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
113 ECerror(ERR_R_BIO_LIB);-
114 return (0);
never executed: return (0);
0
115 }-
116 BIO_set_fp(b, fp, BIO_NOCLOSE);-
117 ret = ECParameters_print(b, x);-
118 BIO_free(b);-
119 return (ret);
never executed: return (ret);
0
120}-
121-
122int -
123EC_KEY_print(BIO * bp, const EC_KEY * x, int off)-
124{-
125 EVP_PKEY *pk;-
126 int ret;-
127 pk = EVP_PKEY_new();-
128 if (!pk || !EVP_PKEY_set1_EC_KEY(pk, (EC_KEY *) x))
!pkDescription
TRUEnever evaluated
FALSEnever evaluated
!EVP_PKEY_set1... (EC_KEY *) x)Description
TRUEnever evaluated
FALSEnever evaluated
0
129 return 0;
never executed: return 0;
0
130 ret = EVP_PKEY_print_private(bp, pk, off, NULL);-
131 EVP_PKEY_free(pk);-
132 return ret;
never executed: return ret;
0
133}-
134-
135int -
136ECParameters_print(BIO * bp, const EC_KEY * x)-
137{-
138 EVP_PKEY *pk;-
139 int ret;-
140 pk = EVP_PKEY_new();-
141 if (!pk || !EVP_PKEY_set1_EC_KEY(pk, (EC_KEY *) x))
!pkDescription
TRUEnever evaluated
FALSEnever evaluated
!EVP_PKEY_set1... (EC_KEY *) x)Description
TRUEnever evaluated
FALSEnever evaluated
0
142 return 0;
never executed: return 0;
0
143 ret = EVP_PKEY_print_params(bp, pk, 4, NULL);-
144 EVP_PKEY_free(pk);-
145 return ret;
never executed: return ret;
0
146}-
147-
148static int -
149print_bin(BIO * fp, const char *str, const unsigned char *num,-
150 size_t len, int off);-
151-
152int -
153ECPKParameters_print(BIO * bp, const EC_GROUP * x, int off)-
154{-
155 unsigned char *buffer = NULL;-
156 size_t buf_len = 0, i;-
157 int ret = 0, reason = ERR_R_BIO_LIB;-
158 BN_CTX *ctx = NULL;-
159 const EC_POINT *point = NULL;-
160 BIGNUM *p = NULL, *a = NULL, *b = NULL, *gen = NULL, *order = NULL,-
161 *cofactor = NULL;-
162 const unsigned char *seed;-
163 size_t seed_len = 0;-
164 const char *nname;-
165-
166 static const char *gen_compressed = "Generator (compressed):";-
167 static const char *gen_uncompressed = "Generator (uncompressed):";-
168 static const char *gen_hybrid = "Generator (hybrid):";-
169-
170 if (!x) {
!xDescription
TRUEnever evaluated
FALSEnever evaluated
0
171 reason = ERR_R_PASSED_NULL_PARAMETER;-
172 goto err;
never executed: goto err;
0
173 }-
174 ctx = BN_CTX_new();-
175 if (ctx == NULL) {
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
176 reason = ERR_R_MALLOC_FAILURE;-
177 goto err;
never executed: goto err;
0
178 }-
179 if (EC_GROUP_get_asn1_flag(x)) {
EC_GROUP_get_asn1_flag(x)Description
TRUEnever evaluated
FALSEnever evaluated
0
180 /* the curve parameter are given by an asn1 OID */-
181 int nid;-
182-
183 if (!BIO_indent(bp, off, 128))
!BIO_indent(bp, off, 128)Description
TRUEnever evaluated
FALSEnever evaluated
0
184 goto err;
never executed: goto err;
0
185-
186 nid = EC_GROUP_get_curve_name(x);-
187 if (nid == 0)
nid == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
188 goto err;
never executed: goto err;
0
189-
190 if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
BIO_printf(bp,...2sn(nid)) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
191 goto err;
never executed: goto err;
0
192 if (BIO_printf(bp, "\n") <= 0)
BIO_printf(bp, "\n") <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
193 goto err;
never executed: goto err;
0
194-
195 nname = EC_curve_nid2nist(nid);-
196 if (nname) {
nnameDescription
TRUEnever evaluated
FALSEnever evaluated
0
197 if (!BIO_indent(bp, off, 128))
!BIO_indent(bp, off, 128)Description
TRUEnever evaluated
FALSEnever evaluated
0
198 goto err;
never executed: goto err;
0
199 if (BIO_printf(bp, "NIST CURVE: %s\n", nname) <= 0)
BIO_printf(bp,...", nname) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
200 goto err;
never executed: goto err;
0
201 }
never executed: end of block
0
202 } else {
never executed: end of block
0
203 /* explicit parameters */-
204 int is_char_two = 0;-
205 point_conversion_form_t form;-
206 int tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x));-
207-
208 if (tmp_nid == NID_X9_62_characteristic_two_field)
tmp_nid == 407Description
TRUEnever evaluated
FALSEnever evaluated
0
209 is_char_two = 1;
never executed: is_char_two = 1;
0
210-
211 if ((p = BN_new()) == NULL || (a = BN_new()) == NULL ||
(p = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
(a = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
212 (b = BN_new()) == NULL || (order = BN_new()) == NULL ||
(b = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
(order = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
213 (cofactor = BN_new()) == NULL) {
(cofactor = BN...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
214 reason = ERR_R_MALLOC_FAILURE;-
215 goto err;
never executed: goto err;
0
216 }-
217#ifndef OPENSSL_NO_EC2M-
218 if (is_char_two) {
is_char_twoDescription
TRUEnever evaluated
FALSEnever evaluated
0
219 if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx)) {
!EC_GROUP_get_... p, a, b, ctx)Description
TRUEnever evaluated
FALSEnever evaluated
0
220 reason = ERR_R_EC_LIB;-
221 goto err;
never executed: goto err;
0
222 }-
223 } else /* prime field */
never executed: end of block
0
224#endif-
225 {-
226 if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) {
!EC_GROUP_get_... p, a, b, ctx)Description
TRUEnever evaluated
FALSEnever evaluated
0
227 reason = ERR_R_EC_LIB;-
228 goto err;
never executed: goto err;
0
229 }-
230 }
never executed: end of block
0
231-
232 if ((point = EC_GROUP_get0_generator(x)) == NULL) {
(point = EC_GR...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
233 reason = ERR_R_EC_LIB;-
234 goto err;
never executed: goto err;
0
235 }-
236 if (!EC_GROUP_get_order(x, order, NULL) ||
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
237 !EC_GROUP_get_cofactor(x, cofactor, NULL)) {
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
238 reason = ERR_R_EC_LIB;-
239 goto err;
never executed: goto err;
0
240 }-
241 form = EC_GROUP_get_point_conversion_form(x);-
242-
243 if ((gen = EC_POINT_point2bn(x, point,
(gen = EC_POIN...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
244 form, NULL, ctx)) == NULL) {
(gen = EC_POIN...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
245 reason = ERR_R_EC_LIB;-
246 goto err;
never executed: goto err;
0
247 }-
248 buf_len = (size_t) BN_num_bytes(p);-
249 if (buf_len < (i = (size_t) BN_num_bytes(a)))
buf_len < (i =...bits(a)+7)/8))Description
TRUEnever evaluated
FALSEnever evaluated
0
250 buf_len = i;
never executed: buf_len = i;
0
251 if (buf_len < (i = (size_t) BN_num_bytes(b)))
buf_len < (i =...bits(b)+7)/8))Description
TRUEnever evaluated
FALSEnever evaluated
0
252 buf_len = i;
never executed: buf_len = i;
0
253 if (buf_len < (i = (size_t) BN_num_bytes(gen)))
buf_len < (i =...ts(gen)+7)/8))Description
TRUEnever evaluated
FALSEnever evaluated
0
254 buf_len = i;
never executed: buf_len = i;
0
255 if (buf_len < (i = (size_t) BN_num_bytes(order)))
buf_len < (i =...(order)+7)/8))Description
TRUEnever evaluated
FALSEnever evaluated
0
256 buf_len = i;
never executed: buf_len = i;
0
257 if (buf_len < (i = (size_t) BN_num_bytes(cofactor)))
buf_len < (i =...factor)+7)/8))Description
TRUEnever evaluated
FALSEnever evaluated
0
258 buf_len = i;
never executed: buf_len = i;
0
259-
260 if ((seed = EC_GROUP_get0_seed(x)) != NULL)
(seed = EC_GRO...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
261 seed_len = EC_GROUP_get_seed_len(x);
never executed: seed_len = EC_GROUP_get_seed_len(x);
0
262-
263 buf_len += 10;-
264 if ((buffer = malloc(buf_len)) == NULL) {
(buffer = mall...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
265 reason = ERR_R_MALLOC_FAILURE;-
266 goto err;
never executed: goto err;
0
267 }-
268 if (!BIO_indent(bp, off, 128))
!BIO_indent(bp, off, 128)Description
TRUEnever evaluated
FALSEnever evaluated
0
269 goto err;
never executed: goto err;
0
270-
271 /* print the 'short name' of the field type */-
272 if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid))
BIO_printf(bp,...tmp_nid)) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
273 <= 0)
BIO_printf(bp,...tmp_nid)) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
274 goto err;
never executed: goto err;
0
275-
276 if (is_char_two) {
is_char_twoDescription
TRUEnever evaluated
FALSEnever evaluated
0
277 /* print the 'short name' of the base type OID */-
278 int basis_type = EC_GROUP_get_basis_type(x);-
279 if (basis_type == 0)
basis_type == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
280 goto err;
never executed: goto err;
0
281-
282 if (!BIO_indent(bp, off, 128))
!BIO_indent(bp, off, 128)Description
TRUEnever evaluated
FALSEnever evaluated
0
283 goto err;
never executed: goto err;
0
284-
285 if (BIO_printf(bp, "Basis Type: %s\n",
BIO_printf(bp,...is_type)) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
286 OBJ_nid2sn(basis_type)) <= 0)
BIO_printf(bp,...is_type)) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
287 goto err;
never executed: goto err;
0
288-
289 /* print the polynomial */-
290 if ((p != NULL) && !ASN1_bn_print(bp, "Polynomial:", p, buffer,
(p != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
291 off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
292 goto err;
never executed: goto err;
0
293 } else {
never executed: end of block
0
294 if ((p != NULL) && !ASN1_bn_print(bp, "Prime:", p, buffer, off))
(p != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
295 goto err;
never executed: goto err;
0
296 }
never executed: end of block
0
297 if ((a != NULL) && !ASN1_bn_print(bp, "A: ", a, buffer, off))
(a != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
298 goto err;
never executed: goto err;
0
299 if ((b != NULL) && !ASN1_bn_print(bp, "B: ", b, buffer, off))
(b != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
300 goto err;
never executed: goto err;
0
301 if (form == POINT_CONVERSION_COMPRESSED) {
form == POINT_...ION_COMPRESSEDDescription
TRUEnever evaluated
FALSEnever evaluated
0
302 if ((gen != NULL) && !ASN1_bn_print(bp, gen_compressed, gen,
(gen != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
303 buffer, off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
304 goto err;
never executed: goto err;
0
305 } else if (form == POINT_CONVERSION_UNCOMPRESSED) {
never executed: end of block
form == POINT_...N_UNCOMPRESSEDDescription
TRUEnever evaluated
FALSEnever evaluated
0
306 if ((gen != NULL) && !ASN1_bn_print(bp, gen_uncompressed, gen,
(gen != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
307 buffer, off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
308 goto err;
never executed: goto err;
0
309 } else { /* form == POINT_CONVERSION_HYBRID */
never executed: end of block
0
310 if ((gen != NULL) && !ASN1_bn_print(bp, gen_hybrid, gen,
(gen != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
311 buffer, off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
312 goto err;
never executed: goto err;
0
313 }
never executed: end of block
0
314 if ((order != NULL) && !ASN1_bn_print(bp, "Order: ", order,
(order != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
315 buffer, off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
316 goto err;
never executed: goto err;
0
317 if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor,
(cofactor != ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
318 buffer, off))
!ASN1_bn_print..., buffer, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
319 goto err;
never executed: goto err;
0
320 if (seed && !print_bin(bp, "Seed:", seed, seed_len, off))
seedDescription
TRUEnever evaluated
FALSEnever evaluated
!print_bin(bp,...seed_len, off)Description
TRUEnever evaluated
FALSEnever evaluated
0
321 goto err;
never executed: goto err;
0
322 }
never executed: end of block
0
323 ret = 1;-
324 err:
code before this statement never executed: err:
0
325 if (!ret)
!retDescription
TRUEnever evaluated
FALSEnever evaluated
0
326 ECerror(reason);
never executed: ERR_put_error(16,(0xfff),(reason),__FILE__,326);
0
327 BN_free(p);-
328 BN_free(a);-
329 BN_free(b);-
330 BN_free(gen);-
331 BN_free(order);-
332 BN_free(cofactor);-
333 BN_CTX_free(ctx);-
334 free(buffer);-
335 return (ret);
never executed: return (ret);
0
336}-
337-
338static int -
339print_bin(BIO * fp, const char *name, const unsigned char *buf,-
340 size_t len, int off)-
341{-
342 size_t i;-
343 char str[128];-
344-
345 if (buf == NULL)
buf == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
346 return 1;
never executed: return 1;
0
347 if (off) {
offDescription
TRUEnever evaluated
FALSEnever evaluated
0
348 if (off > 128)
off > 128Description
TRUEnever evaluated
FALSEnever evaluated
0
349 off = 128;
never executed: off = 128;
0
350 memset(str, ' ', off);-
351 if (BIO_write(fp, str, off) <= 0)
BIO_write(fp, str, off) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
352 return 0;
never executed: return 0;
0
353 }
never executed: end of block
0
354 if (BIO_printf(fp, "%s", name) <= 0)
BIO_printf(fp,...s", name) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
355 return 0;
never executed: return 0;
0
356-
357 for (i = 0; i < len; i++) {
i < lenDescription
TRUEnever evaluated
FALSEnever evaluated
0
358 if ((i % 15) == 0) {
(i % 15) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
359 str[0] = '\n';-
360 memset(&(str[1]), ' ', off + 4);-
361 if (BIO_write(fp, str, off + 1 + 4) <= 0)
BIO_write(fp, ... + 1 + 4) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
362 return 0;
never executed: return 0;
0
363 }
never executed: end of block
0
364 if (BIO_printf(fp, "%02x%s", buf[i], ((i + 1) == len) ? "" : ":") <= 0)
BIO_printf(fp,..."" : ":") <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
365 return 0;
never executed: return 0;
0
366 }
never executed: end of block
0
367 if (BIO_write(fp, "\n", 1) <= 0)
BIO_write(fp, "\n", 1) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
368 return 0;
never executed: return 0;
0
369-
370 return 1;
never executed: return 1;
0
371}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2