Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/engine/eng_init.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | - | |||||||||||||||||||
4 | - | |||||||||||||||||||
5 | - | |||||||||||||||||||
6 | int engine_unlocked_init(ENGINE *e) | - | ||||||||||||||||||
7 | { | - | ||||||||||||||||||
8 | int to_return = 1; | - | ||||||||||||||||||
9 | - | |||||||||||||||||||
10 | if ((
| 5-53646 | ||||||||||||||||||
11 | - | |||||||||||||||||||
12 | - | |||||||||||||||||||
13 | - | |||||||||||||||||||
14 | - | |||||||||||||||||||
15 | to_return = e->init(e); executed 373 times by 1 test: to_return = e->init(e); Executed by:
| 373 | ||||||||||||||||||
16 | if (to_return
| 0-54024 | ||||||||||||||||||
17 | - | |||||||||||||||||||
18 | - | |||||||||||||||||||
19 | - | |||||||||||||||||||
20 | - | |||||||||||||||||||
21 | e->struct_ref++; | - | ||||||||||||||||||
22 | e->funct_ref++; | - | ||||||||||||||||||
23 | ; | - | ||||||||||||||||||
24 | ; | - | ||||||||||||||||||
25 | } executed 54024 times by 1 test: end of block Executed by:
| 54024 | ||||||||||||||||||
26 | return executed 54024 times by 1 test: to_return;return to_return; Executed by:
executed 54024 times by 1 test: return to_return; Executed by:
| 54024 | ||||||||||||||||||
27 | } | - | ||||||||||||||||||
28 | - | |||||||||||||||||||
29 | - | |||||||||||||||||||
30 | - | |||||||||||||||||||
31 | - | |||||||||||||||||||
32 | - | |||||||||||||||||||
33 | int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers) | - | ||||||||||||||||||
34 | { | - | ||||||||||||||||||
35 | int to_return = 1; | - | ||||||||||||||||||
36 | e->funct_ref--; | - | ||||||||||||||||||
37 | ; | - | ||||||||||||||||||
38 | if ((
| 5-53646 | ||||||||||||||||||
39 | if (unlock_for_handlers
| 6-367 | ||||||||||||||||||
40 | CRYPTO_THREAD_unlock(global_engine_lock); executed 6 times by 1 test: CRYPTO_THREAD_unlock(global_engine_lock); Executed by:
| 6 | ||||||||||||||||||
41 | to_return = e->finish(e); | - | ||||||||||||||||||
42 | if (unlock_for_handlers
| 6-367 | ||||||||||||||||||
43 | CRYPTO_THREAD_write_lock(global_engine_lock); executed 6 times by 1 test: CRYPTO_THREAD_write_lock(global_engine_lock); Executed by:
| 6 | ||||||||||||||||||
44 | if (!to_return
| 0-373 | ||||||||||||||||||
45 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
46 | } executed 373 times by 1 test: end of block Executed by:
| 373 | ||||||||||||||||||
47 | ; | - | ||||||||||||||||||
48 | - | |||||||||||||||||||
49 | if (!engine_free_util(e, 0)
| 0-54024 | ||||||||||||||||||
50 | ERR_put_error(38,(191),(106),__FILE__,70); | - | ||||||||||||||||||
51 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
52 | } | - | ||||||||||||||||||
53 | return executed 54024 times by 1 test: to_return;return to_return; Executed by:
executed 54024 times by 1 test: return to_return; Executed by:
| 54024 | ||||||||||||||||||
54 | } | - | ||||||||||||||||||
55 | - | |||||||||||||||||||
56 | - | |||||||||||||||||||
57 | int ENGINE_init(ENGINE *e) | - | ||||||||||||||||||
58 | { | - | ||||||||||||||||||
59 | int ret; | - | ||||||||||||||||||
60 | if (e ==
| 0-39223 | ||||||||||||||||||
61 | ((void *)0)
| 0-39223 | ||||||||||||||||||
62 | ) { | - | ||||||||||||||||||
63 | ERR_put_error(38,(119),((3|64)),__FILE__,81); | - | ||||||||||||||||||
64 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
65 | } | - | ||||||||||||||||||
66 | if (!(CRYPTO_THREAD_run_once(&engine_lock_init, do_engine_lock_init_ossl_)
| 0-39223 | ||||||||||||||||||
67 | ERR_put_error(38,(119),((1|64)),__FILE__,85); | - | ||||||||||||||||||
68 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
69 | } | - | ||||||||||||||||||
70 | CRYPTO_THREAD_write_lock(global_engine_lock); | - | ||||||||||||||||||
71 | ret = engine_unlocked_init(e); | - | ||||||||||||||||||
72 | CRYPTO_THREAD_unlock(global_engine_lock); | - | ||||||||||||||||||
73 | return executed 39223 times by 1 test: ret;return ret; Executed by:
executed 39223 times by 1 test: return ret; Executed by:
| 39223 | ||||||||||||||||||
74 | } | - | ||||||||||||||||||
75 | - | |||||||||||||||||||
76 | - | |||||||||||||||||||
77 | int ENGINE_finish(ENGINE *e) | - | ||||||||||||||||||
78 | { | - | ||||||||||||||||||
79 | int to_return = 1; | - | ||||||||||||||||||
80 | - | |||||||||||||||||||
81 | if (e ==
| 51088-7183616 | ||||||||||||||||||
82 | ((void *)0)
| 51088-7183616 | ||||||||||||||||||
83 | ) | - | ||||||||||||||||||
84 | return executed 7182302 times by 12 tests: 1;return 1; Executed by:
executed 7182302 times by 12 tests: return 1; Executed by:
| 7182302 | ||||||||||||||||||
85 | CRYPTO_THREAD_write_lock(global_engine_lock); | - | ||||||||||||||||||
86 | to_return = engine_unlocked_finish(e, 1); | - | ||||||||||||||||||
87 | CRYPTO_THREAD_unlock(global_engine_lock); | - | ||||||||||||||||||
88 | if (!to_return
| 0-51088 | ||||||||||||||||||
89 | ERR_put_error(38,(107),(106),__FILE__,105); | - | ||||||||||||||||||
90 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
91 | } | - | ||||||||||||||||||
92 | return executed 51088 times by 1 test: to_return;return to_return; Executed by:
executed 51088 times by 1 test: return to_return; Executed by:
| 51088 | ||||||||||||||||||
93 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |