OpenCoverage

err_prn.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/err/err_prn.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4void-
5ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u)-
6{-
7 unsigned long l;-
8 char buf[256];-
9 char buf2[4096];-
10 const char *file, *data;-
11 int line, flags;-
12 unsigned long es;-
13 CRYPTO_THREADID cur;-
14-
15 CRYPTO_THREADID_current(&cur);-
16 es = CRYPTO_THREADID_hash(&cur);-
17 while ((
(l = ERR_get_e... &flags)) != 0Description
TRUEnever evaluated
FALSEevaluated 285 times by 6 tests
Evaluated by:
  • asn1test
  • dhtest
  • ecdhtest
  • gost2814789t
  • libcrypto.so.44.0.1
  • ssltest
l = ERR_get_error_line_data(&file, &line, &data,
(l = ERR_get_e... &flags)) != 0Description
TRUEnever evaluated
FALSEevaluated 285 times by 6 tests
Evaluated by:
  • asn1test
  • dhtest
  • ecdhtest
  • gost2814789t
  • libcrypto.so.44.0.1
  • ssltest
0-285
18 &flags)) != 0
(l = ERR_get_e... &flags)) != 0Description
TRUEnever evaluated
FALSEevaluated 285 times by 6 tests
Evaluated by:
  • asn1test
  • dhtest
  • ecdhtest
  • gost2814789t
  • libcrypto.so.44.0.1
  • ssltest
) {
0-285
19 ERR_error_string_n(l, buf, sizeof buf);-
20 (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es,-
21 buf, file, line, (flags & 0x02) ? data : "");-
22 if (cb(buf2, strlen(buf2), u) <= 0
cb(buf2, strlen(buf2), u) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
23 break;
never executed: break;
0
24 }
never executed: end of block
0
25}
executed 285 times by 6 tests: end of block
Executed by:
  • asn1test
  • dhtest
  • ecdhtest
  • gost2814789t
  • libcrypto.so.44.0.1
  • ssltest
285
26-
27static int-
28print_fp(const char *str, size_t len, void *fp)-
29{-
30 BIO bio;-
31-
32 BIO_set(&bio, BIO_s_file());-
33 BIO_ctrl(&bio,106,0x00,(char *)fp);-
34-
35 return
never executed: return BIO_printf(&bio, "%s", str);
BIO_printf(&bio, "%s", str);
never executed: return BIO_printf(&bio, "%s", str);
0
36}-
37-
38void-
39ERR_print_errors_fp(FILE *fp)-
40{-
41 ERR_print_errors_cb(print_fp, fp);-
42}
executed 17 times by 2 tests: end of block
Executed by:
  • dhtest
  • ecdhtest
17
43-
44static int-
45print_bio(const char *str, size_t len, void *bp)-
46{-
47 return
never executed: return BIO_write((BIO *)bp, str, len);
BIO_write((BIO *)bp, str, len);
never executed: return BIO_write((BIO *)bp, str, len);
0
48}-
49-
50void-
51ERR_print_errors(BIO *bp)-
52{-
53 ERR_print_errors_cb(print_bio, bp);-
54}
executed 268 times by 4 tests: end of block
Executed by:
  • asn1test
  • gost2814789t
  • libcrypto.so.44.0.1
  • ssltest
268
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2