OpenCoverage

ssl_init.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/ssl_init.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static int stopped;-
5-
6static void ssl_library_stop(void);-
7-
8static CRYPTO_ONCE ssl_base = -
9 0-
10 ;-
11static int ssl_base_inited = 0;-
12static int ossl_init_ssl_base(void); static int ossl_init_ssl_base_ossl_ret_ = 0; static void ossl_init_ssl_base_ossl_(void) { ossl_init_ssl_base_ossl_ret_ = ossl_init_ssl_base(); }
executed 1958 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
static int ossl_init_ssl_base(void)
1958
13{-
14-
15-
16-
17-
18-
19 EVP_add_cipher(EVP_des_cbc());-
20 EVP_add_cipher(EVP_des_ede3_cbc());-
21-
22-
23 EVP_add_cipher(EVP_idea_cbc());-
24-
25-
26 EVP_add_cipher(EVP_rc4());-
27-
28 EVP_add_cipher(EVP_rc4_hmac_md5());-
29-
30-
31-
32 EVP_add_cipher(EVP_rc2_cbc());-
33-
34-
35-
36-
37 EVP_add_cipher(EVP_rc2_40_cbc());-
38-
39 EVP_add_cipher(EVP_aes_128_cbc());-
40 EVP_add_cipher(EVP_aes_192_cbc());-
41 EVP_add_cipher(EVP_aes_256_cbc());-
42 EVP_add_cipher(EVP_aes_128_gcm());-
43 EVP_add_cipher(EVP_aes_256_gcm());-
44 EVP_add_cipher(EVP_aes_128_ccm());-
45 EVP_add_cipher(EVP_aes_256_ccm());-
46 EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1());-
47 EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1());-
48 EVP_add_cipher(EVP_aes_128_cbc_hmac_sha256());-
49 EVP_add_cipher(EVP_aes_256_cbc_hmac_sha256());-
50-
51 EVP_add_cipher(EVP_aria_128_gcm());-
52 EVP_add_cipher(EVP_aria_256_gcm());-
53-
54-
55 EVP_add_cipher(EVP_camellia_128_cbc());-
56 EVP_add_cipher(EVP_camellia_256_cbc());-
57-
58-
59 EVP_add_cipher(EVP_chacha20_poly1305());-
60-
61-
62-
63 EVP_add_cipher(EVP_seed_cbc());-
64-
65-
66-
67 EVP_add_digest(EVP_md5());-
68 OBJ_NAME_add(("ssl3-md5"),0x01|0x8000,("MD5"));-
69 EVP_add_digest(EVP_md5_sha1());-
70-
71 EVP_add_digest(EVP_sha1());-
72 OBJ_NAME_add(("ssl3-sha1"),0x01|0x8000,("SHA1"));-
73 OBJ_NAME_add(("RSA-SHA1-2"),0x01|0x8000,("RSA-SHA1"));-
74 EVP_add_digest(EVP_sha224());-
75 EVP_add_digest(EVP_sha256());-
76 EVP_add_digest(EVP_sha384());-
77 EVP_add_digest(EVP_sha512());-
78 SSL_COMP_get_compression_methods();-
79-
80-
81 if (!ssl_load_ciphers()
!ssl_load_ciphers()Description
TRUEnever evaluated
FALSEevaluated 1958 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
)
0-1958
82 return
never executed: return 0;
0;
never executed: return 0;
0
83 OPENSSL_atexit(ssl_library_stop);-
84 ssl_base_inited = 1;-
85 return
executed 1958 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1;
executed 1958 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1958
86}-
87-
88static CRYPTO_ONCE ssl_strings = -
89 0-
90 ;-
91static int ssl_strings_inited = 0;-
92static int ossl_init_load_ssl_strings(void); static int ossl_init_load_ssl_strings_ossl_ret_ = 0; static void ossl_init_load_ssl_strings_ossl_(void) { ossl_init_load_ssl_strings_ossl_ret_ = ossl_init_load_ssl_strings(); }
executed 546 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
static int ossl_init_load_ssl_strings(void)
546
93{-
94 ERR_load_SSL_strings();-
95 ssl_strings_inited = 1;-
96-
97 return
executed 546 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1;
executed 546 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
546
98}-
99-
100static int ossl_init_no_load_ssl_strings(void); static int ossl_init_no_load_ssl_strings_ossl_ret_ = 0; static void ossl_init_no_load_ssl_strings_ossl_(void) { ossl_init_no_load_ssl_strings_ossl_ret_ = ossl_init_no_load_ssl_strings(); }
never executed: end of block
static int ossl_init_no_load_ssl_strings(void)
0
101{-
102-
103 return
never executed: return 1;
1;
never executed: return 1;
0
104}-
105-
106static void ssl_library_stop(void)-
107{-
108-
109 if (stopped
stoppedDescription
TRUEnever evaluated
FALSEevaluated 1958 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
)
0-1958
110 return;
never executed: return;
0
111 stopped = 1;-
112-
113 if (ssl_base_inited
ssl_base_initedDescription
TRUEevaluated 1958 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEnever evaluated
) {
0-1958
114-
115-
116-
117-
118-
119 ssl_comp_free_compression_methods_int();-
120-
121 }
executed 1958 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1958
122-
123 if (ssl_strings_inited
ssl_strings_initedDescription
TRUEevaluated 546 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 1412 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
546-1412
124 err_free_strings_int();-
125 }
executed 546 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
546
126}
executed 1958 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1958
127-
128-
129-
130-
131-
132-
133int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS * settings)-
134{-
135 static int stoperrset = 0;-
136-
137 if (stopped
stoppedDescription
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
) {
0-18826
138 if (!stoperrset
!stoperrsetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
139-
140-
141-
142-
143-
144 stoperrset = 1;-
145 ERR_put_error(20,(342),((6|64)),__FILE__,192);-
146 }
never executed: end of block
0
147 return
never executed: return 0;
0;
never executed: return 0;
0
148 }-
149-
150 if (!OPENSSL_init_crypto(opts
!OPENSSL_init_...08L, settings)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-18826
1510-18826
152 | 0x00000040L
!OPENSSL_init_...08L, settings)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-18826
1530-18826
154 | 0x00000004L
!OPENSSL_init_...08L, settings)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-18826
155 | 0x00000008L,
!OPENSSL_init_...08L, settings)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-18826
156 settings)
!OPENSSL_init_...08L, settings)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
)
0-18826
157 return
never executed: return 0;
0;
never executed: return 0;
0
158-
159 if (!(CRYPTO_THREAD_run_once(&ssl_base, ossl_init_ssl_base_ossl_)
CRYPTO_THREAD_...sl_base_ossl_)Description
TRUEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEnever evaluated
? ossl_init_ssl_base_ossl_ret_ : 0)
!(CRYPTO_THREA...ossl_ret_ : 0)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
)
0-18826
160 return
never executed: return 0;
0;
never executed: return 0;
0
161-
162 if ((
(opts & 0x00100000L)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
opts & 0x00100000L)
(opts & 0x00100000L)Description
TRUEnever evaluated
FALSEevaluated 18826 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-18826
163 && !(CRYPTO_THREAD_run_once(&ssl_strings, ossl_init_no_load_ssl_strings_ossl_) ? ossl_init_no_load_ssl_strings_ossl_ret_ : 0)
!(CRYPTO_THREA...ossl_ret_ : 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
164 return
never executed: return 0;
0;
never executed: return 0;
0
165-
166 if ((
(opts & 0x00200000L)Description
TRUEevaluated 17037 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 1789 times by 1 test
Evaluated by:
  • libssl.so.1.1
opts & 0x00200000L)
(opts & 0x00200000L)Description
TRUEevaluated 17037 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 1789 times by 1 test
Evaluated by:
  • libssl.so.1.1
1789-17037
167 && !(CRYPTO_THREAD_run_once(&ssl_strings, ossl_init_load_ssl_strings_ossl_) ? ossl_init_load_ssl_strings_ossl_ret_ : 0)
!(CRYPTO_THREA...ossl_ret_ : 0)Description
TRUEnever evaluated
FALSEevaluated 17037 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
)
0-17037
168 return
never executed: return 0;
0;
never executed: return 0;
0
169-
170 return
executed 18826 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
1;
executed 18826 times by 2 tests: return 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
18826
171}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2