OpenCoverage

statem_lib.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/statem/statem_lib.c
Switch to Source codePreprocessed file
LineSourceCount
1typedef struct x509err2alert_st {-
2 int x509err;-
3 int alert;-
4} X509ERR2ALERT;-
5-
6-
7const unsigned char hrrrandom[] = {-
8 0xcf, 0x21, 0xad, 0x74, 0xe5, 0x9a, 0x61, 0x11, 0xbe, 0x1d, 0x8c, 0x02,-
9 0x1e, 0x65, 0xb8, 0x91, 0xc2, 0xa2, 0x11, 0x16, 0x7a, 0xbb, 0x8c, 0x5e,-
10 0x07, 0x9e, 0x09, 0xe2, 0xc8, 0xa8, 0x33, 0x9c-
11};-
12-
13-
14-
15-
16-
17int ssl3_do_write(SSL *s, int type)-
18{-
19 int ret;-
20 size_t written = 0;-
21-
22 ret = ssl3_write_bytes(s, type, &s->init_buf->data[s->init_off],-
23 s->init_num, &written);-
24 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-24034
25 return
never executed: return -1;
-1;
never executed: return -1;
0
26 if (type == 22
type == 22Description
TRUEevaluated 19718 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4316 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
4316-19718
27-
28-
29-
30-
31-
32 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 19718 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 10648 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 9070 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 10648 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 9070 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 5919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4729 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 5919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4729 times by 1 test
Evaluated by:
  • libssl.so.1.1
) || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
s->statem.hand...SESSION_TICKETDescription
TRUEevaluated 4886 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1033 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-19718
33 && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
s->statem.hand..._CW_KEY_UPDATEDescription
TRUEevaluated 4882 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
4-4882
34 && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE
s->statem.hand..._SW_KEY_UPDATEDescription
TRUEevaluated 4878 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
))
4-4878
35 if (!ssl3_finish_mac(s,
!ssl3_finish_m...off], written)Description
TRUEnever evaluated
FALSEevaluated 18677 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-18677
36 (unsigned char *)&s->init_buf->data[s->init_off],
!ssl3_finish_m...off], written)Description
TRUEnever evaluated
FALSEevaluated 18677 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-18677
37 written)
!ssl3_finish_m...off], written)Description
TRUEnever evaluated
FALSEevaluated 18677 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-18677
38 return
never executed: return -1;
-1;
never executed: return -1;
0
39 if (written == s->init_num
written == s->init_numDescription
TRUEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-24034
40 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-24034
41 s->msg_callback(1, s->version, type, s->init_buf->data,
never executed: s->msg_callback(1, s->version, type, s->init_buf->data, (size_t)(s->init_off + s->init_num), s, s->msg_callback_arg);
0
42 (size_t)(s->init_off + s->init_num), s,
never executed: s->msg_callback(1, s->version, type, s->init_buf->data, (size_t)(s->init_off + s->init_num), s, s->msg_callback_arg);
0
43 s->msg_callback_arg);
never executed: s->msg_callback(1, s->version, type, s->init_buf->data, (size_t)(s->init_off + s->init_num), s, s->msg_callback_arg);
0
44 return
executed 24034 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 24034 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
24034
45 }-
46 s->init_off += written;-
47 s->init_num -= written;-
48 return
never executed: return 0;
0;
never executed: return 0;
0
49}-
50-
51int tls_close_construct_packet(SSL *s, WPACKET *pkt, int htype)-
52{-
53 size_t msglen;-
54-
55 if ((htype != 0x0101
htype != 0x0101Description
TRUEevaluated 19718 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4316 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !WPACKET_close(pkt)
!WPACKET_close(pkt)Description
TRUEnever evaluated
FALSEevaluated 19718 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-19718
56 || !WPACKET_get_length(pkt, &msglen)
!WPACKET_get_l...(pkt, &msglen)Description
TRUEnever evaluated
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-24034
57 || msglen > 0x7fffffff
msglen > 0x7fffffffDescription
TRUEnever evaluated
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-24034
58 return
never executed: return 0;
0;
never executed: return 0;
0
59 s->init_num = (int)msglen;-
60 s->init_off = 0;-
61-
62 return
executed 24034 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 24034 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
24034
63}-
64-
65int tls_setup_handshake(SSL *s)-
66{-
67 if (!ssl3_init_finished_mac(s)
!ssl3_init_finished_mac(s)Description
TRUEnever evaluated
FALSEevaluated 8064 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-8064
68-
69 return
never executed: return 0;
0;
never executed: return 0;
0
70 }-
71-
72-
73 memset(s->ext.extflags, 0, sizeof(s->ext.extflags));-
74-
75 if (s->server
s->serverDescription
TRUEevaluated 3751 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4313 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
3751-4313
76 struct stack_st_SSL_CIPHER *ciphers = SSL_get_ciphers(s);-
77 int i, ver_min, ver_max, ok = 0;-
78-
79-
80-
81-
82-
83-
84 if (ssl_get_min_max_version(s, &ver_min, &ver_max,
ssl_get_min_ma...id *)0) ) != 0Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3703 times by 1 test
Evaluated by:
  • libssl.so.1.1
48-3703
85 ((void *)0)
ssl_get_min_ma...id *)0) ) != 0Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3703 times by 1 test
Evaluated by:
  • libssl.so.1.1
48-3703
86 ) != 0
ssl_get_min_ma...id *)0) ) != 0Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3703 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
48-3703
87 ossl_statem_fatal((s), (80), (508), ((4|64)),-
88 __FILE__-
89 ,-
90 110-
91 )-
92 ;-
93 return
executed 48 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 48 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
48
94 }-
95 for (i = 0; i < sk_SSL_CIPHER_num(ciphers)
i < sk_SSL_CIPHER_num(ciphers)Description
TRUEevaluated 10179 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
1-10179
96 const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);-
97-
98 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 1234 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8945 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 1234 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8945 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1234-8945
99 if (((((
((ver_max) == 0x0100)Description
TRUEnever evaluated
FALSEevaluated 1234 times by 1 test
Evaluated by:
  • libssl.so.1.1
((((ver_max) =...c->min_dtls)))Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1038 times by 1 test
Evaluated by:
  • libssl.so.1.1
ver_max) == 0x0100)
((ver_max) == 0x0100)Description
TRUEnever evaluated
FALSEevaluated 1234 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (ver_max)) <= (((c->min_dtls) == 0x0100) ? 0xff00 : (c->min_dtls)))
((((ver_max) =...c->min_dtls)))Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1038 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
0-1234
100 ((((
((((ver_max) =...c->max_dtls)))Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
ver_max) == 0x0100) ? 0xff00 : (ver_max)) >= (((c->max_dtls) == 0x0100) ? 0xff00 : (c->max_dtls)))
((((ver_max) =...c->max_dtls)))Description
TRUEevaluated 196 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-196
101 ok = 1;
executed 196 times by 1 test: ok = 1;
Executed by:
  • libssl.so.1.1
196
102 }
executed 1234 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (ver_max >= c->min_tls
ver_max >= c->min_tlsDescription
TRUEevaluated 3507 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5438 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& ver_max <= c->max_tls
ver_max <= c->max_tlsDescription
TRUEevaluated 3506 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-5438
103 ok = 1;-
104 }
executed 3506 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3506
105 if (ok
okDescription
TRUEevaluated 3702 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6477 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
3702-6477
106 break;
executed 3702 times by 1 test: break;
Executed by:
  • libssl.so.1.1
3702
107 }
executed 6477 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
6477
108 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3702 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-3702
109 ossl_statem_fatal((s), (40), (508), (181),-
110 __FILE__-
111 ,-
112 128-
113 )-
114 ;-
115 ERR_add_error_data(1, "No ciphers enabled for max supported "-
116 "SSL/TLS version");-
117 return
executed 1 time by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 1 time by 1 test: return 0;
Executed by:
  • libssl.so.1.1
1
118 }-
119 if (((
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 3663 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.finish_md_len == 0
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 3663 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.peer_finish_md_len == 0
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
0-3663
120-
121 -
122 __atomic_fetch_add ((-
123 (&s->session_ctx->stats.sess_accept)-
124 ), (-
125 1-
126 ), (-
127 memory_order_relaxed-
128 ))-
129 ;-
130 }
executed 3663 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
3663
131-
132 -
133 __atomic_fetch_add ((-
134 (&s->ctx->stats.sess_accept_renegotiate)-
135 ), (-
136 1-
137 ), (-
138 memory_order_relaxed-
139 ))-
140 ;-
141-
142 s->s3->tmp.cert_request = 0;-
143 }
executed 39 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
39
144 } else {-
145 if (((
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 4289 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.finish_md_len == 0
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 4289 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.peer_finish_md_len == 0
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
))
0-4289
146 -
147 __atomic_fetch_add ((
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
148 (&s->session_ctx->stats.sess_connect)
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
149 ), (
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
150 1
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
151 ), (
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
152 memory_order_relaxed
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
153 ))
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
154 ;
executed 4289 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
4289
155 else-
156 -
157 __atomic_fetch_add ((
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
158 (&s->session_ctx->stats.sess_connect_renegotiate)
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
159 ), (
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
160 1
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
161 ), (
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
162 memory_order_relaxed
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
163 ))
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
164 ;
executed 24 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_connect_renegotiate) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
24
165-
166-
167 memset(s->s3->client_random, 0, sizeof(s->s3->client_random));-
168 s->hit = 0;-
169-
170 s->s3->tmp.cert_req = 0;-
171-
172 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 191 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4122 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 191 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4122 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
191-4122
173 s->statem.use_timer = 1;
executed 191 times by 1 test: s->statem.use_timer = 1;
Executed by:
  • libssl.so.1.1
191
174 }
executed 4313 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4313
175-
176 return
executed 8015 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 8015 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
8015
177}-
178static int get_cert_verify_tbs_data(SSL *s, unsigned char *tls13tbs,-
179 void **hdata, size_t *hdatalen)-
180{-
181 static const char *servercontext = "TLS 1.3, server CertificateVerify";-
182 static const char *clientcontext = "TLS 1.3, client CertificateVerify";-
183-
184 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1275 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1246 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1246 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1246 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1246 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-1275
185 size_t hashlen;-
186-
187-
188 memset(tls13tbs, 32, 64);-
189-
190 if (s->statem.hand_state == TLS_ST_CR_CERT_VRFY
s->statem.hand...T_CR_CERT_VRFYDescription
TRUEevaluated 473 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 773 times by 1 test
Evaluated by:
  • libssl.so.1.1
473-773
191 || s->statem.hand_state == TLS_ST_SW_CERT_VRFY
s->statem.hand...T_SW_CERT_VRFYDescription
TRUEevaluated 740 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 33 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
33-740
192 strcpy((char *)tls13tbs + 64, servercontext);
executed 1213 times by 1 test: strcpy((char *)tls13tbs + 64, servercontext);
Executed by:
  • libssl.so.1.1
1213
193 else-
194 strcpy((char *)tls13tbs + 64, clientcontext);
executed 33 times by 1 test: strcpy((char *)tls13tbs + 64, clientcontext);
Executed by:
  • libssl.so.1.1
33
195-
196-
197-
198-
199-
200-
201 if (s->statem.hand_state == TLS_ST_CR_CERT_VRFY
s->statem.hand...T_CR_CERT_VRFYDescription
TRUEevaluated 473 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 773 times by 1 test
Evaluated by:
  • libssl.so.1.1
473-773
202 || s->statem.hand_state == TLS_ST_SR_CERT_VRFY
s->statem.hand...T_SR_CERT_VRFYDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 758 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
15-758
203 memcpy(tls13tbs + (64 + 33 + 1), s->cert_verify_hash,-
204 s->cert_verify_hash_len);-
205 hashlen = s->cert_verify_hash_len;-
206 }
executed 488 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!ssl_handshake_hash(s, tls13tbs + (64 + 33 + 1),
!ssl_handshake... 64, &hashlen)Description
TRUEnever evaluated
FALSEevaluated 758 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-758
207 64, &hashlen)
!ssl_handshake... 64, &hashlen)Description
TRUEnever evaluated
FALSEevaluated 758 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-758
208-
209 return
never executed: return 0;
0;
never executed: return 0;
0
210 }-
211-
212 *hdata = tls13tbs;-
213 *hdatalen = (64 + 33 + 1) + hashlen;-
214 }
executed 1246 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
1246
215 size_t retlen;-
216-
217 retlen = BIO_ctrl(s->s3->handshake_buffer,3,0,(char *)(hdata));-
218 if (retlen <= 0
retlen <= 0Description
TRUEnever evaluated
FALSEevaluated 45 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-45
219 ossl_statem_fatal((s), (80), (588), ((4|64)),-
220 __FILE__-
221 ,-
222 210-
223 )-
224 ;-
225 return
never executed: return 0;
0;
never executed: return 0;
0
226 }-
227 *hdatalen = retlen;-
228 }
executed 45 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
45
229-
230 return
executed 1291 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 1291 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1291
231}-
232-
233int tls_construct_cert_verify(SSL *s, WPACKET *pkt)-
234{-
235 EVP_PKEY *pkey = -
236 ((void *)0)-
237 ;-
238 const EVP_MD *md = -
239 ((void *)0)-
240 ;-
241 EVP_MD_CTX *mctx = -
242 ((void *)0)-
243 ;-
244 EVP_PKEY_CTX *pctx = -
245 ((void *)0)-
246 ;-
247 size_t hdatalen = 0, siglen = 0;-
248 void *hdata;-
249 unsigned char *sig = -
250 ((void *)0)-
251 ;-
252 unsigned char tls13tbs[(64 + 33 + 1) + 64];-
253 const SIGALG_LOOKUP *lu = s->s3->tmp.sigalg;-
254-
255 if (lu ==
lu == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
256 ((void *)0)
lu == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
257 || s->s3->tmp.cert ==
s->s3->tmp.cert == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
258 ((void *)0)
s->s3->tmp.cert == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
259 ) {-
260 ossl_statem_fatal((s), (80), (496), ((4|64)),-
261 __FILE__-
262 ,-
263 233-
264 )-
265 ;-
266 goto
never executed: goto err;
err;
never executed: goto err;
0
267 }-
268 pkey = s->s3->tmp.cert->privatekey;-
269-
270 if (pkey ==
pkey == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
271 ((void *)0)
pkey == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
272 || !tls1_lookup_md(lu, &md)
!tls1_lookup_md(lu, &md)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
273 ossl_statem_fatal((s), (80), (496), ((4|64)),-
274 __FILE__-
275 ,-
276 240-
277 )-
278 ;-
279 goto
never executed: goto err;
err;
never executed: goto err;
0
280 }-
281-
282 mctx = EVP_MD_CTX_new();-
283 if (mctx ==
mctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
284 ((void *)0)
mctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
285 ) {-
286 ossl_statem_fatal((s), (80), (496), ((1|64)),-
287 __FILE__-
288 ,-
289 247-
290 )-
291 ;-
292 goto
never executed: goto err;
err;
never executed: goto err;
0
293 }-
294-
295-
296 if (!get_cert_verify_tbs_data(s, tls13tbs, &hdata, &hdatalen)
!get_cert_veri...ta, &hdatalen)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
297-
298 goto
never executed: goto err;
err;
never executed: goto err;
0
299 }-
300-
301 if ((
(s->method->ss...c_flags & 0x2)Description
TRUEevaluated 774 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x2)
(s->method->ss...c_flags & 0x2)Description
TRUEevaluated 774 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !WPACKET_put_bytes__((pkt), (lu->sigalg), 2)
!WPACKET_put_b...u->sigalg), 2)Description
TRUEnever evaluated
FALSEevaluated 774 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-774
302 ossl_statem_fatal((s), (80), (496), ((4|64)),-
303 __FILE__-
304 ,-
305 259-
306 )-
307 ;-
308 goto
never executed: goto err;
err;
never executed: goto err;
0
309 }-
310 siglen = EVP_PKEY_size(pkey);-
311 sig = CRYPTO_malloc(siglen, __FILE__, 263);-
312 if (sig ==
sig == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
313 ((void *)0)
sig == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
314 ) {-
315 ossl_statem_fatal((s), (80), (496), ((1|64)),-
316 __FILE__-
317 ,-
318 266-
319 )-
320 ;-
321 goto
never executed: goto err;
err;
never executed: goto err;
0
322 }-
323-
324 if (EVP_DigestSignInit(mctx, &pctx, md,
EVP_DigestSign...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
325 ((void *)0)
EVP_DigestSign...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
326 , pkey) <= 0
EVP_DigestSign...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
327 ossl_statem_fatal((s), (80), (496), (6),-
328 __FILE__-
329 ,-
330 272-
331 )-
332 ;-
333 goto
never executed: goto err;
err;
never executed: goto err;
0
334 }-
335-
336 if (lu->sig == 912
lu->sig == 912Description
TRUEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 190 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
190-593
337 if (RSA_pkey_ctx_ctrl(pctx, -1, (0x1000 + 1), 6,
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
338 ((void *)0)
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
339 ) <= 0
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
340 || RSA_pkey_ctx_ctrl(pctx, ((1<<3)|(1<<4)), (0x1000 + 2), -1,
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
341 ((void *)0)
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
342 )
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-593
343 <= 0
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 593 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-593
344 ossl_statem_fatal((s), (80), (496), (6),-
345 __FILE__-
346 ,-
347 281-
348 )-
349 ;-
350 goto
never executed: goto err;
err;
never executed: goto err;
0
351 }-
352 }
executed 593 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
593
353 if (s->version == 0x0300
s->version == 0x0300Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
354 if (EVP_DigestUpdate(mctx,hdata,hdatalen) <= 0
EVP_DigestUpda...hdatalen) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
355 || !EVP_MD_CTX_ctrl(mctx, 0x1d,
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
0
356 (int)s->session->master_key_length,
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
0
357 s->session->master_key)
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
0
358 || EVP_DigestSignFinal(mctx, sig, &siglen) <= 0
EVP_DigestSign... &siglen) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
359-
360 ossl_statem_fatal((s), (80), (496), (6),-
361 __FILE__-
362 ,-
363 293-
364 )-
365 ;-
366 goto
never executed: goto err;
err;
never executed: goto err;
0
367 }-
368 }
never executed: end of block
else if (EVP_DigestSign(mctx, sig, &siglen, hdata, hdatalen) <= 0
EVP_DigestSign...hdatalen) <= 0Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
369 ossl_statem_fatal((s), (80), (496), (6),-
370 __FILE__-
371 ,-
372 298-
373 )-
374 ;-
375 goto
never executed: goto err;
err;
never executed: goto err;
0
376 }-
377-
378-
379 {-
380 int pktype = lu->sig;-
381-
382 if (pktype == 811
pktype == 811Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
383 || pktype == 979
pktype == 979Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-783
384 || pktype == 980
pktype == 980Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-783
385 BUF_reverse(sig,
never executed: BUF_reverse(sig, ((void *)0) , siglen);
0
386 ((void *)0)
never executed: BUF_reverse(sig, ((void *)0) , siglen);
0
387 , siglen);
never executed: BUF_reverse(sig, ((void *)0) , siglen);
0
388 }-
389-
390-
391 if (!WPACKET_sub_memcpy__((pkt), (sig), (siglen), 2)
!WPACKET_sub_m..., (siglen), 2)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
392 ossl_statem_fatal((s), (80), (496), ((4|64)),-
393 __FILE__-
394 ,-
395 315-
396 )-
397 ;-
398 goto
never executed: goto err;
err;
never executed: goto err;
0
399 }-
400-
401-
402 if (!ssl3_digest_cached_records(s, 0)
!ssl3_digest_c..._records(s, 0)Description
TRUEnever evaluated
FALSEevaluated 783 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-783
403-
404 goto
never executed: goto err;
err;
never executed: goto err;
0
405 }-
406-
407 CRYPTO_free(sig, __FILE__, 325);-
408 EVP_MD_CTX_free(mctx);-
409 return
executed 783 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 783 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
783
410 err:-
411 CRYPTO_free(sig, __FILE__, 329);-
412 EVP_MD_CTX_free(mctx);-
413 return
never executed: return 0;
0;
never executed: return 0;
0
414}-
415-
416MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)-
417{-
418 EVP_PKEY *pkey = -
419 ((void *)0)-
420 ;-
421 const unsigned char *data;-
422-
423 unsigned char *gost_data = -
424 ((void *)0)-
425 ;-
426-
427 MSG_PROCESS_RETURN ret = MSG_PROCESS_ERROR;-
428 int j;-
429 unsigned int len;-
430 X509 *peer;-
431 const EVP_MD *md = -
432 ((void *)0)-
433 ;-
434 size_t hdatalen = 0;-
435 void *hdata;-
436 unsigned char tls13tbs[(64 + 33 + 1) + 64];-
437 EVP_MD_CTX *mctx = EVP_MD_CTX_new();-
438 EVP_PKEY_CTX *pctx = -
439 ((void *)0)-
440 ;-
441-
442 if (mctx ==
mctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
443 ((void *)0)
mctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
444 ) {-
445 ossl_statem_fatal((s), (80), (379), ((1|64)),-
446 __FILE__-
447 ,-
448 354-
449 )-
450 ;-
451 goto
never executed: goto err;
err;
never executed: goto err;
0
452 }-
453-
454 peer = s->session->peer;-
455 pkey = X509_get0_pubkey(peer);-
456 if (pkey ==
pkey == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
457 ((void *)0)
pkey == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
458 ) {-
459 ossl_statem_fatal((s), (80), (379), ((4|64)),-
460 __FILE__-
461 ,-
462 362-
463 )-
464 ;-
465 goto
never executed: goto err;
err;
never executed: goto err;
0
466 }-
467-
468 if (ssl_cert_lookup_by_pkey(pkey,
ssl_cert_looku...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
469 ((void *)0)
ssl_cert_looku...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
470 ) ==
ssl_cert_looku...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
471 ((void *)0)
ssl_cert_looku...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 509 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-509
472 ) {-
473 ossl_statem_fatal((s), (47), (379), (220),-
474 __FILE__-
475 ,-
476 368-
477 )-
478 ;-
479 goto
never executed: goto err;
err;
never executed: goto err;
0
480 }-
481-
482 if ((
(s->method->ss...c_flags & 0x2)Description
TRUEevaluated 503 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x2)
(s->method->ss...c_flags & 0x2)Description
TRUEevaluated 503 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
6-503
483 unsigned int sigalg;-
484-
485 if (!PACKET_get_net_2(pkt, &sigalg)
!PACKET_get_ne...(pkt, &sigalg)Description
TRUEnever evaluated
FALSEevaluated 503 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-503
486 ossl_statem_fatal((s), (50), (379), (240),-
487 __FILE__-
488 ,-
489 377-
490 )-
491 ;-
492 goto
never executed: goto err;
err;
never executed: goto err;
0
493 }-
494 if (tls12_check_peer_sigalg(s, sigalg, pkey) <= 0
tls12_check_pe...lg, pkey) <= 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 502 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-502
495-
496 goto
executed 1 time by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 1 time by 1 test: goto err;
Executed by:
  • libssl.so.1.1
1
497 }-
498 }
executed 502 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!tls1_set_peer_legacy_sigalg(s, pkey)
!tls1_set_peer...igalg(s, pkey)Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-502
499 ossl_statem_fatal((s), (80), (379), ((4|64)),-
500 __FILE__-
501 ,-
502 386-
503 )-
504 ;-
505 goto
never executed: goto err;
err;
never executed: goto err;
0
506 }-
507-
508 if (!tls1_lookup_md(s->s3->tmp.peer_sigalg, &md)
!tls1_lookup_m...r_sigalg, &md)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
509 ossl_statem_fatal((s), (80), (379), ((4|64)),-
510 __FILE__-
511 ,-
512 392-
513 )-
514 ;-
515 goto
never executed: goto err;
err;
never executed: goto err;
0
516 }-
517 if (!(s->method->ssl3_enc->enc_flags & 0x2)
!(s->method->s...c_flags & 0x2)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 502 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-502
518 && ((PACKET_remaining(pkt) == 64
PACKET_remaining(pkt) == 64Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-6
519 && (EVP_PKEY_id(pkey) == 811
EVP_PKEY_id(pkey) == 811Description
TRUEnever evaluated
FALSEnever evaluated
0
520 || EVP_PKEY_id(pkey) == 979
EVP_PKEY_id(pkey) == 979Description
TRUEnever evaluated
FALSEnever evaluated
))
0
521 || (PACKET_remaining(pkt) == 128
PACKET_remaining(pkt) == 128Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-6
522 && EVP_PKEY_id(pkey) == 980
EVP_PKEY_id(pkey) == 980Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
523 len = PACKET_remaining(pkt);-
524 }
never executed: end of block
else
0
525-
526 if (!PACKET_get_net_2(pkt, &len)
!PACKET_get_net_2(pkt, &len)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
527 ossl_statem_fatal((s), (50), (379), (159),-
528 __FILE__-
529 ,-
530 418-
531 )-
532 ;-
533 goto
never executed: goto err;
err;
never executed: goto err;
0
534 }-
535-
536 j = EVP_PKEY_size(pkey);-
537 if (((
((int)len > j)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
int)len > j)
((int)len > j)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| ((
((int)PACKET_r...ning(pkt) > j)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
int)PACKET_remaining(pkt) > j)
((int)PACKET_r...ning(pkt) > j)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-508
538 || (
(PACKET_remaining(pkt) == 0)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
PACKET_remaining(pkt) == 0)
(PACKET_remaining(pkt) == 0)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
539 ossl_statem_fatal((s), (50), (379), (265),-
540 __FILE__-
541 ,-
542 426-
543 )-
544 ;-
545 goto
never executed: goto err;
err;
never executed: goto err;
0
546 }-
547 if (!PACKET_get_bytes(pkt, &data, len)
!PACKET_get_by...t, &data, len)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
548 ossl_statem_fatal((s), (50), (379), (159),-
549 __FILE__-
550 ,-
551 431-
552 )-
553 ;-
554 goto
never executed: goto err;
err;
never executed: goto err;
0
555 }-
556-
557 if (!get_cert_verify_tbs_data(s, tls13tbs, &hdata, &hdatalen)
!get_cert_veri...ta, &hdatalen)Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
558-
559 goto
never executed: goto err;
err;
never executed: goto err;
0
560 }-
561-
562-
563-
564-
565 if (EVP_DigestVerifyInit(mctx, &pctx, md,
EVP_DigestVeri...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-508
566 ((void *)0)
EVP_DigestVeri...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-508
567 , pkey) <= 0
EVP_DigestVeri...) , pkey) <= 0Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
568 ossl_statem_fatal((s), (80), (379), (6),-
569 __FILE__-
570 ,-
571 445-
572 )-
573 ;-
574 goto
never executed: goto err;
err;
never executed: goto err;
0
575 }-
576-
577 {-
578 int pktype = EVP_PKEY_id(pkey);-
579 if (pktype == 811
pktype == 811Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-508
580 || pktype == 979
pktype == 979Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-508
581 || pktype == 980
pktype == 980Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
582 if ((
(gost_data = C...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
gost_data = CRYPTO_malloc(len, __FILE__, 454)) ==
(gost_data = C...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
583 ((void *)0)
(gost_data = C...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
584 ) {-
585 ossl_statem_fatal((s), (80), (379), ((1|64)),-
586 __FILE__-
587 ,-
588 456-
589 )-
590 ;-
591 goto
never executed: goto err;
err;
never executed: goto err;
0
592 }-
593 BUF_reverse(gost_data, data, len);-
594 data = gost_data;-
595 }
never executed: end of block
0
596 }-
597-
598-
599 if ((s->s3->tmp.peer_sigalg !=
s->s3->tmp.pee...!= ((void *)0)Description
TRUEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-508
600 ((void *)0)
s->s3->tmp.pee...!= ((void *)0)Description
TRUEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-508
601 && s->s3->tmp.peer_sigalg->sig == 912
s->s3->tmp.pee...lg->sig == 912Description
TRUEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
23-485
602 if (RSA_pkey_ctx_ctrl(pctx, -1, (0x1000 + 1), 6,
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
603 ((void *)0)
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
604 ) <= 0
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
605 || RSA_pkey_ctx_ctrl(pctx, ((1<<3)|(1<<4)), (0x1000 + 2), -1,
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
606 ((void *)0)
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
607 )
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-485
608 <= 0
RSA_pkey_ctx_c...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEevaluated 485 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-485
609 ossl_statem_fatal((s), (80), (379), (6),-
610 __FILE__-
611 ,-
612 470-
613 )-
614 ;-
615 goto
never executed: goto err;
err;
never executed: goto err;
0
616 }-
617 }
executed 485 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
485
618 if (s->version == 0x0300
s->version == 0x0300Description
TRUEnever evaluated
FALSEevaluated 508 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-508
619 if (EVP_DigestUpdate(mctx,hdata,hdatalen) <= 0
EVP_DigestUpda...hdatalen) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
620 || !EVP_MD_CTX_ctrl(mctx, 0x1d,
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
0
621 (int)s->session->master_key_length,
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
0
622 s->session->master_key)
!EVP_MD_CTX_ct...n->master_key)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
623 ossl_statem_fatal((s), (80), (379), (6),-
624 __FILE__-
625 ,-
626 480-
627 )-
628 ;-
629 goto
never executed: goto err;
err;
never executed: goto err;
0
630 }-
631 if (EVP_DigestVerifyFinal(mctx, data, len) <= 0
EVP_DigestVeri...ata, len) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
632 ossl_statem_fatal((s), (51), (379), (123),-
633 __FILE__-
634 ,-
635 485-
636 )-
637 ;-
638 goto
never executed: goto err;
err;
never executed: goto err;
0
639 }-
640 }
never executed: end of block
else {
0
641 j = EVP_DigestVerify(mctx, data, len, hdata, hdatalen);-
642 if (j <= 0
j <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 506 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2-506
643 ossl_statem_fatal((s), (51), (379), (123),-
644 __FILE__-
645 ,-
646 492-
647 )-
648 ;-
649 goto
executed 2 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 2 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
2
650 }-
651 }
executed 506 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
506
652-
653 ret = MSG_PROCESS_CONTINUE_READING;-
654 err:
code before this statement executed 506 times by 1 test: err:
Executed by:
  • libssl.so.1.1
506
655 BIO_free(s->s3->handshake_buffer);-
656 s->s3->handshake_buffer = -
657 ((void *)0)-
658 ;-
659 EVP_MD_CTX_free(mctx);-
660-
661 CRYPTO_free(gost_data, __FILE__, 503);-
662-
663 return
executed 509 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
ret;
executed 509 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
509
664}-
665-
666int tls_construct_finished(SSL *s, WPACKET *pkt)-
667{-
668 size_t finish_md_len;-
669 const char *sender;-
670 size_t slen;-
671-
672-
673 if (!s->server
!s->serverDescription
TRUEevaluated 2054 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1919 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->post_handshake_auth != SSL_PHA_REQUESTED
s->post_handsh..._PHA_REQUESTEDDescription
TRUEevaluated 2029 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 25 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
25-2054
674 s->statem.cleanuphand = 1;
executed 2029 times by 1 test: s->statem.cleanuphand = 1;
Executed by:
  • libssl.so.1.1
2029
675-
676-
677-
678-
679-
680 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 3614 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 359 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2163 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2163 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-3614
681 && !s->server
!s->serverDescription
TRUEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 853 times by 1 test
Evaluated by:
  • libssl.so.1.1
598-853
682 && s->s3->tmp.cert_req == 0
s->s3->tmp.cert_req == 0Description
TRUEevaluated 555 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 43 times by 1 test
Evaluated by:
  • libssl.so.1.1
43-555
683 && (
(!s->method->s...0x010|0x002)))Description
TRUEnever evaluated
FALSEevaluated 555 times by 1 test
Evaluated by:
  • libssl.so.1.1
!s->method->ssl3_enc->change_cipher_state(s,
(!s->method->s...0x010|0x002)))Description
TRUEnever evaluated
FALSEevaluated 555 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-555
684 0x080 | (0x010|0x002)))
(!s->method->s...0x010|0x002)))Description
TRUEnever evaluated
FALSEevaluated 555 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {;
0-555
685-
686 return
never executed: return 0;
0;
never executed: return 0;
0
687 }-
688-
689 if (s->server
s->serverDescription
TRUEevaluated 1919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2054 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1919-2054
690 sender = s->method->ssl3_enc->server_finished_label;-
691 slen = s->method->ssl3_enc->server_finished_label_len;-
692 }
executed 1919 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
1919
693 sender = s->method->ssl3_enc->client_finished_label;-
694 slen = s->method->ssl3_enc->client_finished_label_len;-
695 }
executed 2054 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2054
696-
697 finish_md_len = s->method->ssl3_enc->final_finish_mac(s,-
698 sender, slen,-
699 s->s3->tmp.finish_md);-
700 if (finish_md_len == 0
finish_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 3973 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3973
701-
702 return
never executed: return 0;
0;
never executed: return 0;
0
703 }-
704-
705 s->s3->tmp.finish_md_len = finish_md_len;-
706-
707 if (!WPACKET_memcpy(pkt, s->s3->tmp.finish_md, finish_md_len)
!WPACKET_memcp...finish_md_len)Description
TRUEnever evaluated
FALSEevaluated 3973 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3973
708 ossl_statem_fatal((s), (80), (359), ((4|64)),-
709 __FILE__-
710 ,-
711 551-
712 )-
713 ;-
714 return
never executed: return 0;
0;
never executed: return 0;
0
715 }-
716-
717-
718-
719-
720-
721 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 3614 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 359 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2163 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2163 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) && !ssl_log_secret(s, "CLIENT_RANDOM",
!ssl_log_secre...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 2522 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-3614
722 s->session->master_key,
!ssl_log_secre...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 2522 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2522
723 s->session->master_key_length)
!ssl_log_secre...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 2522 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2522
724-
725 return
never executed: return 0;
0;
never executed: return 0;
0
726 }-
727-
728-
729-
730-
731 if (!((finish_md_len <= 64) != 0)
!((finish_md_len <= 64) != 0)Description
TRUEnever evaluated
FALSEevaluated 3973 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3973
732 ossl_statem_fatal((s), (80), (359), ((4|64)),-
733 __FILE__-
734 ,-
735 571-
736 )-
737 ;-
738 return
never executed: return 0;
0;
never executed: return 0;
0
739 }-
740 if (!s->server
!s->serverDescription
TRUEevaluated 2054 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1919 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1919-2054
741 memcpy(s->s3->previous_client_finished, s->s3->tmp.finish_md,-
742 finish_md_len);-
743 s->s3->previous_client_finished_len = finish_md_len;-
744 }
executed 2054 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
2054
745 memcpy(s->s3->previous_server_finished, s->s3->tmp.finish_md,-
746 finish_md_len);-
747 s->s3->previous_server_finished_len = finish_md_len;-
748 }
executed 1919 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1919
749-
750 return
executed 3973 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 3973 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
3973
751}-
752-
753int tls_construct_key_update(SSL *s, WPACKET *pkt)-
754{-
755 if (!WPACKET_put_bytes__((pkt), (s->key_update), 1)
!WPACKET_put_b...ey_update), 1)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-8
756 ossl_statem_fatal((s), (80), (517), ((4|64)),-
757 __FILE__-
758 ,-
759 591-
760 )-
761 ;-
762 return
never executed: return 0;
0;
never executed: return 0;
0
763 }-
764-
765 s->key_update = -1;-
766 return
executed 8 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 8 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
8
767}-
768-
769MSG_PROCESS_RETURN tls_process_key_update(SSL *s, PACKET *pkt)-
770{-
771 unsigned int updatetype;-
772-
773 s->key_update_count++;-
774 if (s->key_update_count > 32
s->key_update_count > 32Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-8
775 ossl_statem_fatal((s), (47), (518), (132),-
776 __FILE__-
777 ,-
778 606-
779 )-
780 ;-
781 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
782 }-
783-
784-
785-
786-
787-
788 if (RECORD_LAYER_processed_read_pending(&s->rlayer)
RECORD_LAYER_p...ng(&s->rlayer)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-7
789 ossl_statem_fatal((s), (10), (518), (182),-
790 __FILE__-
791 ,-
792 616-
793 )-
794 ;-
795 return
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR;
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
1
796 }-
797-
798 if (!PACKET_get_1(pkt, &updatetype)
!PACKET_get_1(..., &updatetype)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7
799 || PACKET_remaining(pkt) != 0
PACKET_remaining(pkt) != 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-7
800 ossl_statem_fatal((s), (50), (518), (122),-
801 __FILE__-
802 ,-
803 623-
804 )-
805 ;-
806 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
807 }-
808-
809-
810-
811-
812-
813 if (updatetype != 0
updatetype != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-4
814 && updatetype != 1
updatetype != 1Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3
815 ossl_statem_fatal((s), (47), (518), (122),-
816 __FILE__-
817 ,-
818 634-
819 )-
820 ;-
821 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
822 }-
823 if (updatetype == 1
updatetype == 1Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-4
824 && (
(s->shutdown & 1) == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
s->shutdown & 1) == 0
(s->shutdown & 1) == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
)
1-2
825 s->key_update = 0;
executed 2 times by 1 test: s->key_update = 0;
Executed by:
  • libssl.so.1.1
2
826-
827 if (!tls13_update_key(s, 0)
!tls13_update_key(s, 0)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-7
828-
829 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
830 }-
831-
832 return
executed 7 times by 1 test: return MSG_PROCESS_FINISHED_READING;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_FINISHED_READING;
executed 7 times by 1 test: return MSG_PROCESS_FINISHED_READING;
Executed by:
  • libssl.so.1.1
7
833}-
834-
835-
836-
837-
838-
839int ssl3_take_mac(SSL *s)-
840{-
841 const char *sender;-
842 size_t slen;-
843-
844 if (!s->server
!s->serverDescription
TRUEevaluated 1626 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1633 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1626-1633
845 sender = s->method->ssl3_enc->server_finished_label;-
846 slen = s->method->ssl3_enc->server_finished_label_len;-
847 }
executed 1626 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
1626
848 sender = s->method->ssl3_enc->client_finished_label;-
849 slen = s->method->ssl3_enc->client_finished_label_len;-
850 }
executed 1633 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1633
851-
852 s->s3->tmp.peer_finish_md_len =-
853 s->method->ssl3_enc->final_finish_mac(s, sender, slen,-
854 s->s3->tmp.peer_finish_md);-
855-
856 if (s->s3->tmp.peer_finish_md_len == 0
s->s3->tmp.pee...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 3259 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3259
857-
858 return
never executed: return 0;
0;
never executed: return 0;
0
859 }-
860-
861 return
executed 3259 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 3259 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
3259
862}-
863-
864MSG_PROCESS_RETURN tls_process_change_cipher_spec(SSL *s, PACKET *pkt)-
865{-
866 size_t remain;-
867-
868 remain = PACKET_remaining(pkt);-
869-
870-
871-
872-
873-
874 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
355-2114
875 if ((s->version == 0x0100
s->version == 0x0100Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 354 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-354
876 && remain != 1 + 1
remain != 1 + 1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-1
877 || (s->version != 0x0100
s->version != 0x0100Description
TRUEevaluated 354 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
1-354
878 && remain != 1 - 1
remain != 1 - 1Description
TRUEnever evaluated
FALSEevaluated 354 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
0-354
879 ossl_statem_fatal((s), (50), (363), (103),-
880-
881 __FILE__-
882 ,-
883-
884 703-
885 )-
886-
887 ;-
888 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
889 }-
890 }
executed 355 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
355
891 if (remain != 0
remain != 0Description
TRUEnever evaluated
FALSEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2114
892 ossl_statem_fatal((s), (50), (363), (103),-
893-
894 __FILE__-
895 ,-
896-
897 710-
898 )-
899-
900 ;-
901 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
902 }-
903 }
executed 2114 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2114
904-
905-
906 if (s->s3->tmp.new_cipher ==
s->s3->tmp.new...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2469 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2469
907 ((void *)0)
s->s3->tmp.new...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2469 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2469
908 ) {-
909 ossl_statem_fatal((s), (10), (363), (133),-
910 __FILE__-
911 ,-
912 718-
913 )-
914 ;-
915 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
916 }-
917-
918 s->s3->change_cipher_spec = 1;-
919 if (!ssl3_do_change_cipher_spec(s)
!ssl3_do_change_cipher_spec(s)Description
TRUEnever evaluated
FALSEevaluated 2469 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2469
920 ossl_statem_fatal((s), (80), (363), ((4|64)),-
921 __FILE__-
922 ,-
923 725-
924 )-
925 ;-
926 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
927 }-
928-
929 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
355-2114
930 dtls1_reset_seq_numbers(s, 0x001);-
931-
932 if (s->version == 0x0100
s->version == 0x0100Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 354 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1-354
933 s->d1->handshake_read_seq++;
executed 1 time by 1 test: s->d1->handshake_read_seq++;
Executed by:
  • libssl.so.1.1
1
934 }
executed 355 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
355
935-
936 return
executed 2469 times by 1 test: return MSG_PROCESS_CONTINUE_READING;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_CONTINUE_READING;
executed 2469 times by 1 test: return MSG_PROCESS_CONTINUE_READING;
Executed by:
  • libssl.so.1.1
2469
937}-
938-
939MSG_PROCESS_RETURN tls_process_finished(SSL *s, PACKET *pkt)-
940{-
941 size_t md_len;-
942-
943-
944-
945 if (s->server
s->serverDescription
TRUEevaluated 1633 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1626 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1626-1633
946-
947-
948-
949-
950-
951 s->statem.enc_read_state = ENC_READ_STATE_VALID;-
952 if (s->post_handshake_auth != SSL_PHA_REQUESTED
s->post_handsh..._PHA_REQUESTEDDescription
TRUEevaluated 1611 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
22-1611
953 s->statem.cleanuphand = 1;
executed 1611 times by 1 test: s->statem.cleanuphand = 1;
Executed by:
  • libssl.so.1.1
1611
954 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1456 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 869 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 869 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) && !tls13_save_handshake_digest_for_pha(s)
!tls13_save_ha...est_for_pha(s)Description
TRUEnever evaluated
FALSEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-1456
955-
956 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
957 }-
958 }
executed 1633 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1633
959-
960-
961-
962-
963-
964 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 2904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1741 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1741 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) && RECORD_LAYER_processed_read_pending(&s->rlayer)
RECORD_LAYER_p...ng(&s->rlayer)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2904
965 ossl_statem_fatal((s), (10), (364), (182),-
966 __FILE__-
967 ,-
968 775-
969 )-
970 ;-
971 return
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR;
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
1
972 }-
973-
974-
975 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 2903 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1741 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1741 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) && !s->s3->change_cipher_spec
!s->s3->change_cipher_specDescription
TRUEnever evaluated
FALSEevaluated 2096 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2903
976 ossl_statem_fatal((s), (10), (364), (154),-
977 __FILE__-
978 ,-
979 782-
980 )-
981 ;-
982 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
983 }-
984 s->s3->change_cipher_spec = 0;-
985-
986 md_len = s->s3->tmp.peer_finish_md_len;-
987-
988 if (md_len != PACKET_remaining(pkt)
md_len != PACK...remaining(pkt)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3257 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-3257
989 ossl_statem_fatal((s), (50), (364), (111),-
990 __FILE__-
991 ,-
992 791-
993 )-
994 ;-
995 return
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR;
executed 1 time by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
1
996 }-
997-
998 if (CRYPTO_memcmp(PACKET_data(pkt), s->s3->tmp.peer_finish_md,
CRYPTO_memcmp(..., md_len) != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3254 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3254
999 md_len) != 0
CRYPTO_memcmp(..., md_len) != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3254 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
3-3254
1000 ossl_statem_fatal((s), (51), (364), (149),-
1001 __FILE__-
1002 ,-
1003 798-
1004 )-
1005 ;-
1006 return
executed 3 times by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR;
executed 3 times by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
3
1007 }-
1008-
1009-
1010-
1011-
1012 if (!((md_len <= 64) != 0)
!((md_len <= 64) != 0)Description
TRUEnever evaluated
FALSEevaluated 3254 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3254
1013 ossl_statem_fatal((s), (80), (364), ((4|64)),-
1014 __FILE__-
1015 ,-
1016 807-
1017 )-
1018 ;-
1019 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
1020 }-
1021 if (s->server
s->serverDescription
TRUEevaluated 1633 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1621 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1621-1633
1022 memcpy(s->s3->previous_client_finished, s->s3->tmp.peer_finish_md,-
1023 md_len);-
1024 s->s3->previous_client_finished_len = md_len;-
1025 }
executed 1633 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
1633
1026 memcpy(s->s3->previous_server_finished, s->s3->tmp.peer_finish_md,-
1027 md_len);-
1028 s->s3->previous_server_finished_len = md_len;-
1029 }
executed 1621 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1621
1030-
1031-
1032-
1033-
1034-
1035 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 2899 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1737 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1737 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 1162 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-2899
1036 if (s->server
s->serverDescription
TRUEevaluated 587 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
575-587
1037 if (s->post_handshake_auth != SSL_PHA_REQUESTED
s->post_handsh..._PHA_REQUESTEDDescription
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
22-565
1038 !s->method->ssl3_enc->change_cipher_state(s,
!s->method->ss...(0x020|0x001))Description
TRUEnever evaluated
FALSEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-565
1039 0x100 | (0x020|0x001))
!s->method->ss...(0x020|0x001))Description
TRUEnever evaluated
FALSEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-565
1040-
1041 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
1042 }-
1043 }
executed 587 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
587
1044 if (!s->method->ssl3_enc->generate_master_secret(s,
!s->method->ss...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-575
1045 s->master_secret, s->handshake_secret, 0,
!s->method->ss...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-575
1046 &s->session->master_key_length)
!s->method->ss...er_key_length)Description
TRUEnever evaluated
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-575
1047-
1048 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
1049 }-
1050 if (!s->method->ssl3_enc->change_cipher_state(s,
!s->method->ss...(0x010|0x001))Description
TRUEnever evaluated
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-575
1051 0x100 | (0x010|0x001))
!s->method->ss...(0x010|0x001))Description
TRUEnever evaluated
FALSEevaluated 575 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-575
1052-
1053 return
never executed: return MSG_PROCESS_ERROR;
MSG_PROCESS_ERROR;
never executed: return MSG_PROCESS_ERROR;
0
1054 }-
1055 if (!tls_process_initial_server_flight(s)
!tls_process_i...rver_flight(s)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 573 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2-573
1056-
1057 return
executed 2 times by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR;
executed 2 times by 1 test: return MSG_PROCESS_ERROR;
Executed by:
  • libssl.so.1.1
2
1058 }-
1059 }
executed 573 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
573
1060 }-
1061-
1062 return
executed 3252 times by 1 test: return MSG_PROCESS_FINISHED_READING;
Executed by:
  • libssl.so.1.1
MSG_PROCESS_FINISHED_READING;
executed 3252 times by 1 test: return MSG_PROCESS_FINISHED_READING;
Executed by:
  • libssl.so.1.1
3252
1063}-
1064-
1065int tls_construct_change_cipher_spec(SSL *s, WPACKET *pkt)-
1066{-
1067 if (!WPACKET_put_bytes__((pkt), (1), 1)
!WPACKET_put_b...(pkt), (1), 1)Description
TRUEnever evaluated
FALSEevaluated 4316 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4316
1068 ossl_statem_fatal((s), (80), (427), ((4|64)),-
1069 __FILE__-
1070 ,-
1071 858-
1072 )-
1073 ;-
1074 return
never executed: return 0;
0;
never executed: return 0;
0
1075 }-
1076-
1077 return
executed 4316 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 4316 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
4316
1078}-
1079-
1080-
1081static int ssl_add_cert_to_wpacket(SSL *s, WPACKET *pkt, X509 *x, int chain)-
1082{-
1083 int len;-
1084 unsigned char *outbytes;-
1085-
1086 len = i2d_X509(x, -
1087 ((void *)0)-
1088 );-
1089 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2304
1090 ossl_statem_fatal((s), (80), (493), (7),-
1091 __FILE__-
1092 ,-
1093 874-
1094 )-
1095 ;-
1096 return
never executed: return 0;
0;
never executed: return 0;
0
1097 }-
1098 if (!WPACKET_sub_allocate_bytes__((pkt), (len), (&outbytes), 3)
!WPACKET_sub_a...&outbytes), 3)Description
TRUEnever evaluated
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2304
1099 || i2d_X509(x, &outbytes) != len
i2d_X509(x, &outbytes) != lenDescription
TRUEnever evaluated
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2304
1100 ossl_statem_fatal((s), (80), (493), ((4|64)),-
1101 __FILE__-
1102 ,-
1103 880-
1104 )-
1105 ;-
1106 return
never executed: return 0;
0;
never executed: return 0;
0
1107 }-
1108-
1109 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 2103 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 201 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1245 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1245 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-2103
1110 && !tls_construct_extensions(s, pkt, 0x1000, x,
!tls_construct...000, x, chain)Description
TRUEnever evaluated
FALSEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-858
1111 chain)
!tls_construct...000, x, chain)Description
TRUEnever evaluated
FALSEevaluated 858 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-858
1112-
1113 return
never executed: return 0;
0;
never executed: return 0;
0
1114 }-
1115-
1116 return
executed 2304 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2304 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2304
1117}-
1118-
1119-
1120static int ssl_add_cert_chain(SSL *s, WPACKET *pkt, CERT_PKEY *cpk)-
1121{-
1122 int i, chain_count;-
1123 X509 *x;-
1124 struct stack_st_X509 *extra_certs;-
1125 struct stack_st_X509 *chain = -
1126 ((void *)0)-
1127 ;-
1128 X509_STORE *chain_store;-
1129-
1130 if (cpk ==
cpk == ((void *)0)Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2143 times by 1 test
Evaluated by:
  • libssl.so.1.1
39-2143
1131 ((void *)0)
cpk == ((void *)0)Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2143 times by 1 test
Evaluated by:
  • libssl.so.1.1
39-2143
1132 || cpk->x509 ==
cpk->x509 == ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2142 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-2142
1133 ((void *)0)
cpk->x509 == ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2142 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-2142
1134 )-
1135 return
executed 40 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 40 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
40
1136-
1137 x = cpk->x509;-
1138-
1139-
1140-
1141-
1142 if (cpk->chain !=
cpk->chain != ((void *)0)Description
TRUEevaluated 35 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2107 times by 1 test
Evaluated by:
  • libssl.so.1.1
35-2107
1143 ((void *)0)
cpk->chain != ((void *)0)Description
TRUEevaluated 35 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2107 times by 1 test
Evaluated by:
  • libssl.so.1.1
35-2107
1144 )-
1145 extra_certs = cpk->chain;
executed 35 times by 1 test: extra_certs = cpk->chain;
Executed by:
  • libssl.so.1.1
35
1146 else-
1147 extra_certs = s->ctx->extra_certs;
executed 2107 times by 1 test: extra_certs = s->ctx->extra_certs;
Executed by:
  • libssl.so.1.1
2107
1148-
1149 if ((
(s->mode & 0x00000008U)Description
TRUEnever evaluated
FALSEevaluated 2142 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->mode & 0x00000008U)
(s->mode & 0x00000008U)Description
TRUEnever evaluated
FALSEevaluated 2142 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| extra_certs
extra_certsDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-2142
1150 chain_store =
executed 38 times by 1 test: chain_store = ((void *)0) ;
Executed by:
  • libssl.so.1.1
38
1151 ((void *)0)
executed 38 times by 1 test: chain_store = ((void *)0) ;
Executed by:
  • libssl.so.1.1
38
1152 ;
executed 38 times by 1 test: chain_store = ((void *)0) ;
Executed by:
  • libssl.so.1.1
38
1153 else if (s->cert->chain_store
s->cert->chain_storeDescription
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-2104
1154 chain_store = s->cert->chain_store;
never executed: chain_store = s->cert->chain_store;
0
1155 else-
1156 chain_store = s->ctx->cert_store;
executed 2104 times by 1 test: chain_store = s->ctx->cert_store;
Executed by:
  • libssl.so.1.1
2104
1157-
1158 if (chain_store !=
chain_store != ((void *)0)Description
TRUEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
38-2104
1159 ((void *)0)
chain_store != ((void *)0)Description
TRUEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
38-2104
1160 ) {-
1161 X509_STORE_CTX *xs_ctx = X509_STORE_CTX_new();-
1162-
1163 if (xs_ctx ==
xs_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2104
1164 ((void *)0)
xs_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2104
1165 ) {-
1166 ossl_statem_fatal((s), (80), (316), ((1|64)),-
1167 __FILE__-
1168 ,-
1169 928-
1170 )-
1171 ;-
1172 return
never executed: return 0;
0;
never executed: return 0;
0
1173 }-
1174 if (!X509_STORE_CTX_init(xs_ctx, chain_store, x,
!X509_STORE_CT... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2104
1175 ((void *)0)
!X509_STORE_CT... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2104
1176 )
!X509_STORE_CT... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2104
1177 X509_STORE_CTX_free(xs_ctx);-
1178 ossl_statem_fatal((s), (80), (316), (11),-
1179 __FILE__-
1180 ,-
1181 934-
1182 )-
1183 ;-
1184 return
never executed: return 0;
0;
never executed: return 0;
0
1185 }-
1186-
1187-
1188-
1189-
1190-
1191-
1192 (void)X509_verify_cert(xs_ctx);-
1193-
1194 ERR_clear_error();-
1195 chain = X509_STORE_CTX_get0_chain(xs_ctx);-
1196 i = ssl_security_cert_chain(s, chain, -
1197 ((void *)0)-
1198 , 0);-
1199 if (i != 1
i != 1Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2104
1200-
1201-
1202-
1203-
1204-
1205-
1206 X509_STORE_CTX_free(xs_ctx);-
1207 ossl_statem_fatal((s), (80), (316), (i), __FILE__, 956);-
1208 return
never executed: return 0;
0;
never executed: return 0;
0
1209 }-
1210 chain_count = sk_X509_num(chain);-
1211 for (i = 0; i < chain_count
i < chain_countDescription
TRUEevaluated 2111 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
2104-2111
1212 x = sk_X509_value(chain, i);-
1213-
1214 if (!ssl_add_cert_to_wpacket(s, pkt, x, i)
!ssl_add_cert_...(s, pkt, x, i)Description
TRUEnever evaluated
FALSEevaluated 2111 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2111
1215-
1216 X509_STORE_CTX_free(xs_ctx);-
1217 return
never executed: return 0;
0;
never executed: return 0;
0
1218 }-
1219 }
executed 2111 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2111
1220 X509_STORE_CTX_free(xs_ctx);-
1221 }
executed 2104 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
2104
1222 i = ssl_security_cert_chain(s, extra_certs, x, 0);-
1223 if (i != 1
i != 1Description
TRUEnever evaluated
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-38
1224 ossl_statem_fatal((s), (80), (316), (i), __FILE__, 973);-
1225 return
never executed: return 0;
0;
never executed: return 0;
0
1226 }-
1227 if (!ssl_add_cert_to_wpacket(s, pkt, x, 0)
!ssl_add_cert_...(s, pkt, x, 0)Description
TRUEnever evaluated
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-38
1228-
1229 return
never executed: return 0;
0;
never executed: return 0;
0
1230 }-
1231 for (i = 0; i < sk_X509_num(extra_certs)
i < sk_X509_num(extra_certs)Description
TRUEevaluated 155 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
38-155
1232 x = sk_X509_value(extra_certs, i);-
1233 if (!ssl_add_cert_to_wpacket(s, pkt, x, i + 1)
!ssl_add_cert_...pkt, x, i + 1)Description
TRUEnever evaluated
FALSEevaluated 155 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-155
1234-
1235 return
never executed: return 0;
0;
never executed: return 0;
0
1236 }-
1237 }
executed 155 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
155
1238 }
executed 38 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
38
1239 return
executed 2142 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2142 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2142
1240}-
1241-
1242unsigned long ssl3_output_cert_chain(SSL *s, WPACKET *pkt, CERT_PKEY *cpk)-
1243{-
1244 if (!WPACKET_start_sub_packet_len__((pkt), 3)
!WPACKET_start...en__((pkt), 3)Description
TRUEnever evaluated
FALSEevaluated 2182 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2182
1245 ossl_statem_fatal((s), (80), (147), ((4|64)),-
1246 __FILE__-
1247 ,-
1248 995-
1249 )-
1250 ;-
1251 return
never executed: return 0;
0;
never executed: return 0;
0
1252 }-
1253-
1254 if (!ssl_add_cert_chain(s, pkt, cpk)
!ssl_add_cert_...n(s, pkt, cpk)Description
TRUEnever evaluated
FALSEevaluated 2182 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-2182
1255 return
never executed: return 0;
0;
never executed: return 0;
0
1256-
1257 if (!WPACKET_close(pkt)
!WPACKET_close(pkt)Description
TRUEnever evaluated
FALSEevaluated 2182 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2182
1258 ossl_statem_fatal((s), (80), (147), ((4|64)),-
1259 __FILE__-
1260 ,-
1261 1004-
1262 )-
1263 ;-
1264 return
never executed: return 0;
0;
never executed: return 0;
0
1265 }-
1266-
1267 return
executed 2182 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2182 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2182
1268}-
1269-
1270-
1271-
1272-
1273-
1274-
1275WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs, int stop)-
1276{-
1277 void (*cb) (const SSL *ssl, int type, int val) = -
1278 ((void *)0)-
1279 ;-
1280-
1281 if (clearbufs
clearbufsDescription
TRUEevaluated 4433 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 630 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
630-4433
1282 if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 4075 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
358-4075
1283-
1284-
1285-
1286-
1287 BUF_MEM_free(s->init_buf);-
1288 s->init_buf = -
1289 ((void *)0)-
1290 ;-
1291 }
executed 4075 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4075
1292 if (!ssl_free_wbio_buffer(s)
!ssl_free_wbio_buffer(s)Description
TRUEnever evaluated
FALSEevaluated 4433 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4433
1293 ossl_statem_fatal((s), (80), (597), ((4|64)),-
1294 __FILE__-
1295 ,-
1296 1031-
1297 )-
1298 ;-
1299 return
never executed: return WORK_ERROR;
WORK_ERROR;
never executed: return WORK_ERROR;
0
1300 }-
1301 s->init_num = 0;-
1302 }
executed 4433 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4433
1303-
1304 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 4705 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 2960 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1745 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 2960 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1745 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 2910 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 50 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 2910 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 50 times by 1 test
Evaluated by:
  • libssl.so.1.1
) && !s->server
!s->serverDescription
TRUEevaluated 1555 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1355 times by 1 test
Evaluated by:
  • libssl.so.1.1
50-4705
1305 && s->post_handshake_auth == SSL_PHA_REQUESTED
s->post_handsh..._PHA_REQUESTEDDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1530 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
25-1530
1306 s->post_handshake_auth = SSL_PHA_EXT_SENT;
executed 25 times by 1 test: s->post_handshake_auth = SSL_PHA_EXT_SENT;
Executed by:
  • libssl.so.1.1
25
1307-
1308-
1309-
1310-
1311-
1312 if (s->statem.cleanuphand
s->statem.cleanuphandDescription
TRUEevaluated 3230 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1833 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1833-3230
1313-
1314 s->renegotiate = 0;-
1315 s->new_session = 0;-
1316 s->statem.cleanuphand = 0;-
1317 s->ext.ticket_expected = 0;-
1318-
1319 ssl3_cleanup_key_block(s);-
1320-
1321 if (s->server
s->serverDescription
TRUEevaluated 1611 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1619 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1611-1619
1322-
1323-
1324-
1325-
1326 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1434 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 869 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 869 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 565 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
))
0-1434
1327 ssl_update_cache(s, 0x0002);
executed 1046 times by 1 test: ssl_update_cache(s, 0x0002);
Executed by:
  • libssl.so.1.1
1046
1328-
1329-
1330 -
1331 __atomic_fetch_add ((-
1332 (&s->ctx->stats.sess_accept_good)-
1333 ), (-
1334 1-
1335 ), (-
1336 memory_order_relaxed-
1337 ))-
1338 ;-
1339 s->handshake_func = ossl_statem_accept;-
1340-
1341 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1434 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1434 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !s->hit
!s->hitDescription
TRUEevaluated 161 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
16-1434
1342-
1343-
1344-
1345-
1346-
1347 dtls1_start_timer(s);-
1348 }
executed 161 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
161
1349 }
executed 1611 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
1611
1350 if ((!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1441 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 178 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 573 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 868 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 573 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 868 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 573 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 573 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-1441
1351-
1352-
1353-
1354-
1355 if ((
(s->session_ct...& 0x0001) != 0Description
TRUEevaluated 95 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 478 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->session_ctx->session_cache_mode
(s->session_ct...& 0x0001) != 0Description
TRUEevaluated 95 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 478 times by 1 test
Evaluated by:
  • libssl.so.1.1
95-478
1356 & 0x0001) != 0
(s->session_ct...& 0x0001) != 0Description
TRUEevaluated 95 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 478 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
95-478
1357 SSL_CTX_remove_session(s->session_ctx, s->session);
executed 95 times by 1 test: SSL_CTX_remove_session(s->session_ctx, s->session);
Executed by:
  • libssl.so.1.1
95
1358 }
executed 573 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
573
1359-
1360-
1361-
1362-
1363 ssl_update_cache(s, 0x0001);-
1364 }
executed 1046 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1046
1365 if (s->hit
s->hitDescription
TRUEevaluated 168 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1451 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
168-1451
1366 -
1367 __atomic_fetch_add ((
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1368 (&s->session_ctx->stats.sess_hit)
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1369 ), (
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1370 1
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1371 ), (
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1372 memory_order_relaxed
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1373 ))
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1374 ;
executed 168 times by 1 test: __atomic_fetch_add (( (&s->session_ctx->stats.sess_hit) ), ( 1 ), ( memory_order_relaxed )) ;
Executed by:
  • libssl.so.1.1
168
1375-
1376 s->handshake_func = ossl_statem_connect;-
1377 -
1378 __atomic_fetch_add ((-
1379 (&s->session_ctx->stats.sess_connect_good)-
1380 ), (-
1381 1-
1382 ), (-
1383 memory_order_relaxed-
1384 ))-
1385 ;-
1386-
1387 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1441 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1441 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->hit
s->hitDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 161 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
17-1441
1388-
1389-
1390-
1391-
1392-
1393 dtls1_start_timer(s);-
1394 }
executed 17 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
17
1395 }
executed 1619 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1619
1396-
1397 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2875 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2875 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
355-2875
1398-
1399 s->d1->handshake_read_seq = 0;-
1400 s->d1->handshake_write_seq = 0;-
1401 s->d1->next_handshake_write_seq = 0;-
1402 dtls1_clear_received_buffer(s);-
1403 }
executed 355 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
355
1404 }
executed 3230 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3230
1405-
1406 if (s->info_callback !=
s->info_callba...!= ((void *)0)Description
TRUEevaluated 2805 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2258 times by 1 test
Evaluated by:
  • libssl.so.1.1
2258-2805
1407 ((void *)0)
s->info_callba...!= ((void *)0)Description
TRUEevaluated 2805 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2258 times by 1 test
Evaluated by:
  • libssl.so.1.1
2258-2805
1408 )-
1409 cb = s->info_callback;
executed 2805 times by 1 test: cb = s->info_callback;
Executed by:
  • libssl.so.1.1
2805
1410 else if (s->ctx->info_callback !=
s->ctx->info_c...!= ((void *)0)Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2245 times by 1 test
Evaluated by:
  • libssl.so.1.1
13-2245
1411 ((void *)0)
s->ctx->info_c...!= ((void *)0)Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2245 times by 1 test
Evaluated by:
  • libssl.so.1.1
13-2245
1412 )-
1413 cb = s->ctx->info_callback;
executed 13 times by 1 test: cb = s->ctx->info_callback;
Executed by:
  • libssl.so.1.1
13
1414-
1415-
1416 ossl_statem_set_in_init(s, 0);-
1417-
1418 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 2818 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2245 times by 1 test
Evaluated by:
  • libssl.so.1.1
2245-2818
1419 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 2818 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2245 times by 1 test
Evaluated by:
  • libssl.so.1.1
2245-2818
1420 )-
1421 cb(s, 0x20, 1);
executed 2818 times by 1 test: cb(s, 0x20, 1);
Executed by:
  • libssl.so.1.1
2818
1422-
1423 if (!stop
!stopDescription
TRUEevaluated 577 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4486 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
577-4486
1424-
1425 ossl_statem_set_in_init(s, 1);-
1426 return
executed 577 times by 1 test: return WORK_FINISHED_CONTINUE;
Executed by:
  • libssl.so.1.1
WORK_FINISHED_CONTINUE;
executed 577 times by 1 test: return WORK_FINISHED_CONTINUE;
Executed by:
  • libssl.so.1.1
577
1427 }-
1428-
1429 return
executed 4486 times by 1 test: return WORK_FINISHED_STOP;
Executed by:
  • libssl.so.1.1
WORK_FINISHED_STOP;
executed 4486 times by 1 test: return WORK_FINISHED_STOP;
Executed by:
  • libssl.so.1.1
4486
1430}-
1431-
1432int tls_get_message_header(SSL *s, int *mt)-
1433{-
1434-
1435 int skip_message, i, recvd_type;-
1436 unsigned char *p;-
1437 size_t l, readbytes;-
1438-
1439 p = (unsigned char *)s->init_buf->data;-
1440-
1441 do {-
1442 while (s->init_num < 4
s->init_num < 4Description
TRUEevaluated 41601 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 21641 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
21641-41601
1443 i = s->method->ssl_read_bytes(s, 22, &recvd_type,-
1444 &p[s->init_num],-
1445 4 - s->init_num,-
1446 0, &readbytes);-
1447 if (i <= 0
i <= 0Description
TRUEevaluated 17479 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24122 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
17479-24122
1448 s->rwstate = 3;-
1449 return
executed 17479 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 17479 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
17479
1450 }-
1451 if (recvd_type == 20
recvd_type == 20Description
TRUEevaluated 2125 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 21997 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2125-21997
1452-
1453-
1454-
1455-
1456 if (s->init_num != 0
s->init_num != 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2123 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| readbytes != 1
readbytes != 1Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2120 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| p[0] != 1
p[0] != 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2116 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2-2123
1457 ossl_statem_fatal((s), (10), (387), (103),-
1458-
1459 __FILE__-
1460 ,-
1461-
1462 1162-
1463 )-
1464-
1465 ;-
1466 return
executed 9 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 9 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
9
1467 }-
1468 if (s->statem.hand_state == TLS_ST_BEFORE
s->statem.hand... TLS_ST_BEFOREDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2115 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-2115
1469 && (
(s->s3->flags & 0x0800) != 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
s->s3->flags & 0x0800) != 0
(s->s3->flags & 0x0800) != 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-1
1470-
1471-
1472-
1473-
1474-
1475-
1476-
1477 return
never executed: return 0;
0;
never executed: return 0;
0
1478 }-
1479 s->s3->tmp.message_type = *mt = 0x0101;-
1480 s->init_num = readbytes - 1;-
1481 s->init_msg = s->init_buf->data;-
1482 s->s3->tmp.message_size = readbytes;-
1483 return
executed 2116 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2116 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2116
1484 } else if (recvd_type != 22
recvd_type != 22Description
TRUEnever evaluated
FALSEevaluated 21997 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-21997
1485 ossl_statem_fatal((s), (10), (387), (133),-
1486-
1487 __FILE__-
1488 ,-
1489-
1490 1184-
1491 )-
1492-
1493 ;-
1494 return
never executed: return 0;
0;
never executed: return 0;
0
1495 }-
1496 s->init_num += readbytes;-
1497 }
executed 21997 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
21997
1498-
1499 skip_message = 0;-
1500 if (!s->server
!s->serverDescription
TRUEevaluated 15395 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6246 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
6246-15395
1501 if (s->statem.hand_state != TLS_ST_OK
s->statem.hand...e != TLS_ST_OKDescription
TRUEevaluated 14412 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 983 times by 1 test
Evaluated by:
  • libssl.so.1.1
983-14412
1502 && p[0] == 0
p[0] == 0Description
TRUEevaluated 1130 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 13282 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1130-13282
1503-
1504-
1505-
1506-
1507-
1508-
1509 if (p[1] == 0
p[1] == 0Description
TRUEevaluated 1114 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& p[2] == 0
p[2] == 0Description
TRUEevaluated 1106 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& p[3] == 0
p[3] == 0Description
TRUEevaluated 1105 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-1114
1510 s->init_num = 0;-
1511 skip_message = 1;-
1512-
1513 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 1105 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-1105
1514 s->msg_callback(0, s->version, 22,
never executed: s->msg_callback(0, s->version, 22, p, 4, s, s->msg_callback_arg);
0
1515 p, 4, s,
never executed: s->msg_callback(0, s->version, 22, p, 4, s, s->msg_callback_arg);
0
1516 s->msg_callback_arg);
never executed: s->msg_callback(0, s->version, 22, p, 4, s, s->msg_callback_arg);
0
1517 }
executed 1105 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1105
1518 }
executed 21641 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
while (skip_message
skip_messageDescription
TRUEevaluated 1105 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 20536 times by 1 test
Evaluated by:
  • libssl.so.1.1
);
1105-21641
1519-
1520-
1521 *mt = *p;-
1522 s->s3->tmp.message_type = *(p++);-
1523-
1524 if (RECORD_LAYER_is_sslv2_record(&s->rlayer)
RECORD_LAYER_i...rd(&s->rlayer)Description
TRUEevaluated 185 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 20351 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
185-20351
1525-
1526-
1527-
1528-
1529-
1530-
1531-
1532 l = RECORD_LAYER_get_rrec_length(&s->rlayer)-
1533 + 4;-
1534 s->s3->tmp.message_size = l;-
1535-
1536 s->init_msg = s->init_buf->data;-
1537 s->init_num = 4;-
1538 }
executed 185 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
185
1539 ((l =(((unsigned long)((p)[0]))<<16)| (((unsigned long)((p)[1]))<< 8)| (((unsigned long)((p)[2])) )),(p)+=3);-
1540-
1541 if (l > (0x7fffffff - 4)
l > (0x7fffffff - 4)Description
TRUEnever evaluated
FALSEevaluated 20351 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-20351
1542 ossl_statem_fatal((s), (47), (387), (152),-
1543 __FILE__-
1544 ,-
1545 1234-
1546 )-
1547 ;-
1548 return
never executed: return 0;
0;
never executed: return 0;
0
1549 }-
1550 s->s3->tmp.message_size = l;-
1551-
1552 s->init_msg = s->init_buf->data + 4;-
1553 s->init_num = 0;-
1554 }
executed 20351 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
20351
1555-
1556 return
executed 20536 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 20536 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
20536
1557}-
1558-
1559int tls_get_message_body(SSL *s, size_t *len)-
1560{-
1561 size_t n, readbytes;-
1562 unsigned char *p;-
1563 int i;-
1564-
1565 if (s->s3->tmp.message_type == 0x0101
s->s3->tmp.mes...type == 0x0101Description
TRUEevaluated 2114 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 22875 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2114-22875
1566-
1567 *len = (unsigned long)s->init_num;-
1568 return
executed 2114 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2114 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2114
1569 }-
1570-
1571 p = s->init_msg;-
1572 n = s->s3->tmp.message_size - s->init_num;-
1573 while (n > 0
n > 0Description
TRUEevaluated 26088 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 20397 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
20397-26088
1574 i = s->method->ssl_read_bytes(s, 22, -
1575 ((void *)0)-
1576 ,-
1577 &p[s->init_num], n, 0, &readbytes);-
1578 if (i <= 0
i <= 0Description
TRUEevaluated 2478 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23610 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2478-23610
1579 s->rwstate = 3;-
1580 *len = 0;-
1581 return
executed 2478 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 2478 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
2478
1582 }-
1583 s->init_num += readbytes;-
1584 n -= readbytes;-
1585 }
executed 23610 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
23610
1586-
1587-
1588-
1589-
1590-
1591 if (*(
*(s->init_buf->data) == 20Description
TRUEevaluated 2904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 17493 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->init_buf->data) == 20
*(s->init_buf->data) == 20Description
TRUEevaluated 2904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 17493 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !ssl3_take_mac(s)
!ssl3_take_mac(s)Description
TRUEnever evaluated
FALSEevaluated 2904 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-17493
1592-
1593 *len = 0;-
1594 return
never executed: return 0;
0;
never executed: return 0;
0
1595 }-
1596-
1597-
1598 if (RECORD_LAYER_is_sslv2_record(&s->rlayer)
RECORD_LAYER_i...rd(&s->rlayer)Description
TRUEevaluated 185 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 20212 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
185-20212
1599 if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
!ssl3_finish_m..., s->init_num)Description
TRUEnever evaluated
FALSEevaluated 185 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-185
1600 s->init_num)
!ssl3_finish_m..., s->init_num)Description
TRUEnever evaluated
FALSEevaluated 185 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-185
1601-
1602 *len = 0;-
1603 return
never executed: return 0;
0;
never executed: return 0;
0
1604 }-
1605 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 185 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-185
1606 s->msg_callback(0, 0x0002, 0, s->init_buf->data,
never executed: s->msg_callback(0, 0x0002, 0, s->init_buf->data, (size_t)s->init_num, s, s->msg_callback_arg);
0
1607 (size_t)s->init_num, s, s->msg_callback_arg);
never executed: s->msg_callback(0, 0x0002, 0, s->init_buf->data, (size_t)s->init_num, s, s->msg_callback_arg);
0
1608 }
executed 185 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
185
1609 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 20212 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 11497 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8715 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 11497 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8715 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 3855 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7642 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 3855 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7642 times by 1 test
Evaluated by:
  • libssl.so.1.1
) || (s->s3->tmp.message_type != 4
s->s3->tmp.message_type != 4Description
TRUEevaluated 2908 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 947 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-20212
1610 && s->s3->tmp.message_type != 24
s->s3->tmp.message_type != 24Description
TRUEevaluated 2900 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
8-2900
1611 if (s->s3->tmp.message_type != 2
s->s3->tmp.message_type != 2Description
TRUEevaluated 14844 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4413 times by 1 test
Evaluated by:
  • libssl.so.1.1
4413-14844
1612 || s->init_num < (4 + 2) + 32
s->init_num < (4 + 2) + 32Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4403 times by 1 test
Evaluated by:
  • libssl.so.1.1
10-4403
1613 || memcmp(hrrrandom,
memcmp(hrrrand...+ 2), 32) != 0Description
TRUEevaluated 3667 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 736 times by 1 test
Evaluated by:
  • libssl.so.1.1
736-3667
1614 s->init_buf->data + (4 + 2),
memcmp(hrrrand...+ 2), 32) != 0Description
TRUEevaluated 3667 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 736 times by 1 test
Evaluated by:
  • libssl.so.1.1
736-3667
1615 32) != 0
memcmp(hrrrand...+ 2), 32) != 0Description
TRUEevaluated 3667 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 736 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
736-3667
1616 if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
!ssl3_finish_m...>init_num + 4)Description
TRUEnever evaluated
FALSEevaluated 18521 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-18521
1617 s->init_num + 4)
!ssl3_finish_m...>init_num + 4)Description
TRUEnever evaluated
FALSEevaluated 18521 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-18521
1618-
1619 *len = 0;-
1620 return
never executed: return 0;
0;
never executed: return 0;
0
1621 }-
1622 }
executed 18521 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
18521
1623 }
executed 19257 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
19257
1624 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 20212 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-20212
1625 s->msg_callback(0, s->version, 22, s->init_buf->data,
never executed: s->msg_callback(0, s->version, 22, s->init_buf->data, (size_t)s->init_num + 4, s, s->msg_callback_arg);
0
1626 (size_t)s->init_num + 4, s,
never executed: s->msg_callback(0, s->version, 22, s->init_buf->data, (size_t)s->init_num + 4, s, s->msg_callback_arg);
0
1627 s->msg_callback_arg);
never executed: s->msg_callback(0, s->version, 22, s->init_buf->data, (size_t)s->init_num + 4, s, s->msg_callback_arg);
0
1628 }
executed 20212 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
20212
1629-
1630 *len = s->init_num;-
1631 return
executed 20397 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 20397 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
20397
1632}-
1633-
1634static const X509ERR2ALERT x509table[] = {-
1635 {50, 40},-
1636 {67, 42},-
1637 {68, 42},-
1638 {22, 48},-
1639 {10, 45},-
1640 {9, 42},-
1641 {28, 42},-
1642 {23, 44},-
1643 {7, 51},-
1644 {27, 42},-
1645 {12, 45},-
1646 {11, 42},-
1647 {8, 51},-
1648 {65, 42},-
1649 {18, 48},-
1650 {66, 42},-
1651 {63, 42},-
1652 {14, 42},-
1653 {13, 42},-
1654 {15, 42},-
1655 {16, 42},-
1656 {62, 42},-
1657 {24, 48},-
1658 {69, 80},-
1659 {26, 43},-
1660 {64, 42},-
1661 {17, 80},-
1662 {25, 48},-
1663 {19, 48},-
1664 {70, 80},-
1665 {6, 42},-
1666 {4, 42},-
1667 {5, 42},-
1668 {3, 48},-
1669 {33, 48},-
1670 {2, 48},-
1671 {20, 48},-
1672 {21, 48},-
1673 {1, 80},-
1674-
1675-
1676 {0, 46}-
1677};-
1678-
1679int ssl_x509err2alert(int x509err)-
1680{-
1681 const X509ERR2ALERT *tp;-
1682-
1683 for (tp = x509table; tp->x509err != 0
tp->x509err != 0Description
TRUEevaluated 372 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
; ++tp)
0-372
1684 if (tp->x509err == x509err
tp->x509err == x509errDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 360 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
12-360
1685 break;
executed 12 times by 1 test: break;
Executed by:
  • libssl.so.1.1
12
1686 return
executed 12 times by 1 test: return tp->alert;
Executed by:
  • libssl.so.1.1
tp->alert;
executed 12 times by 1 test: return tp->alert;
Executed by:
  • libssl.so.1.1
12
1687}-
1688-
1689int ssl_allow_compression(SSL *s)-
1690{-
1691 if (s->options & 0x00020000U
s->options & 0x00020000UDescription
TRUEevaluated 23912 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-23912
1692 return
executed 23912 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 23912 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
23912
1693 return
never executed: return ssl_security(s, (15 | 0), 0, 0, ((void *)0) );
ssl_security(s, (15 | 0), 0, 0,
never executed: return ssl_security(s, (15 | 0), 0, 0, ((void *)0) );
0
1694 ((void *)0)
never executed: return ssl_security(s, (15 | 0), 0, 0, ((void *)0) );
0
1695 );
never executed: return ssl_security(s, (15 | 0), 0, 0, ((void *)0) );
0
1696}-
1697-
1698static int version_cmp(const SSL *s, int a, int b)-
1699{-
1700 int dtls = (s->method->ssl3_enc->enc_flags & 0x8);-
1701-
1702 if (a == b
a == bDescription
TRUEevaluated 31290 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 70559 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
31290-70559
1703 return
executed 31290 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 31290 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
31290
1704 if (!dtls
!dtlsDescription
TRUEevaluated 68287 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2272 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
2272-68287
1705 return
executed 68287 times by 1 test: return a < b ? -1 : 1;
Executed by:
  • libssl.so.1.1
a < b
a < bDescription
TRUEevaluated 36816 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 31471 times by 1 test
Evaluated by:
  • libssl.so.1.1
? -1 : 1;
executed 68287 times by 1 test: return a < b ? -1 : 1;
Executed by:
  • libssl.so.1.1
31471-68287
1706 return
executed 2272 times by 1 test: return ((((a) == 0x0100) ? 0xff00 : (a)) > (((b) == 0x0100) ? 0xff00 : (b))) ? -1 : 1;
Executed by:
  • libssl.so.1.1
((((
((a) == 0x0100)Description
TRUEevaluated 774 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1498 times by 1 test
Evaluated by:
  • libssl.so.1.1
a) == 0x0100)
((a) == 0x0100)Description
TRUEevaluated 774 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1498 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (a)) > (((b) == 0x0100) ? 0xff00 : (b)))
((((a) == 0x01...0xff00 : (b)))Description
TRUEevaluated 1647 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 625 times by 1 test
Evaluated by:
  • libssl.so.1.1
? -1 : 1;
executed 2272 times by 1 test: return ((((a) == 0x0100) ? 0xff00 : (a)) > (((b) == 0x0100) ? 0xff00 : (b))) ? -1 : 1;
Executed by:
  • libssl.so.1.1
625-2272
1707}-
1708-
1709typedef struct {-
1710 int version;-
1711 const SSL_METHOD *(*cmeth) (void);-
1712 const SSL_METHOD *(*smeth) (void);-
1713} version_info;-
1714-
1715-
1716-
1717-
1718-
1719-
1720static const version_info tls_version_table[] = {-
1721-
1722 {0x0304, tlsv1_3_client_method, tlsv1_3_server_method},-
1723-
1724-
1725-
1726-
1727 {0x0303, tlsv1_2_client_method, tlsv1_2_server_method},-
1728-
1729-
1730-
1731-
1732 {0x0302, tlsv1_1_client_method, tlsv1_1_server_method},-
1733-
1734-
1735-
1736-
1737 {0x0301, tlsv1_client_method, tlsv1_server_method},-
1738-
1739-
1740-
1741-
1742-
1743-
1744 {0x0300, -
1745 ((void *)0)-
1746 , -
1747 ((void *)0)-
1748 },-
1749-
1750 {0, -
1751 ((void *)0)-
1752 , -
1753 ((void *)0)-
1754 },-
1755};-
1756-
1757-
1758-
1759-
1760-
1761-
1762static const version_info dtls_version_table[] = {-
1763-
1764 {0xFEFD, dtlsv1_2_client_method, dtlsv1_2_server_method},-
1765-
1766-
1767-
1768-
1769 {0xFEFF, dtlsv1_client_method, dtlsv1_server_method},-
1770 {0x0100, dtls_bad_ver_client_method, -
1771 ((void *)0)-
1772 },-
1773-
1774-
1775-
1776-
1777 {0, -
1778 ((void *)0)-
1779 , -
1780 ((void *)0)-
1781 },-
1782};-
1783static int ssl_method_error(const SSL *s, const SSL_METHOD *method)-
1784{-
1785 int version = method->version;-
1786-
1787 if ((s->min_proto_version != 0
s->min_proto_version != 0Description
TRUEevaluated 29064 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 84877 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
29064-84877
1788 version_cmp(s, version, s->min_proto_version) < 0
version_cmp(s,...o_version) < 0Description
TRUEevaluated 5423 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23641 times by 1 test
Evaluated by:
  • libssl.so.1.1
) ||
5423-23641
1789 ssl_security(s, (9 | 0), 0, version,
ssl_security(s...id *)0) ) == 0Description
TRUEnever evaluated
FALSEevaluated 108518 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-108518
1790 ((void *)0)
ssl_security(s...id *)0) ) == 0Description
TRUEnever evaluated
FALSEevaluated 108518 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-108518
1791 ) == 0
ssl_security(s...id *)0) ) == 0Description
TRUEnever evaluated
FALSEevaluated 108518 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-108518
1792 return
executed 5423 times by 1 test: return 396;
Executed by:
  • libssl.so.1.1
396;
executed 5423 times by 1 test: return 396;
Executed by:
  • libssl.so.1.1
5423
1793-
1794 if (s->max_proto_version != 0
s->max_proto_version != 0Description
TRUEevaluated 41761 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 66757 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
41761-66757
1795 version_cmp(s, version, s->max_proto_version) > 0
version_cmp(s,...o_version) > 0Description
TRUEevaluated 8340 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 33421 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
8340-33421
1796 return
executed 8340 times by 1 test: return 166;
Executed by:
  • libssl.so.1.1
166;
executed 8340 times by 1 test: return 166;
Executed by:
  • libssl.so.1.1
8340
1797-
1798 if ((
(s->options & ...od->mask) != 0Description
TRUEevaluated 429 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 99749 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->options & method->mask) != 0
(s->options & ...od->mask) != 0Description
TRUEevaluated 429 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 99749 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
429-99749
1799 return
executed 429 times by 1 test: return 258;
Executed by:
  • libssl.so.1.1
258;
executed 429 times by 1 test: return 258;
Executed by:
  • libssl.so.1.1
429
1800 if ((
(method->flags & (1U<<1)) != 0Description
TRUEevaluated 48926 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 50823 times by 1 test
Evaluated by:
  • libssl.so.1.1
method->flags & (1U<<1)) != 0
(method->flags & (1U<<1)) != 0Description
TRUEevaluated 48926 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 50823 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s->cert->cert...ags & 0x30000)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 48922 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->cert->cert_flags & 0x30000)
(s->cert->cert...ags & 0x30000)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 48922 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
4-50823
1801 return
executed 4 times by 1 test: return 158;
Executed by:
  • libssl.so.1.1
158;
executed 4 times by 1 test: return 158;
Executed by:
  • libssl.so.1.1
4
1802-
1803 return
executed 99745 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 99745 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
99745
1804}-
1805-
1806-
1807-
1808-
1809-
1810-
1811static int is_tls13_capable(const SSL *s)-
1812{-
1813 int i;-
1814-
1815-
1816 if (s->psk_server_callback !=
s->psk_server_...!= ((void *)0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1980 times by 1 test
Evaluated by:
  • libssl.so.1.1
10-1980
1817 ((void *)0)
s->psk_server_...!= ((void *)0)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1980 times by 1 test
Evaluated by:
  • libssl.so.1.1
10-1980
1818 )-
1819 return
executed 10 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 10 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
10
1820-
1821-
1822 if (s->psk_find_session_cb !=
s->psk_find_se...!= ((void *)0)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libssl.so.1.1
20-1960
1823 ((void *)0)
s->psk_find_se...!= ((void *)0)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libssl.so.1.1
20-1960
1824 || s->cert->cert_cb !=
s->cert->cert_...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-1960
1825 ((void *)0)
s->cert->cert_...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-1960
1826 )-
1827 return
executed 20 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 20 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
20
1828-
1829 for (i = 0; i < 9
i < 9Description
TRUEevaluated 1966 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
; i++) {
0-1966
1830-
1831 switch (i) {-
1832 case
executed 1 time by 1 test: case 2:
Executed by:
  • libssl.so.1.1
2:
executed 1 time by 1 test: case 2:
Executed by:
  • libssl.so.1.1
1
1833 case
never executed: case 4:
4:
never executed: case 4:
0
1834 case
never executed: case 5:
5:
never executed: case 5:
0
1835 case
never executed: case 6:
6:
never executed: case 6:
0
1836 continue;
executed 1 time by 1 test: continue;
Executed by:
  • libssl.so.1.1
1
1837 default
executed 1965 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 1965 times by 1 test: default:
Executed by:
  • libssl.so.1.1
1965
1838 break;
executed 1965 times by 1 test: break;
Executed by:
  • libssl.so.1.1
1965
1839 }-
1840 if (ssl_has_cert(s, i)
ssl_has_cert(s, i)Description
TRUEevaluated 1960 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
5-1960
1841 return
executed 1960 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 1960 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1960
1842 }
executed 5 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
5
1843-
1844 return
never executed: return 0;
0;
never executed: return 0;
0
1845}-
1846int ssl_version_supported(const SSL *s, int version, const SSL_METHOD **meth)-
1847{-
1848 const version_info *vent;-
1849 const version_info *table;-
1850-
1851 switch (s->method->version) {-
1852 default
executed 519 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 519 times by 1 test: default:
Executed by:
  • libssl.so.1.1
519
1853-
1854 return
executed 519 times by 1 test: return version_cmp(s, version, s->version) == 0;
Executed by:
  • libssl.so.1.1
version_cmp(s, version, s->version) == 0;
executed 519 times by 1 test: return version_cmp(s, version, s->version) == 0;
Executed by:
  • libssl.so.1.1
519
1855 case
executed 5831 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
0x10000:
executed 5831 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
5831
1856 table = tls_version_table;-
1857 break;
executed 5831 times by 1 test: break;
Executed by:
  • libssl.so.1.1
5831
1858 case
executed 25 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
0x1FFFF:
executed 25 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
25
1859 table = dtls_version_table;-
1860 break;
executed 25 times by 1 test: break;
Executed by:
  • libssl.so.1.1
25
1861 }-
1862-
1863 for (vent = table;-
1864 vent->version != 0
vent->version != 0Description
TRUEevaluated 8778 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 105 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& version_cmp(s, version, vent->version) <= 0
version_cmp(s,...>version) <= 0Description
TRUEevaluated 6758 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2020 times by 1 test
Evaluated by:
  • libssl.so.1.1
;
105-8778
1865 ++vent) {-
1866 if (vent->cmeth !=
vent->cmeth != ((void *)0)Description
TRUEevaluated 6653 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 105 times by 1 test
Evaluated by:
  • libssl.so.1.1
105-6653
1867 ((void *)0)
vent->cmeth != ((void *)0)Description
TRUEevaluated 6653 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 105 times by 1 test
Evaluated by:
  • libssl.so.1.1
105-6653
1868 -
1869 && version_cmp(s, version, vent->version) == 0
version_cmp(s,...>version) == 0Description
TRUEevaluated 4669 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1984 times by 1 test
Evaluated by:
  • libssl.so.1.1
1984-4669
1870 && ssl_method_error(s, vent->cmeth()) == 0
ssl_method_err...>cmeth()) == 0Description
TRUEevaluated 3731 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 938 times by 1 test
Evaluated by:
  • libssl.so.1.1
938-3731
1871 && (!s->server
!s->serverDescription
TRUEevaluated 914 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2817 times by 1 test
Evaluated by:
  • libssl.so.1.1
914-2817
1872 || version != 0x0304
version != 0x0304Description
TRUEevaluated 827 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1990 times by 1 test
Evaluated by:
  • libssl.so.1.1
827-1990
1873 || is_tls13_capable(s)
is_tls13_capable(s)Description
TRUEevaluated 1990 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-1990
1874 if (meth !=
meth != ((void *)0)Description
TRUEevaluated 1574 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2157 times by 1 test
Evaluated by:
  • libssl.so.1.1
1574-2157
1875 ((void *)0)
meth != ((void *)0)Description
TRUEevaluated 1574 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2157 times by 1 test
Evaluated by:
  • libssl.so.1.1
1574-2157
1876 )-
1877 *
executed 1574 times by 1 test: *meth = vent->cmeth();
Executed by:
  • libssl.so.1.1
meth = vent->cmeth();
executed 1574 times by 1 test: *meth = vent->cmeth();
Executed by:
  • libssl.so.1.1
1574
1878 return
executed 3731 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 3731 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
3731
1879 }-
1880 }
executed 3027 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3027
1881 return
executed 2125 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 2125 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
2125
1882}-
1883int ssl_check_version_downgrade(SSL *s)-
1884{-
1885 const version_info *vent;-
1886 const version_info *table;-
1887-
1888-
1889-
1890-
1891-
1892-
1893 if (s->version == s->ctx->method->version
s->version == ...ethod->versionDescription
TRUEnever evaluated
FALSEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-57
1894 return
never executed: return 1;
1;
never executed: return 1;
0
1895-
1896-
1897-
1898-
1899-
1900 if (s->ctx->method->version == TLS_method()->version
s->ctx->method...hod()->versionDescription
TRUEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-57
1901 table = tls_version_table;
executed 57 times by 1 test: table = tls_version_table;
Executed by:
  • libssl.so.1.1
57
1902 else if (s->ctx->method->version == DTLS_method()->version
s->ctx->method...hod()->versionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1903 table = dtls_version_table;
never executed: table = dtls_version_table;
0
1904 else {-
1905-
1906 return
never executed: return 0;
0;
never executed: return 0;
0
1907 }-
1908-
1909 for (vent = table; vent->version != 0
vent->version != 0Description
TRUEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
; ++vent) {
0-57
1910 if (vent->smeth !=
vent->smeth != ((void *)0)Description
TRUEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-57
1911 ((void *)0)
vent->smeth != ((void *)0)Description
TRUEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-57
1912 && ssl_method_error(s, vent->smeth()) == 0
ssl_method_err...>smeth()) == 0Description
TRUEevaluated 57 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-57
1913 return
executed 57 times by 1 test: return s->version == vent->version;
Executed by:
  • libssl.so.1.1
s->version == vent->version;
executed 57 times by 1 test: return s->version == vent->version;
Executed by:
  • libssl.so.1.1
57
1914 }
never executed: end of block
0
1915 return
never executed: return 0;
0;
never executed: return 0;
0
1916}-
1917int ssl_set_version_bound(int method_version, int version, int *bound)-
1918{-
1919 if (version == 0
version == 0Description
TRUEevaluated 4115 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7703 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
4115-7703
1920 *bound = version;-
1921 return
executed 4115 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 4115 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
4115
1922 }-
1923 switch (method_version) {-
1924 default
never executed: default:
:
never executed: default:
0
1925-
1926-
1927-
1928-
1929-
1930-
1931-
1932 return
never executed: return 0;
0;
never executed: return 0;
0
1933-
1934 case
executed 7095 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
0x10000:
executed 7095 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
7095
1935 if (version < 0x0300
version < 0x0300Description
TRUEnever evaluated
FALSEevaluated 7095 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| version > 0x0304
version > 0x0304Description
TRUEnever evaluated
FALSEevaluated 7095 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-7095
1936 return
never executed: return 0;
0;
never executed: return 0;
0
1937 break;
executed 7095 times by 1 test: break;
Executed by:
  • libssl.so.1.1
7095
1938-
1939 case
executed 608 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
0x1FFFF:
executed 608 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
608
1940 if (((((
((version) == 0x0100)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 606 times by 1 test
Evaluated by:
  • libssl.so.1.1
((((version) =...0 : (0xFEFD)))Description
TRUEnever evaluated
FALSEevaluated 608 times by 1 test
Evaluated by:
  • libssl.so.1.1
version) == 0x0100)
((version) == 0x0100)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 606 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (version)) < (((0xFEFD) == 0x0100) ? 0xff00 : (0xFEFD)))
((((version) =...0 : (0xFEFD)))Description
TRUEnever evaluated
FALSEevaluated 608 times by 1 test
Evaluated by:
  • libssl.so.1.1
||
0-608
1941 ((((
((version) == 0x0100)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 606 times by 1 test
Evaluated by:
  • libssl.so.1.1
((((version) =...0 : (0x0100)))Description
TRUEnever evaluated
FALSEevaluated 608 times by 1 test
Evaluated by:
  • libssl.so.1.1
version) == 0x0100)
((version) == 0x0100)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 606 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (version)) > (((0x0100) == 0x0100) ? 0xff00 : (0x0100)))
((((version) =...0 : (0x0100)))Description
TRUEnever evaluated
FALSEevaluated 608 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-608
1942 return
never executed: return 0;
0;
never executed: return 0;
0
1943 break;
executed 608 times by 1 test: break;
Executed by:
  • libssl.so.1.1
608
1944 }-
1945-
1946 *bound = version;-
1947 return
executed 7703 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 7703 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
7703
1948}-
1949-
1950static void check_for_downgrade(SSL *s, int vers, DOWNGRADE *dgrd)-
1951{-
1952 if (vers == 0x0303
vers == 0x0303Description
TRUEevaluated 1213 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1841 times by 1 test
Evaluated by:
  • libssl.so.1.1
1213-1841
1953 && ssl_version_supported(s, 0x0304,
ssl_version_su... ((void *)0) )Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 309 times by 1 test
Evaluated by:
  • libssl.so.1.1
309-904
1954 ((void *)0)
ssl_version_su... ((void *)0) )Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 309 times by 1 test
Evaluated by:
  • libssl.so.1.1
309-904
1955 )
ssl_version_su... ((void *)0) )Description
TRUEevaluated 904 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 309 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
309-904
1956 *dgrd = DOWNGRADE_TO_1_2;-
1957 }
executed 904 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1973 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
177-1973
1958 && vers < 0x0303
vers < 0x0303Description
TRUEevaluated 578 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1395 times by 1 test
Evaluated by:
  • libssl.so.1.1
578-1395
1959-
1960-
1961-
1962-
1963-
1964-
1965-
1966 && ssl_version_supported(s, 0x0303,
ssl_version_su... ((void *)0) )Description
TRUEevaluated 339 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 239 times by 1 test
Evaluated by:
  • libssl.so.1.1
239-339
1967 ((void *)0)
ssl_version_su... ((void *)0) )Description
TRUEevaluated 339 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 239 times by 1 test
Evaluated by:
  • libssl.so.1.1
239-339
1968 )
ssl_version_su... ((void *)0) )Description
TRUEevaluated 339 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 239 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
239-339
1969 *dgrd = DOWNGRADE_TO_1_1;-
1970 }
executed 339 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
339
1971 *dgrd = DOWNGRADE_NONE;-
1972 }
executed 1811 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1811
1973}-
1974int ssl_choose_server_version(SSL *s, CLIENTHELLO_MSG *hello, DOWNGRADE *dgrd)-
1975{-
1976 int server_version = s->method->version;-
1977 int client_version = hello->legacy_version;-
1978 const version_info *vent;-
1979 const version_info *table;-
1980 int disabled = 0;-
1981 RAW_EXTENSION *suppversions;-
1982-
1983 s->client_version = client_version;-
1984-
1985 switch (server_version) {-
1986 default
executed 78 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 78 times by 1 test: default:
Executed by:
  • libssl.so.1.1
78
1987 if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 78 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->method->version >= 0x0304Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->method->version >= 0x0304
(s)->method->version >= 0x0304Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s)->method->v...ion != 0x10000Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->method->version != 0x10000
(s)->method->v...ion != 0x10000Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-78
1988 if (version_cmp(s, client_version, s->version) < 0
version_cmp(s,...->version) < 0Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-13
1989 return
never executed: return 266;
266;
never executed: return 266;
0
1990 *dgrd = DOWNGRADE_NONE;-
1991-
1992-
1993-
1994-
1995-
1996-
1997-
1998 return
executed 13 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 13 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
13
1999 }-
2000-
2001-
2002-
2003-
2004-
2005 case
executed 3385 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
0x10000:
executed 3385 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
code before this statement executed 65 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
65-3385
2006 table = tls_version_table;-
2007 break;
executed 3450 times by 1 test: break;
Executed by:
  • libssl.so.1.1
3450
2008 case
executed 181 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
0x1FFFF:
executed 181 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
181
2009 table = dtls_version_table;-
2010 break;
executed 181 times by 1 test: break;
Executed by:
  • libssl.so.1.1
181
2011 }-
2012-
2013 suppversions = &hello->pre_proc_exts[TLSEXT_IDX_supported_versions];-
2014-
2015-
2016 if (!suppversions->present
!suppversions->presentDescription
TRUEevaluated 2210 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1421 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->hello_retry_request != SSL_HRR_NONE
s->hello_retry...= SSL_HRR_NONEDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2209 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1-2210
2017 return
executed 1 time by 1 test: return 258;
Executed by:
  • libssl.so.1.1
258;
executed 1 time by 1 test: return 258;
Executed by:
  • libssl.so.1.1
1
2018-
2019 if (suppversions->present
suppversions->presentDescription
TRUEevaluated 1421 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2209 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1421 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-2209
2020 unsigned int candidate_vers = 0;-
2021 unsigned int best_vers = 0;-
2022 const SSL_METHOD *best_method = -
2023 ((void *)0)-
2024 ;-
2025 PACKET versionslist;-
2026-
2027 suppversions->parsed = 1;-
2028-
2029 if (!PACKET_as_length_prefixed_1(&suppversions->data, &versionslist)
!PACKET_as_len...&versionslist)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1417 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
4-1417
2030-
2031 return
executed 4 times by 1 test: return 159;
Executed by:
  • libssl.so.1.1
159;
executed 4 times by 1 test: return 159;
Executed by:
  • libssl.so.1.1
4
2032 }-
2033 if (client_version <= 0x0300
client_version <= 0x0300Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1415 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
2-1415
2034 return
executed 2 times by 1 test: return 292;
Executed by:
  • libssl.so.1.1
292;
executed 2 times by 1 test: return 292;
Executed by:
  • libssl.so.1.1
2
2035-
2036 while (PACKET_get_net_2(&versionslist, &candidate_vers)
PACKET_get_net...andidate_vers)Description
TRUEevaluated 6950 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1415 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1415-6950
2037 if (version_cmp(s, candidate_vers, best_vers) <= 0
version_cmp(s,...est_vers) <= 0Description
TRUEevaluated 3318 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3632 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
3318-3632
2038 continue;
executed 3318 times by 1 test: continue;
Executed by:
  • libssl.so.1.1
3318
2039 if (ssl_version_supported(s, candidate_vers, &best_method)
ssl_version_su... &best_method)Description
TRUEevaluated 1632 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2000 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1632-2000
2040 best_vers = candidate_vers;
executed 1632 times by 1 test: best_vers = candidate_vers;
Executed by:
  • libssl.so.1.1
1632
2041 }
executed 3632 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3632
2042 if (PACKET_remaining(&versionslist) != 0
PACKET_remaini...ionslist) != 0Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1393 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
22-1393
2043-
2044 return
executed 22 times by 1 test: return 159;
Executed by:
  • libssl.so.1.1
159;
executed 22 times by 1 test: return 159;
Executed by:
  • libssl.so.1.1
22
2045 }-
2046-
2047 if (best_vers > 0
best_vers > 0Description
TRUEevaluated 1340 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 53 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
53-1340
2048 if (s->hello_retry_request != SSL_HRR_NONE
s->hello_retry...= SSL_HRR_NONEDescription
TRUEevaluated 55 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
55-1285
2049-
2050-
2051-
2052-
2053 if (best_vers != 0x0304
best_vers != 0x0304Description
TRUEnever evaluated
FALSEevaluated 55 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-55
2054 return
never executed: return 258;
258;
never executed: return 258;
0
2055 return
executed 55 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 55 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
55
2056 }-
2057 check_for_downgrade(s, best_vers, dgrd);-
2058 s->version = best_vers;-
2059 s->method = best_method;-
2060 return
executed 1285 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 1285 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
1285
2061 }-
2062 return
executed 53 times by 1 test: return 258;
Executed by:
  • libssl.so.1.1
258;
executed 53 times by 1 test: return 258;
Executed by:
  • libssl.so.1.1
53
2063 }-
2064-
2065-
2066-
2067-
2068-
2069 if (version_cmp(s, client_version, 0x0304) >= 0
version_cmp(s,..., 0x0304) >= 0Description
TRUEevaluated 367 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1842 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
367-1842
2070 client_version = 0x0303;
executed 367 times by 1 test: client_version = 0x0303;
Executed by:
  • libssl.so.1.1
367
2071-
2072-
2073-
2074-
2075-
2076 for (vent = table; vent->version != 0
vent->version != 0Description
TRUEevaluated 6342 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 440 times by 1 test
Evaluated by:
  • libssl.so.1.1
; ++vent) {
440-6342
2077 const SSL_METHOD *method;-
2078-
2079 if (vent->smeth ==
vent->smeth == ((void *)0)Description
TRUEevaluated 440 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5902 times by 1 test
Evaluated by:
  • libssl.so.1.1
440-5902
2080 ((void *)0)
vent->smeth == ((void *)0)Description
TRUEevaluated 440 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5902 times by 1 test
Evaluated by:
  • libssl.so.1.1
440-5902
2081 ||-
2082 version_cmp(s, client_version, vent->version) < 0
version_cmp(s,...->version) < 0Description
TRUEevaluated 3931 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1971 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1971-3931
2083 continue;
executed 4371 times by 1 test: continue;
Executed by:
  • libssl.so.1.1
4371
2084 method = vent->smeth();-
2085 if (ssl_method_error(s, method) == 0
ssl_method_err..., method) == 0Description
TRUEevaluated 1769 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 202 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
202-1769
2086 check_for_downgrade(s, vent->version, dgrd);-
2087 s->version = vent->version;-
2088 s->method = method;-
2089 return
executed 1769 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 1769 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
1769
2090 }-
2091 disabled = 1;-
2092 }
executed 202 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
202
2093 return
executed 440 times by 1 test: return disabled ? 258 : 396;
Executed by:
  • libssl.so.1.1
disabled
disabledDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 374 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 258 : 396;
executed 440 times by 1 test: return disabled ? 258 : 396;
Executed by:
  • libssl.so.1.1
66-440
2094}-
2095int ssl_choose_client_version(SSL *s, int version, RAW_EXTENSION *extensions)-
2096{-
2097 const version_info *vent;-
2098 const version_info *table;-
2099 int ret, ver_min, ver_max, real_max, origv;-
2100-
2101 origv = s->version;-
2102 s->version = version;-
2103-
2104-
2105 if (!tls_parse_extension(s, TLSEXT_IDX_supported_versions,
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3813
2106 0x0100
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3813
2107 | 0x0200, extensions,
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3813
2108
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3813
2109 ((void *)0)
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-3813
2110 , 0)
!tls_parse_ext...void *)0) , 0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3813 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
3-3813
2111 s->version = origv;-
2112 return
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
3
2113 }-
2114-
2115 if (s->hello_retry_request != SSL_HRR_NONE
s->hello_retry...= SSL_HRR_NONEDescription
TRUEevaluated 33 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3780 times by 1 test
Evaluated by:
  • libssl.so.1.1
33-3780
2116 && s->version != 0x0304
s->version != 0x0304Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
4-29
2117 s->version = origv;-
2118 ossl_statem_fatal((s), (70), (607), (266),-
2119 __FILE__-
2120 ,-
2121 1867-
2122 )-
2123 ;-
2124 return
executed 4 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 4 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
4
2125 }-
2126-
2127 switch (s->method->version) {-
2128 default
executed 22 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 22 times by 1 test: default:
Executed by:
  • libssl.so.1.1
22
2129 if (s->version != s->method->version
s->version != ...ethod->versionDescription
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-22
2130 s->version = origv;-
2131 ossl_statem_fatal((s), (70), (607), (266),-
2132-
2133 __FILE__-
2134 ,-
2135-
2136 1877-
2137 )-
2138-
2139 ;-
2140 return
never executed: return 0;
0;
never executed: return 0;
0
2141 }-
2142-
2143-
2144-
2145-
2146-
2147-
2148-
2149 return
executed 22 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 22 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
22
2150 case
executed 3609 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
0x10000:
executed 3609 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
3609
2151 table = tls_version_table;-
2152 break;
executed 3609 times by 1 test: break;
Executed by:
  • libssl.so.1.1
3609
2153 case
executed 178 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
0x1FFFF:
executed 178 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
178
2154 table = dtls_version_table;-
2155 break;
executed 178 times by 1 test: break;
Executed by:
  • libssl.so.1.1
178
2156 }-
2157-
2158 ret = ssl_get_min_max_version(s, &ver_min, &ver_max, &real_max);-
2159 if (ret != 0
ret != 0Description
TRUEnever evaluated
FALSEevaluated 3787 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-3787
2160 s->version = origv;-
2161 ossl_statem_fatal((s), (70), (607), (ret),-
2162 __FILE__-
2163 ,-
2164 1900-
2165 )-
2166 ;-
2167 return
never executed: return 0;
0;
never executed: return 0;
0
2168 }-
2169 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3609 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3609 times by 1 test
Evaluated by:
  • libssl.so.1.1
? ((((
((s->version) == 0x0100)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->version) == 0x0100)
((s->version) == 0x0100)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 177 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (s->version)) > (((ver_min) == 0x0100) ? 0xff00 : (ver_min)))
(s->method->ss...sion < ver_minDescription
TRUEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3480 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-3609
2170 : s->version < ver_min
(s->method->ss...sion < ver_minDescription
TRUEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3480 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
307-3480
2171 s->version = origv;-
2172 ossl_statem_fatal((s), (70), (607), (258),-
2173 __FILE__-
2174 ,-
2175 1907-
2176 )-
2177 ;-
2178 return
executed 307 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 307 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
307
2179 } else if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 174 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3306 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 174 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3306 times by 1 test
Evaluated by:
  • libssl.so.1.1
? ((((
((s->version) == 0x0100)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 173 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->version) == 0x0100)
((s->version) == 0x0100)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 173 times by 1 test
Evaluated by:
  • libssl.so.1.1
? 0xff00 : (s->version)) < (((ver_max) == 0x0100) ? 0xff00 : (ver_max)))
(s->method->ss...sion > ver_maxDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3479 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-3479
2180 : s->version > ver_max
(s->method->ss...sion > ver_maxDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3479 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-3479
2181 s->version = origv;-
2182 ossl_statem_fatal((s), (70), (607), (258),-
2183 __FILE__-
2184 ,-
2185 1913-
2186 )-
2187 ;-
2188 return
executed 1 time by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 1 time by 1 test: return 0;
Executed by:
  • libssl.so.1.1
1
2189 }-
2190-
2191 if ((
(s->mode & 0x00000080U) == 0Description
TRUEevaluated 3478 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
s->mode & 0x00000080U) == 0
(s->mode & 0x00000080U) == 0Description
TRUEevaluated 3478 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
)
1-3478
2192 real_max = ver_max;
executed 3478 times by 1 test: real_max = ver_max;
Executed by:
  • libssl.so.1.1
3478
2193-
2194-
2195 if (s->version == 0x0303
s->version == 0x0303Description
TRUEevaluated 1994 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1485 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& real_max > s->version
real_max > s->versionDescription
TRUEevaluated 1553 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 441 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
441-1994
2196 if (memcmp(tls12downgrade,
memcmp(tls12do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1550 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-1550
2197 s->s3->server_random + 32
memcmp(tls12do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1550 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-1550
2198 - sizeof(tls12downgrade),
memcmp(tls12do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1550 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-1550
2199 sizeof(tls12downgrade)) == 0
memcmp(tls12do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1550 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
3-1550
2200 s->version = origv;-
2201 ossl_statem_fatal((s), (47), (607), (373),-
2202-
2203 __FILE__-
2204 ,-
2205-
2206 1929-
2207 )-
2208-
2209 ;-
2210 return
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
3
2211 }-
2212 }
executed 1550 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 1752 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 174 times by 1 test
Evaluated by:
  • libssl.so.1.1
174-1752
2213 && s->version < 0x0303
s->version < 0x0303Description
TRUEevaluated 672 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1080 times by 1 test
Evaluated by:
  • libssl.so.1.1
672-1080
2214 && real_max > s->version
real_max > s->versionDescription
TRUEevaluated 457 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 215 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
215-457
2215 if (memcmp(tls11downgrade,
memcmp(tls11do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 454 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-454
2216 s->s3->server_random + 32
memcmp(tls11do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 454 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-454
2217 - sizeof(tls11downgrade),
memcmp(tls11do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 454 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-454
2218 sizeof(tls11downgrade)) == 0
memcmp(tls11do...wngrade)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 454 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
3-454
2219 s->version = origv;-
2220 ossl_statem_fatal((s), (47), (607), (373),-
2221-
2222 __FILE__-
2223 ,-
2224-
2225 1942-
2226 )-
2227-
2228 ;-
2229 return
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 3 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
3
2230 }-
2231 }
executed 454 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
454
2232-
2233 for (vent = table; vent->version != 0
vent->version != 0Description
TRUEevaluated 7188 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
; ++vent) {
0-7188
2234 if (vent->cmeth ==
vent->cmeth == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 7188 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7188
2235 ((void *)0)
vent->cmeth == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 7188 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7188
2236 || s->version != vent->version
s->version != vent->versionDescription
TRUEevaluated 3715 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3473 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
3473-3715
2237 continue;
executed 3715 times by 1 test: continue;
Executed by:
  • libssl.so.1.1
3715
2238-
2239 s->method = vent->cmeth();-
2240 return
executed 3473 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 3473 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
3473
2241 }-
2242-
2243 s->version = origv;-
2244 ossl_statem_fatal((s), (70), (607), (258),-
2245 __FILE__-
2246 ,-
2247 1957-
2248 )-
2249 ;-
2250 return
never executed: return 0;
0;
never executed: return 0;
0
2251}-
2252int ssl_get_min_max_version(const SSL *s, int *min_version, int *max_version,-
2253 int *real_max)-
2254{-
2255 int version, tmp_real_max;-
2256 int hole;-
2257 const SSL_METHOD *single = -
2258 ((void *)0)-
2259 ;-
2260 const SSL_METHOD *method;-
2261 const version_info *table;-
2262 const version_info *vent;-
2263-
2264 switch (s->method->version) {-
2265 default
executed 102 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 102 times by 1 test: default:
Executed by:
  • libssl.so.1.1
102
2266-
2267-
2268-
2269-
2270-
2271-
2272-
2273 *min_version = *max_version = s->version;-
2274-
2275-
2276-
2277-
2278 if (!((real_max ==
!((real_max ==...d *)0) ) != 0)Description
TRUEnever evaluated
FALSEevaluated 102 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-102
2279 ((void *)0)
!((real_max ==...d *)0) ) != 0)Description
TRUEnever evaluated
FALSEevaluated 102 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-102
2280 ) != 0)
!((real_max ==...d *)0) ) != 0)Description
TRUEnever evaluated
FALSEevaluated 102 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-102
2281 return
never executed: return (4|64);
(4|64);
never executed: return (4|64);
0
2282 return
executed 102 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 102 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
102
2283 case
executed 26130 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
0x10000:
executed 26130 times by 1 test: case 0x10000:
Executed by:
  • libssl.so.1.1
26130
2284 table = tls_version_table;-
2285 break;
executed 26130 times by 1 test: break;
Executed by:
  • libssl.so.1.1
26130
2286 case
executed 908 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
0x1FFFF:
executed 908 times by 1 test: case 0x1FFFF:
Executed by:
  • libssl.so.1.1
908
2287 table = dtls_version_table;-
2288 break;
executed 908 times by 1 test: break;
Executed by:
  • libssl.so.1.1
908
2289 }-
2290 *min_version = version = 0;-
2291 hole = 1;-
2292 if (real_max !=
real_max != ((void *)0)Description
TRUEevaluated 3787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23251 times by 1 test
Evaluated by:
  • libssl.so.1.1
3787-23251
2293 ((void *)0)
real_max != ((void *)0)Description
TRUEevaluated 3787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23251 times by 1 test
Evaluated by:
  • libssl.so.1.1
3787-23251
2294 )-
2295 *
executed 3787 times by 1 test: *real_max = 0;
Executed by:
  • libssl.so.1.1
real_max = 0;
executed 3787 times by 1 test: *real_max = 0;
Executed by:
  • libssl.so.1.1
3787
2296 tmp_real_max = 0;-
2297 for (vent = table; vent->version != 0
vent->version != 0Description
TRUEevaluated 133374 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 27038 times by 1 test
Evaluated by:
  • libssl.so.1.1
; ++vent) {
27038-133374
2298-
2299-
2300-
2301-
2302 if (vent->cmeth ==
vent->cmeth == ((void *)0)Description
TRUEevaluated 26130 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 107244 times by 1 test
Evaluated by:
  • libssl.so.1.1
26130-107244
2303 ((void *)0)
vent->cmeth == ((void *)0)Description
TRUEevaluated 26130 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 107244 times by 1 test
Evaluated by:
  • libssl.so.1.1
26130-107244
2304 ) {-
2305 hole = 1;-
2306 tmp_real_max = 0;-
2307 continue;
executed 26130 times by 1 test: continue;
Executed by:
  • libssl.so.1.1
26130
2308 }-
2309 method = vent->cmeth();-
2310-
2311 if (hole == 1
hole == 1Description
TRUEevaluated 37117 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 70127 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& tmp_real_max == 0
tmp_real_max == 0Description
TRUEevaluated 27038 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10079 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
10079-70127
2312 tmp_real_max = vent->version;
executed 27038 times by 1 test: tmp_real_max = vent->version;
Executed by:
  • libssl.so.1.1
27038
2313-
2314 if (ssl_method_error(s, method) != 0
ssl_method_err..., method) != 0Description
TRUEevaluated 13056 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 94188 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
13056-94188
2315 hole = 1;-
2316 }
executed 13056 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!hole
!holeDescription
TRUEevaluated 67244 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26944 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
13056-67244
2317 single = -
2318 ((void *)0)-
2319 ;-
2320 *min_version = method->version;-
2321 }
executed 67244 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
67244
2322 if (real_max !=
real_max != ((void *)0)Description
TRUEevaluated 3788 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23156 times by 1 test
Evaluated by:
  • libssl.so.1.1
3788-23156
2323 ((void *)0)
real_max != ((void *)0)Description
TRUEevaluated 3788 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23156 times by 1 test
Evaluated by:
  • libssl.so.1.1
3788-23156
2324 && tmp_real_max != 0
tmp_real_max != 0Description
TRUEevaluated 3788 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-3788
2325 *
executed 3788 times by 1 test: *real_max = tmp_real_max;
Executed by:
  • libssl.so.1.1
real_max = tmp_real_max;
executed 3788 times by 1 test: *real_max = tmp_real_max;
Executed by:
  • libssl.so.1.1
3788
2326 version = (single = method)->version;-
2327 *min_version = version;-
2328 hole = 0;-
2329 }
executed 26944 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
26944
2330 }-
2331-
2332 *max_version = version;-
2333-
2334-
2335 if (version == 0
version == 0Description
TRUEevaluated 100 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26938 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
100-26938
2336 return
executed 100 times by 1 test: return 191;
Executed by:
  • libssl.so.1.1
191;
executed 100 times by 1 test: return 191;
Executed by:
  • libssl.so.1.1
100
2337-
2338 return
executed 26938 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 26938 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
26938
2339}-
2340int ssl_set_client_hello_version(SSL *s)-
2341{-
2342 int ver_min, ver_max, ret;-
2343-
2344-
2345-
2346-
2347-
2348 if (!((
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 4968 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.finish_md_len == 0
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 4968 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.peer_finish_md_len == 0
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libssl.so.1.1
))
0-4968
2349 return
executed 24 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 24 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
24
2350-
2351 ret = ssl_get_min_max_version(s, &ver_min, &ver_max, -
2352 ((void *)0)-
2353 );-
2354-
2355 if (ret != 0
ret != 0Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4916 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
52-4916
2356 return
executed 52 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
ret;
executed 52 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
52
2357-
2358 s->version = ver_max;-
2359-
2360-
2361 if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 4733 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 183 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& ver_max > 0x0303
ver_max > 0x0303Description
TRUEevaluated 3919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 814 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
183-4733
2362 ver_max = 0x0303;
executed 3919 times by 1 test: ver_max = 0x0303;
Executed by:
  • libssl.so.1.1
3919
2363-
2364 s->client_version = ver_max;-
2365 return
executed 4916 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 4916 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
4916
2366}-
2367int check_in_list(SSL *s, uint16_t group_id, const uint16_t *groups,-
2368 size_t num_groups, int checkallow)-
2369{-
2370 size_t i;-
2371-
2372 if (groups ==
groups == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2424 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2424
2373 ((void *)0)
groups == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2424 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2424
2374 || num_groups == 0
num_groups == 0Description
TRUEnever evaluated
FALSEevaluated 2424 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-2424
2375 return
never executed: return 0;
0;
never executed: return 0;
0
2376-
2377 for (i = 0; i < num_groups
i < num_groupsDescription
TRUEevaluated 4840 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
280-4840
2378 uint16_t group = groups[i];-
2379-
2380 if (group_id == group
group_id == groupDescription
TRUEevaluated 2144 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2696 times by 1 test
Evaluated by:
  • libssl.so.1.1
2144-2696
2381 && (!checkallow
!checkallowDescription
TRUEevaluated 1100 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1044 times by 1 test
Evaluated by:
  • libssl.so.1.1
1044-1100
2382 || tls_curve_allowed(s, group, (6 | (2 << 16)))
tls_curve_allo... | (2 << 16)))Description
TRUEevaluated 1044 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)) {
0-1044
2383 return
executed 2144 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2144 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2144
2384 }-
2385 }
executed 2696 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2696
2386-
2387 return
executed 280 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 280 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
280
2388}-
2389-
2390-
2391-
2392int create_synthetic_message_hash(SSL *s, const unsigned char *hashval,-
2393 size_t hashlen, const unsigned char *hrr,-
2394 size_t hrrlen)-
2395{-
2396 unsigned char hashvaltmp[64];-
2397 unsigned char msghdr[4];-
2398-
2399 memset(msghdr, 0, sizeof(msghdr));-
2400-
2401 if (hashval ==
hashval == ((void *)0)Description
TRUEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
1-792
2402 ((void *)0)
hashval == ((void *)0)Description
TRUEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
1-792
2403 ) {-
2404 hashval = hashvaltmp;-
2405 hashlen = 0;-
2406-
2407 if (!ssl3_digest_cached_records(s, 0)
!ssl3_digest_c..._records(s, 0)Description
TRUEnever evaluated
FALSEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-792
2408 || !ssl_handshake_hash(s, hashvaltmp, sizeof(hashvaltmp),
!ssl_handshake...mp), &hashlen)Description
TRUEnever evaluated
FALSEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-792
2409 &hashlen)
!ssl_handshake...mp), &hashlen)Description
TRUEnever evaluated
FALSEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-792
2410-
2411 return
never executed: return 0;
0;
never executed: return 0;
0
2412 }-
2413 }
executed 792 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
792
2414-
2415-
2416 if (!ssl3_init_finished_mac(s)
!ssl3_init_finished_mac(s)Description
TRUEnever evaluated
FALSEevaluated 793 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-793
2417-
2418 return
never executed: return 0;
0;
never executed: return 0;
0
2419 }-
2420-
2421-
2422 msghdr[0] = 254;-
2423 msghdr[4 - 1] = (unsigned char)hashlen;-
2424 if (!ssl3_finish_mac(s, msghdr, 4)
!ssl3_finish_mac(s, msghdr, 4)Description
TRUEnever evaluated
FALSEevaluated 793 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-793
2425 || !ssl3_finish_mac(s, hashval, hashlen)
!ssl3_finish_m...hval, hashlen)Description
TRUEnever evaluated
FALSEevaluated 793 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-793
2426-
2427 return
never executed: return 0;
0;
never executed: return 0;
0
2428 }-
2429-
2430-
2431-
2432-
2433-
2434-
2435 if (hrr !=
hrr != ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-792
2436 ((void *)0)
hrr != ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 792 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-792
2437 -
2438 && (!ssl3_finish_mac(s, hrr, hrrlen)
!ssl3_finish_m..., hrr, hrrlen)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
0-1
2439 || !ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
!ssl3_finish_m...sage_size + 4)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
0-1
2440 s->s3->tmp.message_size
!ssl3_finish_m...sage_size + 4)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
0-1
2441 + 4)
!ssl3_finish_m...sage_size + 4)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
0-1
2442-
2443 return
never executed: return 0;
0;
never executed: return 0;
0
2444 }-
2445-
2446 return
executed 793 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 793 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
793
2447}-
2448-
2449static int ca_dn_cmp(const X509_NAME *const *a, const X509_NAME *const *b)-
2450{-
2451 return
never executed: return X509_NAME_cmp(*a, *b);
X509_NAME_cmp(*a, *b);
never executed: return X509_NAME_cmp(*a, *b);
0
2452}-
2453-
2454int parse_ca_names(SSL *s, PACKET *pkt)-
2455{-
2456 struct stack_st_X509_NAME *ca_sk = sk_X509_NAME_new(ca_dn_cmp);-
2457 X509_NAME *xn = -
2458 ((void *)0)-
2459 ;-
2460 PACKET cadns;-
2461-
2462 if (ca_sk ==
ca_sk == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 115 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-115
2463 ((void *)0)
ca_sk == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 115 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-115
2464 ) {-
2465 ossl_statem_fatal((s), (80), (541), ((1|64)),-
2466 __FILE__-
2467 ,-
2468 2212-
2469 )-
2470 ;-
2471 goto
never executed: goto err;
err;
never executed: goto err;
0
2472 }-
2473-
2474 if (!PACKET_get_length_prefixed_2(pkt, &cadns)
!PACKET_get_le...2(pkt, &cadns)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 67 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
48-67
2475 ossl_statem_fatal((s), (50), (541), (159),-
2476 __FILE__-
2477 ,-
2478 2218-
2479 )-
2480 ;-
2481 goto
executed 48 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 48 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
48
2482 }-
2483-
2484 while (PACKET_remaining(&cadns)
PACKET_remaining(&cadns)Description
TRUEevaluated 59 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 51 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
51-59
2485 const unsigned char *namestart, *namebytes;-
2486 unsigned int name_len;-
2487-
2488 if (!PACKET_get_net_2(&cadns, &name_len)
!PACKET_get_ne...ns, &name_len)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 56 times by 1 test
Evaluated by:
  • libssl.so.1.1
3-56
2489 || !PACKET_get_bytes(&cadns, &namebytes, name_len)
!PACKET_get_by...tes, name_len)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 50 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
6-50
2490 ossl_statem_fatal((s), (50), (541), (159),-
2491 __FILE__-
2492 ,-
2493 2229-
2494 )-
2495 ;-
2496 goto
executed 9 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 9 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
9
2497 }-
2498-
2499 namestart = namebytes;-
2500 if ((
(xn = d2i_X509...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libssl.so.1.1
xn = d2i_X509_NAME(
(xn = d2i_X509...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-44
2501 ((void *)0)
(xn = d2i_X509...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-44
2502 , &namebytes, name_len)) ==
(xn = d2i_X509...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-44
2503 ((void *)0)
(xn = d2i_X509...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-44
2504 ) {-
2505 ossl_statem_fatal((s), (50), (541), (13),-
2506 __FILE__-
2507 ,-
2508 2236-
2509 )-
2510 ;-
2511 goto
executed 6 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 6 times by 1 test: goto err;
Executed by:
  • libssl.so.1.1
6
2512 }-
2513 if (namebytes != (namestart + name_len)
namebytes != (...rt + name_len)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 43 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1-43
2514 ossl_statem_fatal((s), (50), (541), (131),-
2515 __FILE__-
2516 ,-
2517 2241-
2518 )-
2519 ;-
2520 goto
executed 1 time by 1 test: goto err;
Executed by:
  • libssl.so.1.1
err;
executed 1 time by 1 test: goto err;
Executed by:
  • libssl.so.1.1
1
2521 }-
2522-
2523 if (!sk_X509_NAME_push(ca_sk, xn)
!sk_X509_NAME_push(ca_sk, xn)Description
TRUEnever evaluated
FALSEevaluated 43 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-43
2524 ossl_statem_fatal((s), (80), (541), ((1|64)),-
2525 __FILE__-
2526 ,-
2527 2247-
2528 )-
2529 ;-
2530 goto
never executed: goto err;
err;
never executed: goto err;
0
2531 }-
2532 xn = -
2533 ((void *)0)-
2534 ;-
2535 }
executed 43 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
43
2536-
2537 sk_X509_NAME_pop_free(s->s3->tmp.peer_ca_names, X509_NAME_free);-
2538 s->s3->tmp.peer_ca_names = ca_sk;-
2539-
2540 return
executed 51 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 51 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
51
2541-
2542 err:-
2543 sk_X509_NAME_pop_free(ca_sk, X509_NAME_free);-
2544 X509_NAME_free(xn);-
2545 return
executed 64 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 64 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
64
2546}-
2547-
2548int construct_ca_names(SSL *s, WPACKET *pkt)-
2549{-
2550 const struct stack_st_X509_NAME *ca_sk = SSL_get0_CA_list(s);-
2551-
2552-
2553 if (!WPACKET_start_sub_packet_len__((pkt), 2)
!WPACKET_start...en__((pkt), 2)Description
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-40
2554 ossl_statem_fatal((s), (80), (552), ((4|64)),-
2555 __FILE__-
2556 ,-
2557 2271-
2558 )-
2559 ;-
2560 return
never executed: return 0;
0;
never executed: return 0;
0
2561 }-
2562-
2563 if (ca_sk !=
ca_sk != ((void *)0)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-40
2564 ((void *)0)
ca_sk != ((void *)0)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-40
2565 ) {-
2566 int i;-
2567-
2568 for (i = 0; i < sk_X509_NAME_num(ca_sk)
i < sk_X509_NAME_num(ca_sk)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
; i++) {
10-40
2569 unsigned char *namebytes;-
2570 X509_NAME *name = sk_X509_NAME_value(ca_sk, i);-
2571 int namelen;-
2572-
2573 if (name ==
name == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2574 ((void *)0)
name == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2575 -
2576 || (
(namelen = i2d...id *)0) )) < 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
namelen = i2d_X509_NAME(name,
(namelen = i2d...id *)0) )) < 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2577 ((void *)0)
(namelen = i2d...id *)0) )) < 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2578 )) < 0
(namelen = i2d...id *)0) )) < 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2579 || !WPACKET_sub_allocate_bytes__((pkt), (namelen), (&namebytes), 2)
!WPACKET_sub_a...namebytes), 2)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10
2580-
2581 || i2d_X509_NAME(name, &namebytes) != namelen
i2d_X509_NAME(...es) != namelenDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-10
2582 ossl_statem_fatal((s), (80), (552), ((4|64)),-
2583 __FILE__-
2584 ,-
2585 2289-
2586 )-
2587 ;-
2588 return
never executed: return 0;
0;
never executed: return 0;
0
2589 }-
2590 }
executed 10 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
10
2591 }
executed 40 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
40
2592-
2593 if (!WPACKET_close(pkt)
!WPACKET_close(pkt)Description
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-40
2594 ossl_statem_fatal((s), (80), (552), ((4|64)),-
2595 __FILE__-
2596 ,-
2597 2297-
2598 )-
2599 ;-
2600 return
never executed: return 0;
0;
never executed: return 0;
0
2601 }-
2602-
2603 return
executed 40 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 40 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
40
2604}-
2605-
2606-
2607size_t construct_key_exchange_tbs(SSL *s, unsigned char **ptbs,-
2608 const void *param, size_t paramlen)-
2609{-
2610 size_t tbslen = 2 * 32 + paramlen;-
2611 unsigned char *tbs = CRYPTO_malloc(tbslen, __FILE__, 2309);-
2612-
2613 if (tbs ==
tbs == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2344 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2344
2614 ((void *)0)
tbs == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2344 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2344
2615 ) {-
2616 ossl_statem_fatal((s), (80), (553), ((1|64)),-
2617 __FILE__-
2618 ,-
2619 2313-
2620 )-
2621 ;-
2622 return
never executed: return 0;
0;
never executed: return 0;
0
2623 }-
2624 memcpy(tbs, s->s3->client_random, 32);-
2625 memcpy(tbs + 32, s->s3->server_random, 32);-
2626-
2627 memcpy(tbs + 32 * 2, param, paramlen);-
2628-
2629 *ptbs = tbs;-
2630 return
executed 2344 times by 1 test: return tbslen;
Executed by:
  • libssl.so.1.1
tbslen;
executed 2344 times by 1 test: return tbslen;
Executed by:
  • libssl.so.1.1
2344
2631}-
2632-
2633-
2634-
2635-
2636-
2637int tls13_save_handshake_digest_for_pha(SSL *s)-
2638{-
2639 if (s->pha_dgst ==
s->pha_dgst == ((void *)0)Description
TRUEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libssl.so.1.1
47-1138
2640 ((void *)0)
s->pha_dgst == ((void *)0)Description
TRUEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libssl.so.1.1
47-1138
2641 ) {-
2642 if (!ssl3_digest_cached_records(s, 1)
!ssl3_digest_c..._records(s, 1)Description
TRUEnever evaluated
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-1138
2643-
2644 return
never executed: return 0;
0;
never executed: return 0;
0
2645-
2646 s->pha_dgst = EVP_MD_CTX_new();-
2647 if (s->pha_dgst ==
s->pha_dgst == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-1138
2648 ((void *)0)
s->pha_dgst == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-1138
2649 ) {-
2650 ossl_statem_fatal((s), (80), (618), ((4|64)),-
2651-
2652 __FILE__-
2653 ,-
2654-
2655 2340-
2656 )-
2657-
2658 ;-
2659 return
never executed: return 0;
0;
never executed: return 0;
0
2660 }-
2661 if (!EVP_MD_CTX_copy_ex(s->pha_dgst,
!EVP_MD_CTX_co...andshake_dgst)Description
TRUEnever evaluated
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-1138
2662 s->s3->handshake_dgst)
!EVP_MD_CTX_co...andshake_dgst)Description
TRUEnever evaluated
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-1138
2663 ossl_statem_fatal((s), (80), (618), ((4|64)),-
2664-
2665 __FILE__-
2666 ,-
2667-
2668 2347-
2669 )-
2670-
2671 ;-
2672 return
never executed: return 0;
0;
never executed: return 0;
0
2673 }-
2674 }
executed 1138 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1138
2675 return
executed 1185 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 1185 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1185
2676}-
2677-
2678-
2679-
2680-
2681-
2682int tls13_restore_handshake_digest_for_pha(SSL *s)-
2683{-
2684 if (s->pha_dgst ==
s->pha_dgst == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 51 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-51
2685 ((void *)0)
s->pha_dgst == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 51 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-51
2686 ) {-
2687 ossl_statem_fatal((s), (80), (617), ((4|64)),-
2688-
2689 __FILE__-
2690 ,-
2691-
2692 2363-
2693 )-
2694-
2695 ;-
2696 return
never executed: return 0;
0;
never executed: return 0;
0
2697 }-
2698 if (!EVP_MD_CTX_copy_ex(s->s3->handshake_dgst,
!EVP_MD_CTX_co..., s->pha_dgst)Description
TRUEnever evaluated
FALSEevaluated 51 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-51
2699 s->pha_dgst)
!EVP_MD_CTX_co..., s->pha_dgst)Description
TRUEnever evaluated
FALSEevaluated 51 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-51
2700 ossl_statem_fatal((s), (80), (617), ((4|64)),-
2701-
2702 __FILE__-
2703 ,-
2704-
2705 2370-
2706 )-
2707-
2708 ;-
2709 return
never executed: return 0;
0;
never executed: return 0;
0
2710 }-
2711 return
executed 51 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 51 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
51
2712}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2