OpenCoverage

t_pkey.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/asn1/t_pkey.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3int-
4ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,-
5 unsigned char *buf, int off)-
6{-
7 int n, i;-
8 const char *neg;-
9-
10 if (num ==
num == ((void *)0)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
3-13
11 ((void *)0)
num == ((void *)0)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
3-13
12 )-
13 return
executed 3 times by 2 tests: return (1);
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
(1);
executed 3 times by 2 tests: return (1);
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
3
14 neg = (((
(((num)->neg != 0))Description
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
num)->neg != 0))
(((num)->neg != 0))Description
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
? "-" : "";
0-13
15 if (!BIO_indent(bp, off, 128)
!BIO_indent(bp, off, 128)Description
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
0-13
16 return
never executed: return 0;
0;
never executed: return 0;
0
17 if (((
((num)->top == 0)Description
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
num)->top == 0)
((num)->top == 0)Description
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
) {
0-13
18 if (BIO_printf(bp, "%s 0\n", number) <= 0
BIO_printf(bp,..., number) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
19 return
never executed: return 0;
0;
never executed: return 0;
0
20 return
never executed: return 1;
1;
never executed: return 1;
0
21 }-
22-
23 if (((
((BN_num_bits(num)+7)/8) <= 8Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
BN_num_bits(num)+7)/8) <= 8
((BN_num_bits(num)+7)/8) <= 8Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
) {
2-11
24 if (BIO_printf(bp, "%s %s%lu (%s0x%lx)\n", number, neg,
BIO_printf(bp,...um->d[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
0-2
25 (unsigned long)num->d[0], neg,
BIO_printf(bp,...um->d[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
0-2
26 (unsigned long)num->d[0]) <= 0
BIO_printf(bp,...um->d[0]) <= 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-2
27 return
never executed: return (0);
(0);
never executed: return (0);
0
28 }
executed 2 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
else {
2
29 buf[0] = 0;-
30 if (BIO_printf(bp, "%s%s", number,
BIO_printf(bp,...e)" : "") <= 0Description
TRUEnever evaluated
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
0-11
31 (neg[0] == '-') ? " (Negative)" : "") <= 0
BIO_printf(bp,...e)" : "") <= 0Description
TRUEnever evaluated
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
0-11
32 return
never executed: return (0);
(0);
never executed: return (0);
0
33 n = BN_bn2bin(num, &buf[1]);-
34-
35 if (buf[1] & 0x80
buf[1] & 0x80Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
2-9
36 n++;
executed 9 times by 2 tests: n++;
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
9
37 else-
38 buf++;
executed 2 times by 2 tests: buf++;
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
2
39-
40 for (i = 0; i < n
i < nDescription
TRUEevaluated 921 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
; i++) {
11-921
41 if ((
(i % 15) == 0Description
TRUEevaluated 69 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 852 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
i % 15) == 0
(i % 15) == 0Description
TRUEevaluated 69 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
FALSEevaluated 852 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
) {
69-852
42 if (BIO_puts(bp, "\n") <= 0
BIO_puts(bp, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
||
0-69
43 !BIO_indent(bp, off + 4, 128)
!BIO_indent(bp, off + 4, 128)Description
TRUEnever evaluated
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
0-69
44 return
never executed: return 0;
0;
never executed: return 0;
0
45 }
executed 69 times by 2 tests: end of block
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
69
46 if (BIO_printf(bp, "%02x%s", buf[i],
BIO_printf(bp,..."" : ":") <= 0Description
TRUEnever evaluated
FALSEevaluated 921 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
0-921
47 ((i + 1) == n) ? "" : ":") <= 0
BIO_printf(bp,..."" : ":") <= 0Description
TRUEnever evaluated
FALSEevaluated 921 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
0-921
48 return
never executed: return (0);
(0);
never executed: return (0);
0
49 }
executed 921 times by 2 tests: end of block
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
921
50 if (BIO_write(bp, "\n", 1) <= 0
BIO_write(bp, "\n", 1) <= 0Description
TRUEnever evaluated
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • dsatest
  • libcrypto.so.44.0.1
)
0-11
51 return
never executed: return (0);
(0);
never executed: return (0);
0
52 }
executed 11 times by 2 tests: end of block
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
11
53 return
executed 13 times by 2 tests: return (1);
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
(1);
executed 13 times by 2 tests: return (1);
Executed by:
  • dsatest
  • libcrypto.so.44.0.1
13
54}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2