Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/asn1/t_pkey.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | int | - | ||||||||||||
4 | ASN1_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 ==
| 3-13 | ||||||||||||
11 | ((void *)0)
| 3-13 | ||||||||||||
12 | ) | - | ||||||||||||
13 | return executed 3 times by 2 tests: (1);return (1); Executed by:
executed 3 times by 2 tests: return (1); Executed by:
| 3 | ||||||||||||
14 | neg = (((
| 0-13 | ||||||||||||
15 | if (!BIO_indent(bp, off, 128)
| 0-13 | ||||||||||||
16 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
17 | if (((
| 0-13 | ||||||||||||
18 | if (BIO_printf(bp, "%s 0\n", number) <= 0
| 0 | ||||||||||||
19 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
20 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||
21 | } | - | ||||||||||||
22 | - | |||||||||||||
23 | if (((
| 2-11 | ||||||||||||
24 | if (BIO_printf(bp, "%s %s%lu (%s0x%lx)\n", number, neg,
| 0-2 | ||||||||||||
25 | (unsigned long)num->d[0], neg,
| 0-2 | ||||||||||||
26 | (unsigned long)num->d[0]) <= 0
| 0-2 | ||||||||||||
27 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
28 | } executed 2 times by 1 test: else {end of block Executed by:
| 2 | ||||||||||||
29 | buf[0] = 0; | - | ||||||||||||
30 | if (BIO_printf(bp, "%s%s", number,
| 0-11 | ||||||||||||
31 | (neg[0] == '-') ? " (Negative)" : "") <= 0
| 0-11 | ||||||||||||
32 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
33 | n = BN_bn2bin(num, &buf[1]); | - | ||||||||||||
34 | - | |||||||||||||
35 | if (buf[1] & 0x80
| 2-9 | ||||||||||||
36 | n++; executed 9 times by 2 tests: n++; Executed by:
| 9 | ||||||||||||
37 | else | - | ||||||||||||
38 | buf++; executed 2 times by 2 tests: buf++; Executed by:
| 2 | ||||||||||||
39 | - | |||||||||||||
40 | for (i = 0; i < n
| 11-921 | ||||||||||||
41 | if ((
| 69-852 | ||||||||||||
42 | if (BIO_puts(bp, "\n") <= 0
| 0-69 | ||||||||||||
43 | !BIO_indent(bp, off + 4, 128)
| 0-69 | ||||||||||||
44 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
45 | } executed 69 times by 2 tests: end of block Executed by:
| 69 | ||||||||||||
46 | if (BIO_printf(bp, "%02x%s", buf[i],
| 0-921 | ||||||||||||
47 | ((i + 1) == n) ? "" : ":") <= 0
| 0-921 | ||||||||||||
48 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
49 | } executed 921 times by 2 tests: end of block Executed by:
| 921 | ||||||||||||
50 | if (BIO_write(bp, "\n", 1) <= 0
| 0-11 | ||||||||||||
51 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
52 | } executed 11 times by 2 tests: end of block Executed by:
| 11 | ||||||||||||
53 | return executed 13 times by 2 tests: (1);return (1); Executed by:
executed 13 times by 2 tests: return (1); Executed by:
| 13 | ||||||||||||
54 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |