OpenCoverage

ssl_mcnf.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/ssl_mcnf.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4void SSL_add_ssl_module(void)-
5{-
6-
7}-
8-
9static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system)-
10{-
11 SSL_CONF_CTX *cctx = -
12 ((void *)0)-
13 ;-
14 size_t i, idx, cmd_count;-
15 int rv = 0;-
16 unsigned int flags;-
17 const SSL_METHOD *meth;-
18 const SSL_CONF_CMD *cmds;-
19-
20 if (s ==
s == ((void *)0)Description
TRUEevaluated 10470 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEnever evaluated
0-10470
21 ((void *)0)
s == ((void *)0)Description
TRUEevaluated 10470 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEnever evaluated
0-10470
22 && ctx ==
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 10470 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-10470
23 ((void *)0)
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 10470 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
0-10470
24 ) {-
25 ERR_put_error(20,(391),((3|64)),__FILE__,33);-
26 goto
never executed: goto err;
err;
never executed: goto err;
0
27 }-
28-
29 if (name ==
name == ((void *)0)Description
TRUEevaluated 8017 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 2453 times by 1 test
Evaluated by:
  • libssl.so.1.1
2453-8017
30 ((void *)0)
name == ((void *)0)Description
TRUEevaluated 8017 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 2453 times by 1 test
Evaluated by:
  • libssl.so.1.1
2453-8017
31 && system
systemDescription
TRUEevaluated 8017 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEnever evaluated
)
0-8017
32 name = "system_default";
executed 8017 times by 2 tests: name = "system_default";
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
8017
33 if (!conf_ssl_name_find(name, &idx)
!conf_ssl_name...nd(name, &idx)Description
TRUEevaluated 8016 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2454-8016
34 if (!system
!systemDescription
TRUEnever evaluated
FALSEevaluated 8016 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
) {
0-8016
35 ERR_put_error(20,(391),(113),__FILE__,41);-
36 ERR_add_error_data(2, "name=", name);-
37 }
never executed: end of block
0
38 goto
executed 8016 times by 2 tests: goto err;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
err;
executed 8016 times by 2 tests: goto err;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
8016
39 }-
40 cmds = conf_ssl_get(idx, &name, &cmd_count);-
41 cctx = SSL_CONF_CTX_new();-
42 if (cctx ==
cctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2454
43 ((void *)0)
cctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2454
44 )-
45 goto
never executed: goto err;
err;
never executed: goto err;
0
46 flags = 0x2;-
47 if (!system
!systemDescription
TRUEevaluated 2453 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
)
1-2453
48 flags |= 0x20 | 0x40;
executed 2453 times by 1 test: flags |= 0x20 | 0x40;
Executed by:
  • libssl.so.1.1
2453
49 if (s !=
s != ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2454
50 ((void *)0)
s != ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2454
51 ) {-
52 meth = s->method;-
53 SSL_CONF_CTX_set_ssl(cctx, s);-
54 }
never executed: end of block
else {
0
55 meth = ctx->method;-
56 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);-
57 }
executed 2454 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2454
58 if (meth->ssl_accept != ssl_undefined_function
meth->ssl_acce...fined_functionDescription
TRUEevaluated 1244 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1210 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1210-1244
59 flags |= 0x8;
executed 1244 times by 1 test: flags |= 0x8;
Executed by:
  • libssl.so.1.1
1244
60 if (meth->ssl_connect != ssl_undefined_function
meth->ssl_conn...fined_functionDescription
TRUEevaluated 1211 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1243 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1211-1243
61 flags |= 0x4;
executed 1211 times by 1 test: flags |= 0x4;
Executed by:
  • libssl.so.1.1
1211
62 SSL_CONF_CTX_set_flags(cctx, flags);-
63 for (i = 0; i < cmd_count
i < cmd_countDescription
TRUEevaluated 10987 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
2454-10987
64 char *cmdstr, *arg;-
65-
66 conf_ssl_get_cmd(cmds, i, &cmdstr, &arg);-
67 rv = SSL_CONF_cmd(cctx, cmdstr, arg);-
68 if (rv <= 0
rv <= 0Description
TRUEnever evaluated
FALSEevaluated 10987 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-10987
69 if (rv == -2
rv == -2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
70 ERR_put_error(20,(391),(139),__FILE__,72);
never executed: ERR_put_error(20,(391),(139),__FILE__,72);
0
71 else-
72 ERR_put_error(20,(391),(384),__FILE__,74);
never executed: ERR_put_error(20,(391),(384),__FILE__,74);
0
73 ERR_add_error_data(6, "section=", name, ", cmd=", cmdstr,-
74 ", arg=", arg);-
75 goto
never executed: goto err;
err;
never executed: goto err;
0
76 }-
77 }
executed 10987 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
10987
78 rv = SSL_CONF_CTX_finish(cctx);-
79 err:
code before this statement executed 2454 times by 1 test: err:
Executed by:
  • libssl.so.1.1
2454
80 SSL_CONF_CTX_free(cctx);-
81 return
executed 10470 times by 2 tests: return rv <= 0 ? 0 : 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
rv <= 0
rv <= 0Description
TRUEevaluated 8016 times by 2 tests
Evaluated by:
  • libssl.so.1.1
  • tls13encryptiontest
FALSEevaluated 2454 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0 : 1;
executed 10470 times by 2 tests: return rv <= 0 ? 0 : 1;
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
2454-10470
82}-
83-
84int SSL_config(SSL *s, const char *name)-
85{-
86 return
never executed: return ssl_do_config(s, ((void *)0) , name, 0);
ssl_do_config(s,
never executed: return ssl_do_config(s, ((void *)0) , name, 0);
0
87 ((void *)0)
never executed: return ssl_do_config(s, ((void *)0) , name, 0);
0
88 , name, 0);
never executed: return ssl_do_config(s, ((void *)0) , name, 0);
0
89}-
90-
91int SSL_CTX_config(SSL_CTX *ctx, const char *name)-
92{-
93 return
executed 2453 times by 1 test: return ssl_do_config( ((void *)0) , ctx, name, 0);
Executed by:
  • libssl.so.1.1
ssl_do_config(
executed 2453 times by 1 test: return ssl_do_config( ((void *)0) , ctx, name, 0);
Executed by:
  • libssl.so.1.1
2453
94 ((void *)0)
executed 2453 times by 1 test: return ssl_do_config( ((void *)0) , ctx, name, 0);
Executed by:
  • libssl.so.1.1
2453
95 , ctx, name, 0);
executed 2453 times by 1 test: return ssl_do_config( ((void *)0) , ctx, name, 0);
Executed by:
  • libssl.so.1.1
2453
96}-
97-
98void ssl_ctx_system_config(SSL_CTX *ctx)-
99{-
100 ssl_do_config(-
101 ((void *)0)-
102 , ctx, -
103 ((void *)0)-
104 , 1);-
105}
executed 8017 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
8017
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2