OpenCoverage

tb_dsa.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/engine/tb_dsa.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.-
3 *-
4 * Licensed under the OpenSSL license (the "License"). You may not use-
5 * this file except in compliance with the License. You can obtain a copy-
6 * in the file LICENSE in the source distribution or at-
7 * https://www.openssl.org/source/license.html-
8 */-
9-
10#include "eng_int.h"-
11-
12static ENGINE_TABLE *dsa_table = NULL;-
13static const int dummy_nid = 1;-
14-
15void ENGINE_unregister_DSA(ENGINE *e)-
16{-
17 engine_table_unregister(&dsa_table, e);-
18}
never executed: end of block
0
19-
20static void engine_unregister_all_DSA(void)-
21{-
22 engine_table_cleanup(&dsa_table);-
23}
never executed: end of block
0
24-
25int ENGINE_register_DSA(ENGINE *e)-
26{-
27 if (e->dsa_meth)
e->dsa_methDescription
TRUEnever evaluated
FALSEevaluated 3748 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3748
28 return engine_table_register(&dsa_table,
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 0);
0
29 engine_unregister_all_DSA, e, &dummy_nid,
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 0);
0
30 1, 0);
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 0);
0
31 return 1;
executed 3748 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
3748
32}-
33-
34void ENGINE_register_all_DSA(void)-
35{-
36 ENGINE *e;-
37-
38 for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
eDescription
TRUEnever evaluated
FALSEnever evaluated
0
39 ENGINE_register_DSA(e);
never executed: ENGINE_register_DSA(e);
0
40}
never executed: end of block
0
41-
42int ENGINE_set_default_DSA(ENGINE *e)-
43{-
44 if (e->dsa_meth)
e->dsa_methDescription
TRUEnever evaluated
FALSEevaluated 367 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-367
45 return engine_table_register(&dsa_table,
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 1);
0
46 engine_unregister_all_DSA, e, &dummy_nid,
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 1);
0
47 1, 1);
never executed: return engine_table_register(&dsa_table, engine_unregister_all_DSA, e, &dummy_nid, 1, 1);
0
48 return 1;
executed 367 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
367
49}-
50-
51/*-
52 * Exposed API function to get a functional reference from the implementation-
53 * table (ie. try to get a functional reference from the tabled structural-
54 * references).-
55 */-
56ENGINE *ENGINE_get_default_DSA(void)-
57{-
58 return engine_table_select(&dsa_table, dummy_nid);
executed 15144 times by 1 test: return engine_table_select(&dsa_table, dummy_nid);
Executed by:
  • libcrypto.so.1.1
15144
59}-
60-
61/* Obtains an DSA implementation from an ENGINE functional reference */-
62const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e)-
63{-
64 return e->dsa_meth;
never executed: return e->dsa_meth;
0
65}-
66-
67/* Sets an DSA implementation in an ENGINE structure */-
68int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth)-
69{-
70 e->dsa_meth = dsa_meth;-
71 return 1;
never executed: return 1;
0
72}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2