OpenCoverage

t_pkey.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/t_pkey.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int indent)-
9{-
10 size_t i;-
11-
12 for (i = 0; i < buflen
i < buflenDescription
TRUEevaluated 233530 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1361 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
1361-233530
13 if ((
(i % 15) == 0Description
TRUEevaluated 16257 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 217273 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i % 15) == 0
(i % 15) == 0Description
TRUEevaluated 16257 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 217273 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
16257-217273
14 if (i > 0
i > 0Description
TRUEevaluated 14896 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1361 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& BIO_puts(bp, "\n") <= 0
BIO_puts(bp, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 14896 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-14896
15 return
never executed: return 0;
0;
never executed: return 0;
0
16 if (!BIO_indent(bp, indent, 128)
!BIO_indent(bp, indent, 128)Description
TRUEnever evaluated
FALSEevaluated 16257 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-16257
17 return
never executed: return 0;
0;
never executed: return 0;
0
18 }
executed 16257 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
16257
19-
20-
21-
22-
23 if (BIO_printf(bp, "%02x%s", buf[i],
BIO_printf(bp,..."" : ":") <= 0Description
TRUEnever evaluated
FALSEevaluated 233530 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-233530
24 (i == buflen - 1) ? "" : ":") <= 0
BIO_printf(bp,..."" : ":") <= 0Description
TRUEnever evaluated
FALSEevaluated 233530 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-233530
25 return
never executed: return 0;
0;
never executed: return 0;
0
26 }
executed 233530 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
233530
27 if (BIO_write(bp, "\n", 1) <= 0
BIO_write(bp, "\n", 1) <= 0Description
TRUEnever evaluated
FALSEevaluated 1361 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1361
28 return
never executed: return 0;
0;
never executed: return 0;
0
29 return
executed 1361 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1361 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1361
30}-
31-
32int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,-
33 unsigned char *ign, int indent)-
34{-
35 int n, rv = 0;-
36 const char *neg;-
37 unsigned char *buf = -
38 ((void *)0)-
39 , *tmp = -
40 ((void *)0)-
41 ;-
42 int buflen;-
43-
44 if (num ==
num == ((void *)0)Description
TRUEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12101 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
216-12101
45 ((void *)0)
num == ((void *)0)Description
TRUEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12101 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
216-12101
46 )-
47 return
executed 216 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 216 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
216
48 neg = BN_is_negative(num)
BN_is_negative(num)Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12079 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? "-" : "";
22-12079
49 if (!BIO_indent(bp, indent, 128)
!BIO_indent(bp, indent, 128)Description
TRUEnever evaluated
FALSEevaluated 12101 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-12101
50 return
never executed: return 0;
0;
never executed: return 0;
0
51 if (BN_is_zero(num)
BN_is_zero(num)Description
TRUEevaluated 491 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11610 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
491-11610
52 if (BIO_printf(bp, "%s 0\n", number) <= 0
BIO_printf(bp,..., number) <= 0Description
TRUEnever evaluated
FALSEevaluated 491 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-491
53 return
never executed: return 0;
0;
never executed: return 0;
0
54 return
executed 491 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 491 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
491
55 }-
56-
57 if (((
((BN_num_bits(num)+7)/8) <= 8Description
TRUEevaluated 10683 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
BN_num_bits(num)+7)/8) <= 8
((BN_num_bits(num)+7)/8) <= 8Description
TRUEevaluated 10683 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
927-10683
58 if (BIO_printf(bp, "%s %s%lu (%s0x%lx)\n", number, neg,
BIO_printf(bp,...(num)[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 10683 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-10683
59 (unsigned long)bn_get_words(num)[0], neg,
BIO_printf(bp,...(num)[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 10683 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-10683
60 (unsigned long)bn_get_words(num)[0]) <= 0
BIO_printf(bp,...(num)[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 10683 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-10683
61 return
never executed: return 0;
0;
never executed: return 0;
0
62 return
executed 10683 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 10683 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
10683
63 }-
64-
65 buflen = ((BN_num_bits(num)+7)/8) + 1;-
66 buf = tmp = CRYPTO_malloc(buflen, __FILE__, 73);-
67 if (buf ==
buf == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-927
68 ((void *)0)
buf == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-927
69 )-
70 goto
never executed: goto err;
err;
never executed: goto err;
0
71 buf[0] = 0;-
72 if (BIO_printf(bp, "%s%s\n", number,
BIO_printf(bp,...e)" : "") <= 0Description
TRUEnever evaluated
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-927
73 (neg[0] == '-') ? " (Negative)" : "") <= 0
BIO_printf(bp,...e)" : "") <= 0Description
TRUEnever evaluated
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-927
74 goto
never executed: goto err;
err;
never executed: goto err;
0
75 n = BN_bn2bin(num, buf + 1);-
76-
77 if (buf[1] & 0x80
buf[1] & 0x80Description
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 362 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
362-565
78 n++;
executed 565 times by 1 test: n++;
Executed by:
  • libcrypto.so.1.1
565
79 else-
80 tmp++;
executed 362 times by 1 test: tmp++;
Executed by:
  • libcrypto.so.1.1
362
81-
82 if (ASN1_buf_print(bp, tmp, n, indent + 4) == 0
ASN1_buf_print...dent + 4) == 0Description
TRUEnever evaluated
FALSEevaluated 927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-927
83 goto
never executed: goto err;
err;
never executed: goto err;
0
84 rv = 1;-
85 err:
code before this statement executed 927 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
927
86 CRYPTO_clear_free(buf, buflen, __FILE__, 91);-
87 return
executed 927 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
rv;
executed 927 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
927
88}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2