| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/engine/tb_cipher.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | static ENGINE_TABLE *cipher_table = | - | ||||||||||||
| 3 | ((void *)0) | - | ||||||||||||
| 4 | ; | - | ||||||||||||
| 5 | - | |||||||||||||
| 6 | void ENGINE_unregister_ciphers(ENGINE *e) | - | ||||||||||||
| 7 | { | - | ||||||||||||
| 8 | engine_table_unregister(&cipher_table, e); | - | ||||||||||||
| 9 | } never executed: end of block | 0 | ||||||||||||
| 10 | - | |||||||||||||
| 11 | static void engine_unregister_all_ciphers(void) | - | ||||||||||||
| 12 | { | - | ||||||||||||
| 13 | engine_table_cleanup(&cipher_table); | - | ||||||||||||
| 14 | } executed 367 times by 1 test: end of blockExecuted by:
| 367 | ||||||||||||
| 15 | - | |||||||||||||
| 16 | int ENGINE_register_ciphers(ENGINE *e) | - | ||||||||||||
| 17 | { | - | ||||||||||||
| 18 | if (e->ciphers
| 0-3748 | ||||||||||||
| 19 | const int *nids; | - | ||||||||||||
| 20 | int num_nids = e->ciphers(e, | - | ||||||||||||
| 21 | ((void *)0) | - | ||||||||||||
| 22 | , &nids, 0); | - | ||||||||||||
| 23 | if (num_nids > 0
| 0 | ||||||||||||
| 24 | return never executed: engine_table_register(&cipher_table,return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 0);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: 1;return 1;Executed by:
executed 3748 times by 1 test: return 1;Executed by:
| 3748 | ||||||||||||
| 29 | } | - | ||||||||||||
| 30 | - | |||||||||||||
| 31 | void ENGINE_register_all_ciphers(void) | - | ||||||||||||
| 32 | { | - | ||||||||||||
| 33 | ENGINE *e; | - | ||||||||||||
| 34 | - | |||||||||||||
| 35 | for (e = ENGINE_get_first(); e
| 0 | ||||||||||||
| 36 | ENGINE_register_ciphers(e); never executed: ENGINE_register_ciphers(e); | 0 | ||||||||||||
| 37 | } never executed: end of block | 0 | ||||||||||||
| 38 | - | |||||||||||||
| 39 | int ENGINE_set_default_ciphers(ENGINE *e) | - | ||||||||||||
| 40 | { | - | ||||||||||||
| 41 | if (e->ciphers
| 0-367 | ||||||||||||
| 42 | const int *nids; | - | ||||||||||||
| 43 | int num_nids = e->ciphers(e, | - | ||||||||||||
| 44 | ((void *)0) | - | ||||||||||||
| 45 | , &nids, 0); | - | ||||||||||||
| 46 | if (num_nids > 0
| 0-367 | ||||||||||||
| 47 | return executed 367 times by 1 test: engine_table_register(&cipher_table,return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);Executed by:
executed 367 times by 1 test: return engine_table_register(&cipher_table, engine_unregister_all_ciphers, e, nids, num_nids, 1);Executed by:
| 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:
| 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:
| 367 | ||||||||||||
| 50 | } never executed: end of block | 0 | ||||||||||||
| 51 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 52 | } | - | ||||||||||||
| 53 | - | |||||||||||||
| 54 | - | |||||||||||||
| 55 | - | |||||||||||||
| 56 | - | |||||||||||||
| 57 | - | |||||||||||||
| 58 | - | |||||||||||||
| 59 | ENGINE *ENGINE_get_cipher_engine(int nid) | - | ||||||||||||
| 60 | { | - | ||||||||||||
| 61 | return executed 3192459 times by 2 tests: engine_table_select(&cipher_table, nid);return engine_table_select(&cipher_table, nid);Executed by:
executed 3192459 times by 2 tests: return engine_table_select(&cipher_table, nid);Executed by:
| 3192459 | ||||||||||||
| 62 | } | - | ||||||||||||
| 63 | - | |||||||||||||
| 64 | - | |||||||||||||
| 65 | const 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
| 0-757 | ||||||||||||
| 70 | ((void *)0)
| 0-757 | ||||||||||||
| 71 | , nid)
| 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: ret;return ret;Executed by:
executed 757 times by 1 test: return ret;Executed by:
| 757 | ||||||||||||
| 78 | } | - | ||||||||||||
| 79 | - | |||||||||||||
| 80 | - | |||||||||||||
| 81 | ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e) | - | ||||||||||||
| 82 | { | - | ||||||||||||
| 83 | return executed 757 times by 1 test: e->ciphers;return e->ciphers;Executed by:
executed 757 times by 1 test: return e->ciphers;Executed by:
| 757 | ||||||||||||
| 84 | } | - | ||||||||||||
| 85 | - | |||||||||||||
| 86 | - | |||||||||||||
| 87 | int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f) | - | ||||||||||||
| 88 | { | - | ||||||||||||
| 89 | e->ciphers = f; | - | ||||||||||||
| 90 | return executed 368 times by 1 test: 1;return 1;Executed by:
executed 368 times by 1 test: return 1;Executed by:
| 368 | ||||||||||||
| 91 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |