OpenCoverage

err_prn.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/err/err_prn.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),-
6 void *u)-
7{-
8 unsigned long l;-
9 char buf[256];-
10 char buf2[4096];-
11 const char *file, *data;-
12 int line, flags;-
13-
14-
15-
16-
17 union {-
18 CRYPTO_THREAD_ID tid;-
19 unsigned long ltid;-
20 } tid;-
21-
22 tid.ltid = 0;-
23 tid.tid = CRYPTO_THREAD_get_current_id();-
24-
25 while ((
(l = ERR_get_e... &flags)) != 0Description
TRUEevaluated 3978 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5917 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
l = ERR_get_error_line_data(&file, &line, &data, &flags)) != 0
(l = ERR_get_e... &flags)) != 0Description
TRUEevaluated 3978 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5917 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3978-5917
26 ERR_error_string_n(l, buf, sizeof(buf));-
27 BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", tid.ltid, buf,-
28 file, line, (flags & 0x02) ? data : "");-
29 if (cb(buf2, strlen(buf2), u) <= 0
cb(buf2, strlen(buf2), u) <= 0Description
TRUEnever evaluated
FALSEevaluated 3978 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3978
30 break;
never executed: break;
0
31 }
executed 3978 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3978
32}
executed 5917 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5917
33-
34static int print_bio(const char *str, size_t len, void *bp)-
35{-
36 return
executed 3978 times by 1 test: return BIO_write((BIO *)bp, str, len);
Executed by:
  • libcrypto.so.1.1
BIO_write((BIO *)bp, str, len);
executed 3978 times by 1 test: return BIO_write((BIO *)bp, str, len);
Executed by:
  • libcrypto.so.1.1
3978
37}-
38-
39void ERR_print_errors(BIO *bp)-
40{-
41 ERR_print_errors_cb(print_bio, bp);-
42}
executed 2311 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2311
43-
44-
45void ERR_print_errors_fp(FILE *fp)-
46{-
47 BIO *bio = BIO_new_fp(fp, 0x00);-
48 if (bio ==
bio == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3602 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3602
49 ((void *)0)
bio == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3602 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3602
50 )-
51 return;
never executed: return;
0
52-
53 ERR_print_errors_cb(print_bio, bio);-
54 BIO_free(bio);-
55}
executed 3602 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3602
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2