OpenCoverage

tb_cipher.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/engine/tb_cipher.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2static ENGINE_TABLE *cipher_table = -
3 ((void *)0)-
4 ;-
5-
6void ENGINE_unregister_ciphers(ENGINE *e)-
7{-
8 engine_table_unregister(&cipher_table, e);-
9}
never executed: end of block
0
10-
11static void engine_unregister_all_ciphers(void)-
12{-
13 engine_table_cleanup(&cipher_table);-
14}
executed 367 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
367
15-
16int ENGINE_register_ciphers(ENGINE *e)-
17{-
18 if (e->ciphers
e->ciphersDescription
TRUEnever evaluated
FALSEevaluated 3748 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-3748
19 const int *nids;-
20 int num_nids = e->ciphers(e, -
21 ((void *)0)-
22 , &nids, 0);-
23 if (num_nids > 0
num_nids > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
24 return
never executed: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 0);
engine_table_register(&cipher_table,
never executed: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 0);
0
25 engine_unregister_all_ciphers, e,
never executed: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 0);
0
26 nids, num_nids, 0);
never executed: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 0);
0
27 }
never executed: end of block
0
28 return
executed 3748 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 3748 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
3748
29}-
30-
31void ENGINE_register_all_ciphers(void)-
32{-
33 ENGINE *e;-
34-
35 for (e = ENGINE_get_first(); e
eDescription
TRUEnever evaluated
FALSEnever evaluated
; e = ENGINE_get_next(e))
0
36 ENGINE_register_ciphers(e);
never executed: ENGINE_register_ciphers(e);
0
37}
never executed: end of block
0
38-
39int ENGINE_set_default_ciphers(ENGINE *e)-
40{-
41 if (e->ciphers
e->ciphersDescription
TRUEevaluated 367 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-367
42 const int *nids;-
43 int num_nids = e->ciphers(e, -
44 ((void *)0)-
45 , &nids, 0);-
46 if (num_nids > 0
num_nids > 0Description
TRUEevaluated 367 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-367
47 return
executed 367 times by 1 test: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);
Executed by:
  • libcrypto.so.1.1
engine_table_register(&cipher_table,
executed 367 times by 1 test: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);
Executed by:
  • libcrypto.so.1.1
367
48 engine_unregister_all_ciphers, e,
executed 367 times by 1 test: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);
Executed by:
  • libcrypto.so.1.1
367
49 nids, num_nids, 1);
executed 367 times by 1 test: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);
Executed by:
  • libcrypto.so.1.1
367
50 }
never executed: end of block
0
51 return
never executed: return 1;
1;
never executed: return 1;
0
52}-
53-
54-
55-
56-
57-
58-
59ENGINE *ENGINE_get_cipher_engine(int nid)-
60{-
61 return
executed 3192459 times by 2 tests: return engine_table_select(&cipher_table, nid);
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
engine_table_select(&cipher_table, nid);
executed 3192459 times by 2 tests: return engine_table_select(&cipher_table, nid);
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
3192459
62}-
63-
64-
65const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid)-
66{-
67 const EVP_CIPHER *ret;-
68 ENGINE_CIPHERS_PTR fn = ENGINE_get_ciphers(e);-
69 if (!fn
!fnDescription
TRUEnever evaluated
FALSEevaluated 757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !fn(e, &ret,
!fn(e, &ret, (...id *)0) , nid)Description
TRUEnever evaluated
FALSEevaluated 757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-757
70 ((void *)0)
!fn(e, &ret, (...id *)0) , nid)Description
TRUEnever evaluated
FALSEevaluated 757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-757
71 , nid)
!fn(e, &ret, (...id *)0) , nid)Description
TRUEnever evaluated
FALSEevaluated 757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-757
72 ERR_put_error(38,(185),(146),__FILE__,74);-
73 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
74 ((void *)0)
never executed: return ((void *)0) ;
0
75 ;
never executed: return ((void *)0) ;
0
76 }-
77 return
executed 757 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 757 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
757
78}-
79-
80-
81ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e)-
82{-
83 return
executed 757 times by 1 test: return e->ciphers;
Executed by:
  • libcrypto.so.1.1
e->ciphers;
executed 757 times by 1 test: return e->ciphers;
Executed by:
  • libcrypto.so.1.1
757
84}-
85-
86-
87int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f)-
88{-
89 e->ciphers = f;-
90 return
executed 368 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 368 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
368
91}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2