Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ts/ts_lib.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num) | - | ||||||||||||
4 | { | - | ||||||||||||
5 | BIGNUM *num_bn; | - | ||||||||||||
6 | int result = 0; | - | ||||||||||||
7 | char *hex; | - | ||||||||||||
8 | - | |||||||||||||
9 | num_bn = ASN1_INTEGER_to_BN(num, | - | ||||||||||||
10 | ((void *)0) | - | ||||||||||||
11 | ); | - | ||||||||||||
12 | if (num_bn ==
| 0-223 | ||||||||||||
13 | ((void *)0)
| 0-223 | ||||||||||||
14 | ) | - | ||||||||||||
15 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||
16 | if ((
| 0-223 | ||||||||||||
17 | result = BIO_write(bio, "0x", 2) > 0; | - | ||||||||||||
18 | result = result
| 0-223 | ||||||||||||
19 | CRYPTO_free(hex, __FILE__, 31); | - | ||||||||||||
20 | } executed 223 times by 1 test: end of block Executed by:
| 223 | ||||||||||||
21 | BN_free(num_bn); | - | ||||||||||||
22 | - | |||||||||||||
23 | return executed 223 times by 1 test: result;return result; Executed by:
executed 223 times by 1 test: return result; Executed by:
| 223 | ||||||||||||
24 | } | - | ||||||||||||
25 | - | |||||||||||||
26 | int TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj) | - | ||||||||||||
27 | { | - | ||||||||||||
28 | char obj_txt[128]; | - | ||||||||||||
29 | - | |||||||||||||
30 | OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); | - | ||||||||||||
31 | BIO_printf(bio, "%s\n", obj_txt); | - | ||||||||||||
32 | - | |||||||||||||
33 | return executed 1 time by 1 test: 1;return 1; Executed by:
executed 1 time by 1 test: return 1; Executed by:
| 1 | ||||||||||||
34 | } | - | ||||||||||||
35 | - | |||||||||||||
36 | int TS_ext_print_bio(BIO *bio, const struct stack_st_X509_EXTENSION *extensions) | - | ||||||||||||
37 | { | - | ||||||||||||
38 | int i, critical, n; | - | ||||||||||||
39 | X509_EXTENSION *ex; | - | ||||||||||||
40 | ASN1_OBJECT *obj; | - | ||||||||||||
41 | - | |||||||||||||
42 | BIO_printf(bio, "Extensions:\n"); | - | ||||||||||||
43 | n = X509v3_get_ext_count(extensions); | - | ||||||||||||
44 | for (i = 0; i < n
| 446-15994 | ||||||||||||
45 | ex = X509v3_get_ext(extensions, i); | - | ||||||||||||
46 | obj = X509_EXTENSION_get_object(ex); | - | ||||||||||||
47 | if (i2a_ASN1_OBJECT(bio, obj) < 0
| 0-15994 | ||||||||||||
48 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
49 | critical = X509_EXTENSION_get_critical(ex); | - | ||||||||||||
50 | BIO_printf(bio, ":%s\n", critical ? " critical" : ""); | - | ||||||||||||
51 | if (!X509V3_EXT_print(bio, ex, 0, 4)
| 5701-10293 | ||||||||||||
52 | BIO_printf(bio, "%4s", ""); | - | ||||||||||||
53 | ASN1_STRING_print(bio, X509_EXTENSION_get_data(ex)); | - | ||||||||||||
54 | } executed 5701 times by 1 test: end of block Executed by:
| 5701 | ||||||||||||
55 | BIO_write(bio, "\n", 1); | - | ||||||||||||
56 | } executed 15994 times by 1 test: end of block Executed by:
| 15994 | ||||||||||||
57 | - | |||||||||||||
58 | return executed 446 times by 1 test: 1;return 1; Executed by:
executed 446 times by 1 test: return 1; Executed by:
| 446 | ||||||||||||
59 | } | - | ||||||||||||
60 | - | |||||||||||||
61 | int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg) | - | ||||||||||||
62 | { | - | ||||||||||||
63 | int i = OBJ_obj2nid(alg->algorithm); | - | ||||||||||||
64 | return executed 448 times by 1 test: BIO_printf(bio, "Hash Algorithm: %s\n",return BIO_printf(bio, "Hash Algorithm: %s\n", (i == 0) ? "UNKNOWN" : OBJ_nid2ln(i)); Executed by:
executed 448 times by 1 test: return BIO_printf(bio, "Hash Algorithm: %s\n", (i == 0) ? "UNKNOWN" : OBJ_nid2ln(i)); Executed by:
| 448 | ||||||||||||
65 | (i == 0) ? "UNKNOWN" : OBJ_nid2ln(i)); executed 448 times by 1 test: return BIO_printf(bio, "Hash Algorithm: %s\n", (i == 0) ? "UNKNOWN" : OBJ_nid2ln(i)); Executed by:
| 448 | ||||||||||||
66 | } | - | ||||||||||||
67 | - | |||||||||||||
68 | int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a) | - | ||||||||||||
69 | { | - | ||||||||||||
70 | ASN1_OCTET_STRING *msg; | - | ||||||||||||
71 | - | |||||||||||||
72 | TS_X509_ALGOR_print_bio(bio, a->hash_algo); | - | ||||||||||||
73 | - | |||||||||||||
74 | BIO_printf(bio, "Message data:\n"); | - | ||||||||||||
75 | msg = a->hashed_msg; | - | ||||||||||||
76 | BIO_dump_indent(bio, (const char *)ASN1_STRING_get0_data(msg), | - | ||||||||||||
77 | ASN1_STRING_length(msg), 4); | - | ||||||||||||
78 | - | |||||||||||||
79 | return executed 448 times by 1 test: 1;return 1; Executed by:
executed 448 times by 1 test: return 1; Executed by:
| 448 | ||||||||||||
80 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |