OpenCoverage

cipher.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/cipher.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9struct sshcipher_ctx {-
10 int plaintext;-
11 int encrypt;-
12 EVP_CIPHER_CTX *evp;-
13 struct chachapoly_ctx cp_ctx;-
14 struct aesctr_ctx ac_ctx;-
15 const struct sshcipher *cipher;-
16};-
17-
18struct sshcipher {-
19 char *name;-
20 u_int block_size;-
21 u_int key_len;-
22 u_int iv_len;-
23 u_int auth_len;-
24 u_int flags;-
25-
26-
27-
28-
29-
30-
31 const EVP_CIPHER *(*evptype)(void);-
32-
33-
34-
35};-
36-
37static const struct sshcipher ciphers[] = {-
38-
39-
40 { "3des-cbc", 8, 24, 0, 0, (1<<0), EVP_des_ede3_cbc },-
41-
42 { "aes128-cbc", 16, 16, 0, 0, (1<<0), EVP_aes_128_cbc },-
43 { "aes192-cbc", 16, 24, 0, 0, (1<<0), EVP_aes_192_cbc },-
44 { "aes256-cbc", 16, 32, 0, 0, (1<<0), EVP_aes_256_cbc },-
45 { "rijndael-cbc@lysator.liu.se",-
46 16, 32, 0, 0, (1<<0), EVP_aes_256_cbc },-
47 { "aes128-ctr", 16, 16, 0, 0, 0, EVP_aes_128_ctr },-
48 { "aes192-ctr", 16, 24, 0, 0, 0, EVP_aes_192_ctr },-
49 { "aes256-ctr", 16, 32, 0, 0, 0, EVP_aes_256_ctr },-
50-
51 { "aes128-gcm@openssh.com",-
52 16, 16, 12, 16, 0, EVP_aes_128_gcm },-
53 { "aes256-gcm@openssh.com",-
54 16, 32, 12, 16, 0, EVP_aes_256_gcm },-
55-
56-
57-
58-
59-
60-
61 { "chacha20-poly1305@openssh.com",-
62 8, 64, 0, 16, (1<<1), -
63 ((void *)0) -
64 },-
65 { "none", 8, 0, 0, 0, (1<<3), -
66 ((void *)0) -
67 },-
68-
69 { -
70 ((void *)0)-
71 , 0, 0, 0, 0, 0, -
72 ((void *)0) -
73 }-
74};-
75-
76-
77-
78-
79char *-
80cipher_alg_list(char sep, int auth_only)-
81{-
82 char *tmp, *ret = -
83 ((void *)0)-
84 ;-
85 size_t nlen, rlen = 0;-
86 const struct sshcipher *c;-
87-
88 for (c = ciphers; c->name !=
c->name != ((void *)0)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 2 times by 1 test
Evaluated by:
  • sshd
2-24
89 ((void *)0)
c->name != ((void *)0)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 2 times by 1 test
Evaluated by:
  • sshd
2-24
90 ; c++) {-
91 if ((
(c->flags & (1<<3)) != 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
c->flags & (1<<3)) != 0
(c->flags & (1<<3)) != 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
)
2-22
92 continue;
executed 2 times by 1 test: continue;
Executed by:
  • sshd
2
93 if (auth_only
auth_onlyDescription
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
&& c->auth_len == 0
c->auth_len == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0-22
94 continue;
never executed: continue;
0
95 if (ret !=
ret != ((void *)0)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 2 times by 1 test
Evaluated by:
  • sshd
2-20
96 ((void *)0)
ret != ((void *)0)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • sshd
FALSEevaluated 2 times by 1 test
Evaluated by:
  • sshd
2-20
97 )-
98 ret[rlen++] = sep;
executed 20 times by 1 test: ret[rlen++] = sep;
Executed by:
  • sshd
20
99 nlen = strlen(c->name);-
100 if ((
(tmp = realloc...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
tmp = realloc(ret, rlen + nlen + 2)) ==
(tmp = realloc...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
0-22
101 ((void *)0)
(tmp = realloc...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • sshd
0-22
102 ) {-
103 free(ret);-
104 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
105 ((void *)0)
never executed: return ((void *)0) ;
0
106 ;
never executed: return ((void *)0) ;
0
107 }-
108 ret = tmp;-
109 memcpy(ret + rlen, c->name, nlen + 1);-
110 rlen += nlen;-
111 }
executed 22 times by 1 test: end of block
Executed by:
  • sshd
22
112 return
executed 2 times by 1 test: return ret;
Executed by:
  • sshd
ret;
executed 2 times by 1 test: return ret;
Executed by:
  • sshd
2
113}-
114-
115u_int-
116cipher_blocksize(const struct sshcipher *c)-
117{-
118 return
executed 18494 times by 4 tests: return (c->block_size);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
(c->block_size);
executed 18494 times by 4 tests: return (c->block_size);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18494
119}-
120-
121u_int-
122cipher_keylen(const struct sshcipher *c)-
123{-
124 return
executed 19678 times by 4 tests: return (c->key_len);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
(c->key_len);
executed 19678 times by 4 tests: return (c->key_len);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19678
125}-
126-
127u_int-
128cipher_seclen(const struct sshcipher *c)-
129{-
130 if (-
131 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
132 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
133 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
134 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
135 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
136 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
137 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
138 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
139 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
140 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
141 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
142 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
143 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
144 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
145 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
146 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
147 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
148 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
149 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
150 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
151 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
152 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
153 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
154 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
155 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
156 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
157 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
158 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
159 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
160 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
161 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
162 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
163 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
164 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
165 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
166 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
167 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
168 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
169 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
170 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
171 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
172 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
173 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
174 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
175 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
176 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
177 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "3des-cbc" ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
178 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
never executed: __result = (((const unsigned char *) (const char *) ( "3des-cbc" ))[3] - __s2[3]);
0-1280
179 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
never executed: __result = (((const unsigned char *) (const char *) ( "3des-cbc" ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
180 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
181 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
182 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
183 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
184 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
185 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
186 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
187 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
188 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
189 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
190 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
191 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
192 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
193 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
194 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
195 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
196 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
197 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
198 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
199 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
200 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
201 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
202 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
203 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
204 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
205 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
206 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
0-1280
207 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
208 "3des-cbc"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
209 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
210 c->name
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
211 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
0-1280
212 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • test_kex
)
0-1280
213 return
never executed: return 14;
14;
never executed: return 14;
0
214 return
executed 1280 times by 1 test: return cipher_keylen(c);
Executed by:
  • test_kex
cipher_keylen(c);
executed 1280 times by 1 test: return cipher_keylen(c);
Executed by:
  • test_kex
1280
215}-
216-
217u_int-
218cipher_authlen(const struct sshcipher *c)-
219{-
220 return
executed 22626 times by 4 tests: return (c->auth_len);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
(c->auth_len);
executed 22626 times by 4 tests: return (c->auth_len);
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
22626
221}-
222-
223u_int-
224cipher_ivlen(const struct sshcipher *c)-
225{-
226-
227-
228-
229-
230 return
executed 36500 times by 4 tests: return (c->iv_len != 0 || (c->flags & (1<<1)) != 0) ? c->iv_len : c->block_size;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
(c->iv_len != 0
c->iv_len != 0Description
TRUEnever evaluated
FALSEevaluated 36500 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
|| (
(c->flags & (1<<1)) != 0Description
TRUEevaluated 1344 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 35156 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
c->flags & (1<<1)) != 0
(c->flags & (1<<1)) != 0Description
TRUEevaluated 1344 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 35156 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
) ?
executed 36500 times by 4 tests: return (c->iv_len != 0 || (c->flags & (1<<1)) != 0) ? c->iv_len : c->block_size;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-36500
231 c->iv_len : c->block_size;
executed 36500 times by 4 tests: return (c->iv_len != 0 || (c->flags & (1<<1)) != 0) ? c->iv_len : c->block_size;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
36500
232}-
233-
234u_int-
235cipher_is_cbc(const struct sshcipher *c)-
236{-
237 return
never executed: return (c->flags & (1<<0)) != 0;
(c->flags & (1<<0)) != 0;
never executed: return (c->flags & (1<<0)) != 0;
0
238}-
239-
240u_int-
241cipher_ctx_is_plaintext(struct sshcipher_ctx *cc)-
242{-
243 return
executed 832 times by 1 test: return cc->plaintext;
Executed by:
  • test_kex
cc->plaintext;
executed 832 times by 1 test: return cc->plaintext;
Executed by:
  • test_kex
832
244}-
245-
246const struct sshcipher *-
247cipher_by_name(const char *name)-
248{-
249 const struct sshcipher *c;-
250 for (c = ciphers; c->name !=
c->name != ((void *)0)Description
TRUEevaluated 234176 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 282 times by 1 test
Evaluated by:
  • test_sshkey
282-234176
251 ((void *)0)
c->name != ((void *)0)Description
TRUEevaluated 234176 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 282 times by 1 test
Evaluated by:
  • test_sshkey
282-234176
252 ; c++)-
253 if (-
254 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
255 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
256 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
257 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
258 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
259 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
260 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
261 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
262 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
263 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
264 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
265 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
266 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
267 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
268 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
269 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
270 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
271 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
272 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
273 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
274 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
275 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
276 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
277 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
278 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
279 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
280 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
281 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
282 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
283 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
284 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
285 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
286 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
287 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
288 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
289 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
290 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
291 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
292 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
293 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
294 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
295 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
296 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
297 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
298 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
299 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
300 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
301 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
0-214882
302 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
never executed: __result = (((const unsigned char *) (const char *) ( c->name ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
303 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
304 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
305 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
306 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
307 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
308 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
309 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
310 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
311 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
312 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
313 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
314 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
315 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
316 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
317 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
318 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
319 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
320 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
321 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
322 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
323 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
324 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
325 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
326 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
327 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
328 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
329 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]);
0-214882
330 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-214882
331 c->name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
332 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
333 name
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
334 )))); })
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294-214882
335 == 0
__extension__ ... )))); }) == 0Description
TRUEevaluated 19294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 214882 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
)
19294-214882
336 return
executed 19294 times by 4 tests: return c;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
c;
executed 19294 times by 4 tests: return c;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
19294
337 return
executed 282 times by 1 test: return ((void *)0) ;
Executed by:
  • test_sshkey
executed 282 times by 1 test: return ((void *)0) ;
Executed by:
  • test_sshkey
282
338 ((void *)0)
executed 282 times by 1 test: return ((void *)0) ;
Executed by:
  • test_sshkey
282
339 ;
executed 282 times by 1 test: return ((void *)0) ;
Executed by:
  • test_sshkey
282
340}-
341-
342-
343int-
344ciphers_valid(const char *names)-
345{-
346 const struct sshcipher *c;-
347 char *cipher_list, *cp;-
348 char *p;-
349-
350 if (names ==
names == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
351 ((void *)0)
names == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
352 || -
353 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
354 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
355 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
356 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
357 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
358 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
359 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
360 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
361 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
362 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
363 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
364 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
365 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
366 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
367 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
368 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
369 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
370 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
371 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
372 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
373 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
374 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
375 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
376 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
377 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
378 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
379 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
380 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
381 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
382 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
383 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
384 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
385 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
386 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
387 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
388 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
389 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
390 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
391 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
392 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
393 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
394 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
395 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
396 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
397 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
398 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
399 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( names ))[3] - __s2[3]);
0
400 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( names ))[3] - __s2[3]);
0
401 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
402 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
403 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
404 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
405 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
406 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
407 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
408 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
409 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
410 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
411 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
412 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
413 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
414 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
415 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
416 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
417 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
418 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
419 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
420 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
421 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
422 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
423 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
424 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
425 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
426 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
427 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]);
0
428 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]);
0
429 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
430 names
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
431 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
432 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
433 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
434 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
435 return
never executed: return 0;
0;
never executed: return 0;
0
436 if ((
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
cipher_list = cp =
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
437 (__extension__ (__builtin_constant_p (
__builtin_constant_p ( names )Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
438 names
__builtin_constant_p ( names )Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
439 )
__builtin_constant_p ( names )Description
TRUEnever evaluated
FALSEnever evaluated
&& ((
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
size_t)(const void *)((
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
440 names
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
441 ) + 1) - (size_t)(const void *)(
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
442 names
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
443 ) == 1)
((size_t)(cons... names ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
? (((const
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
char *) (
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
444 names
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
445 ))[0] == '\0'
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
446 names
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
447 ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)
__retval != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
) __retval = (char *) memcpy (__retval,
never executed: __retval = (char *) memcpy (__retval, names , __len);
0
448 names
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __retval = (char *) memcpy (__retval, names , __len);
0
449 , __len); __retval; })) : __strdup (
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
450 names
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
451 )))
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
452 ) ==
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
453 ((void *)0)
(cipher_list =...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
454 )-
455 return
never executed: return 0;
0;
never executed: return 0;
0
456 for ((p = -
457 __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (-
458 ","-
459 ) && ((size_t)(const void *)((-
460 ","-
461 ) + 1) - (size_t)(const void *)(-
462 ","-
463 ) == 1) && (__r0 = ((const char *) (-
464 ","-
465 ))[0], ((const char *) (-
466 ","-
467 ))[0] != '\0') ? ((__r1 = ((const char *) (-
468 ","-
469 ))[1], ((const char *) (-
470 ","-
471 ))[1] == '\0') ? __strsep_1c (-
472 &cp-
473 , __r0) : ((__r2 = ((const char *) (-
474 ","-
475 ))[2], __r2 == '\0') ? __strsep_2c (-
476 &cp-
477 , __r0, __r1) : (((const char *) (-
478 ","-
479 ))[3] == '\0' ? __strsep_3c (-
480 &cp-
481 , __r0, __r1, __r2) : __strsep_g (-
482 &cp-
483 , -
484 ","-
485 )))) : __strsep_g (-
486 &cp-
487 , -
488 ","-
489 )); })-
490 ); p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& *
*p != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
p != '\0'
*p != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
;
0
491 (p = -
492 __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (-
493 ","-
494 ) && ((size_t)(const void *)((-
495 ","-
496 ) + 1) - (size_t)(const void *)(-
497 ","-
498 ) == 1) && (__r0 = ((const char *) (-
499 ","-
500 ))[0], ((const char *) (-
501 ","-
502 ))[0] != '\0') ? ((__r1 = ((const char *) (-
503 ","-
504 ))[1], ((const char *) (-
505 ","-
506 ))[1] == '\0') ? __strsep_1c (-
507 &cp-
508 , __r0) : ((__r2 = ((const char *) (-
509 ","-
510 ))[2], __r2 == '\0') ? __strsep_2c (-
511 &cp-
512 , __r0, __r1) : (((const char *) (-
513 ","-
514 ))[3] == '\0' ? __strsep_3c (-
515 &cp-
516 , __r0, __r1, __r2) : __strsep_g (-
517 &cp-
518 , -
519 ","-
520 )))) : __strsep_g (-
521 &cp-
522 , -
523 ","-
524 )); })-
525 )) {-
526 c = cipher_by_name(p);-
527 if (c ==
c == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
528 ((void *)0)
c == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
529 || (
(c->flags & (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
c->flags & (1<<3)) != 0
(c->flags & (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
530 free(cipher_list);-
531 return
never executed: return 0;
0;
never executed: return 0;
0
532 }-
533 }
never executed: end of block
0
534 free(cipher_list);-
535 return
never executed: return 1;
1;
never executed: return 1;
0
536}-
537-
538const char *-
539cipher_warning_message(const struct sshcipher_ctx *cc)-
540{-
541 if (cc ==
cc == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
0-704
542 ((void *)0)
cc == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
0-704
543 || cc->cipher ==
cc->cipher == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
0-704
544 ((void *)0)
cc->cipher == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
0-704
545 )-
546 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
547 ((void *)0)
never executed: return ((void *)0) ;
0
548 ;
never executed: return ((void *)0) ;
0
549-
550 return
executed 704 times by 1 test: return ((void *)0) ;
Executed by:
  • test_kex
executed 704 times by 1 test: return ((void *)0) ;
Executed by:
  • test_kex
704
551 ((void *)0)
executed 704 times by 1 test: return ((void *)0) ;
Executed by:
  • test_kex
704
552 ;
executed 704 times by 1 test: return ((void *)0) ;
Executed by:
  • test_kex
704
553}-
554-
555int-
556cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher,-
557 const u_char *key, u_int keylen, const u_char *iv, u_int ivlen,-
558 int do_encrypt)-
559{-
560 struct sshcipher_ctx *cc = -
561 ((void *)0)-
562 ;-
563 int ret = -1;-
564-
565 const EVP_CIPHER *type;-
566 int klen;-
567-
568-
569 *ccp = -
570 ((void *)0)-
571 ;-
572 if ((
(cc = calloc(s...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 18294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
cc = calloc(sizeof(*cc), 1)) ==
(cc = calloc(s...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 18294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-18294
573 ((void *)0)
(cc = calloc(s...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 18294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0-18294
574 )-
575 return
never executed: return -2;
-2;
never executed: return -2;
0
576-
577 cc->plaintext = (cipher->flags & (1<<3)) != 0;-
578 cc->encrypt = do_encrypt;-
579-
580 if (keylen < cipher->key_len
keylen < cipher->key_lenDescription
TRUEnever evaluated
FALSEevaluated 18294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
||
0-18294
581 (iv !=
iv != ((void *)0)Description
TRUEevaluated 18102 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 192 times by 1 test
Evaluated by:
  • test_kex
192-18102
582 ((void *)0)
iv != ((void *)0)Description
TRUEevaluated 18102 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 192 times by 1 test
Evaluated by:
  • test_kex
192-18102
583 && ivlen < cipher_ivlen(cipher)
ivlen < cipher_ivlen(cipher)Description
TRUEnever evaluated
FALSEevaluated 18102 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
)) {
0-18102
584 ret = -10;-
585 goto
never executed: goto out;
out;
never executed: goto out;
0
586 }-
587-
588 cc->cipher = cipher;-
589 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 17590 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 17590 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
) {
704-17590
590 ret = chachapoly_init(&cc->cp_ctx, key, keylen);-
591 goto
executed 704 times by 1 test: goto out;
Executed by:
  • test_kex
out;
executed 704 times by 1 test: goto out;
Executed by:
  • test_kex
704
592 }-
593 if ((
(cc->cipher->f...& (1<<3)) != 0Description
TRUEevaluated 17586 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
cc->cipher->flags & (1<<3)) != 0
(cc->cipher->f...& (1<<3)) != 0Description
TRUEevaluated 17586 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
4-17586
594 ret = 0;-
595 goto
executed 17586 times by 4 tests: goto out;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
out;
executed 17586 times by 4 tests: goto out;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
17586
596 }-
597 type = (*cipher->evptype)();-
598 if ((
(cc->evp = EVP...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
cc->evp = EVP_CIPHER_CTX_new()) ==
(cc->evp = EVP...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
599 ((void *)0)
(cc->evp = EVP...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
600 ) {-
601 ret = -2;-
602 goto
never executed: goto out;
out;
never executed: goto out;
0
603 }-
604 if (EVP_CipherInit(cc->evp, type,
EVP_CipherInit...pt == 1)) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
605 ((void *)0)
EVP_CipherInit...pt == 1)) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
606 , (u_char *)iv,
EVP_CipherInit...pt == 1)) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
607 (do_encrypt == 1)) == 0
EVP_CipherInit...pt == 1)) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
608 ret = -22;-
609 goto
never executed: goto out;
out;
never executed: goto out;
0
610 }-
611 if (cipher_authlen(cipher)
cipher_authlen(cipher)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
&&
0-4
612 !EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT... (u_char *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
613 0x12
!EVP_CIPHER_CT... (u_char *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
614 ,
!EVP_CIPHER_CT... (u_char *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
615 -1, (u_char *)iv)
!EVP_CIPHER_CT... (u_char *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
616 ret = -22;-
617 goto
never executed: goto out;
out;
never executed: goto out;
0
618 }-
619 klen = EVP_CIPHER_CTX_key_length(cc->evp);-
620 if (klen > 0
klen > 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
FALSEnever evaluated
&& keylen != (u_int)klen
keylen != (u_int)klenDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
621 if (EVP_CIPHER_CTX_set_key_length(cc->evp, keylen) == 0
EVP_CIPHER_CTX..., keylen) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
622 ret = -22;-
623 goto
never executed: goto out;
out;
never executed: goto out;
0
624 }-
625 }
never executed: end of block
0
626 if (EVP_CipherInit(cc->evp,
EVP_CipherInit...)0) , -1) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
627 ((void *)0)
EVP_CipherInit...)0) , -1) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
628 , (u_char *)key,
EVP_CipherInit...)0) , -1) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
629 ((void *)0)
EVP_CipherInit...)0) , -1) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
630 , -1) == 0
EVP_CipherInit...)0) , -1) == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
631 ret = -22;-
632 goto
never executed: goto out;
out;
never executed: goto out;
0
633 }-
634 ret = 0;-
635-
636 out:
code before this statement executed 4 times by 1 test: out:
Executed by:
  • test_sshkey
4
637 if (ret == 0
ret == 0Description
TRUEevaluated 18294 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEnever evaluated
) {
0-18294
638-
639 *ccp = cc;-
640 }
executed 18294 times by 4 tests: end of block
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
else {
18294
641 if (cc !=
cc != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
642 ((void *)0)
cc != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
643 ) {-
644-
645 EVP_CIPHER_CTX_free(cc->evp);-
646-
647 explicit_bzero(cc, sizeof(*cc));-
648 free(cc);-
649 }
never executed: end of block
0
650 }
never executed: end of block
0
651 return
executed 18294 times by 4 tests: return ret;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
ret;
executed 18294 times by 4 tests: return ret;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18294
652}-
653int-
654cipher_crypt(struct sshcipher_ctx *cc, u_int seqnr, u_char *dest,-
655 const u_char *src, u_int len, u_int aadlen, u_int authlen)-
656{-
657 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 1664 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 18022 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 1664 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 18022 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
) {
1664-18022
658 return
executed 1664 times by 1 test: return chachapoly_crypt(&cc->cp_ctx, seqnr, dest, src, len, aadlen, authlen, cc->encrypt);
Executed by:
  • test_kex
chachapoly_crypt(&cc->cp_ctx, seqnr, dest, src,
executed 1664 times by 1 test: return chachapoly_crypt(&cc->cp_ctx, seqnr, dest, src, len, aadlen, authlen, cc->encrypt);
Executed by:
  • test_kex
1664
659 len, aadlen, authlen, cc->encrypt);
executed 1664 times by 1 test: return chachapoly_crypt(&cc->cp_ctx, seqnr, dest, src, len, aadlen, authlen, cc->encrypt);
Executed by:
  • test_kex
1664
660 }-
661 if ((
(cc->cipher->f...& (1<<3)) != 0Description
TRUEevaluated 18018 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
cc->cipher->flags & (1<<3)) != 0
(cc->cipher->f...& (1<<3)) != 0Description
TRUEevaluated 18018 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
4-18018
662 memcpy(dest, src, aadlen + len);-
663 return
executed 18018 times by 4 tests: return 0;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
0;
executed 18018 times by 4 tests: return 0;
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18018
664 }-
665 if (authlen
authlenDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
666 u_char lastiv[1];-
667-
668 if (authlen != cipher_authlen(cc->cipher)
authlen != cip...en(cc->cipher)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
669 return
never executed: return -10;
-10;
never executed: return -10;
0
670-
671 if (!EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT...3 , 1, lastiv)Description
TRUEnever evaluated
FALSEnever evaluated
0
672 0x13
!EVP_CIPHER_CT...3 , 1, lastiv)Description
TRUEnever evaluated
FALSEnever evaluated
0
673 ,
!EVP_CIPHER_CT...3 , 1, lastiv)Description
TRUEnever evaluated
FALSEnever evaluated
0
674 1, lastiv)
!EVP_CIPHER_CT...3 , 1, lastiv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
675 return
never executed: return -22;
-22;
never executed: return -22;
0
676-
677 if (!cc->encrypt
!cc->encryptDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
678 !EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
679 0x11
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
680 ,
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
681 authlen, (u_char *)src + aadlen + len)
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
682 return
never executed: return -22;
-22;
never executed: return -22;
0
683 }
never executed: end of block
0
684 if (aadlen
aadlenDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
685 if (authlen
authlenDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
686 EVP_Cipher(cc->evp,
EVP_Cipher(cc-...c, aadlen) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
687 ((void *)0)
EVP_Cipher(cc-...c, aadlen) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
688 , (u_char *)src, aadlen) < 0
EVP_Cipher(cc-...c, aadlen) < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
689 return
never executed: return -22;
-22;
never executed: return -22;
0
690 memcpy(dest, src, aadlen);-
691 }
never executed: end of block
0
692 if (len % cc->cipher->block_size
len % cc->cipher->block_sizeDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
)
0-4
693 return
never executed: return -10;
-10;
never executed: return -10;
0
694 if (EVP_Cipher(cc->evp, dest + aadlen, (u_char *)src + aadlen,
EVP_Cipher(cc-...dlen, len) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
0-4
695 len) < 0
EVP_Cipher(cc-...dlen, len) < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
)
0-4
696 return
never executed: return -22;
-22;
never executed: return -22;
0
697 if (authlen
authlenDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • test_sshkey
) {
0-4
698-
699 if (EVP_Cipher(cc->evp,
EVP_Cipher(cc-... *)0) , 0) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
700 ((void *)0)
EVP_Cipher(cc-... *)0) , 0) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
701 ,
EVP_Cipher(cc-... *)0) , 0) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
702 ((void *)0)
EVP_Cipher(cc-... *)0) , 0) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
703 , 0) < 0
EVP_Cipher(cc-... *)0) , 0) < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
704 return
never executed: return cc->encrypt ? -22 : -30;
cc->encrypt
cc->encryptDescription
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return cc->encrypt ? -22 : -30;
0
705 -22 : -30;
never executed: return cc->encrypt ? -22 : -30;
0
706 if (cc->encrypt
cc->encryptDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
707 !EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
708 0x10
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
709 ,
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
0
710 authlen, dest + aadlen + len)
!EVP_CIPHER_CT... aadlen + len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
711 return
never executed: return -22;
-22;
never executed: return -22;
0
712 }
never executed: end of block
0
713 return
executed 4 times by 1 test: return 0;
Executed by:
  • test_sshkey
0;
executed 4 times by 1 test: return 0;
Executed by:
  • test_sshkey
4
714-
715}-
716-
717-
718int-
719cipher_get_length(struct sshcipher_ctx *cc, u_int *plenp, u_int seqnr,-
720 const u_char *cp, u_int len)-
721{-
722 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 2560 times by 1 test
Evaluated by:
  • test_kex
FALSEnever evaluated
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 2560 times by 1 test
Evaluated by:
  • test_kex
FALSEnever evaluated
)
0-2560
723 return
executed 2560 times by 1 test: return chachapoly_get_length(&cc->cp_ctx, plenp, seqnr, cp, len);
Executed by:
  • test_kex
chachapoly_get_length(&cc->cp_ctx, plenp, seqnr,
executed 2560 times by 1 test: return chachapoly_get_length(&cc->cp_ctx, plenp, seqnr, cp, len);
Executed by:
  • test_kex
2560
724 cp, len);
executed 2560 times by 1 test: return chachapoly_get_length(&cc->cp_ctx, plenp, seqnr, cp, len);
Executed by:
  • test_kex
2560
725 if (len < 4
len < 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
726 return
never executed: return -3;
-3;
never executed: return -3;
0
727 *plenp = (((u_int32_t)(((const u_char *)(cp))[0]) << 24) | ((u_int32_t)(((const u_char *)(cp))[1]) << 16) | ((u_int32_t)(((const u_char *)(cp))[2]) << 8) | (u_int32_t)(((const u_char *)(cp))[3]));-
728 return
never executed: return 0;
0;
never executed: return 0;
0
729}-
730-
731void-
732cipher_free(struct sshcipher_ctx *cc)-
733{-
734 if (cc ==
cc == ((void *)0)Description
TRUEevaluated 237559 times by 2 tests
Evaluated by:
  • ssh-keygen
  • test_sshkey
FALSEevaluated 18102 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18102-237559
735 ((void *)0)
cc == ((void *)0)Description
TRUEevaluated 237559 times by 2 tests
Evaluated by:
  • ssh-keygen
  • test_sshkey
FALSEevaluated 18102 times by 4 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18102-237559
736 )-
737 return;
executed 237559 times by 2 tests: return;
Executed by:
  • ssh-keygen
  • test_sshkey
237559
738 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 17398 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 704 times by 1 test
Evaluated by:
  • test_kex
FALSEevaluated 17398 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
)
704-17398
739 explicit_bzero(&cc->cp_ctx, sizeof(cc->cp_ctx));
executed 704 times by 1 test: explicit_bzero(&cc->cp_ctx, sizeof(cc->cp_ctx));
Executed by:
  • test_kex
704
740 else if ((
(cc->cipher->f...& (1<<2)) != 0Description
TRUEnever evaluated
FALSEevaluated 17398 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
cc->cipher->flags & (1<<2)) != 0
(cc->cipher->f...& (1<<2)) != 0Description
TRUEnever evaluated
FALSEevaluated 17398 times by 3 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_sshkey
)
0-17398
741 explicit_bzero(&cc->ac_ctx, sizeof(cc->ac_ctx));
never executed: explicit_bzero(&cc->ac_ctx, sizeof(cc->ac_ctx));
0
742-
743 EVP_CIPHER_CTX_free(cc->evp);-
744 cc->evp = -
745 ((void *)0)-
746 ;-
747-
748 explicit_bzero(cc, sizeof(*cc));-
749 free(cc);-
750}
executed 18102 times by 4 tests: end of block
Executed by:
  • ssh-keygen
  • sshd
  • test_kex
  • test_sshkey
18102
751-
752-
753-
754-
755-
756-
757int-
758cipher_get_keyiv_len(const struct sshcipher_ctx *cc)-
759{-
760 const struct sshcipher *c = cc->cipher;-
761-
762 if ((
(c->flags & (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
c->flags & (1<<1)) != 0
(c->flags & (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
763 return
never executed: return 0;
0;
never executed: return 0;
0
764 else if ((
(c->flags & (1<<2)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
c->flags & (1<<2)) != 0
(c->flags & (1<<2)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
765 return
never executed: return sizeof(cc->ac_ctx.ctr);
sizeof(cc->ac_ctx.ctr);
never executed: return sizeof(cc->ac_ctx.ctr);
0
766-
767 return
never executed: return EVP_CIPHER_CTX_iv_length(cc->evp);
EVP_CIPHER_CTX_iv_length(cc->evp);
never executed: return EVP_CIPHER_CTX_iv_length(cc->evp);
0
768-
769-
770-
771}-
772-
773int-
774cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len)-
775{-
776-
777 const struct sshcipher *c = cc->cipher;-
778 int evplen;-
779-
780-
781 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • test_kex
FALSEnever evaluated
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • test_kex
FALSEnever evaluated
) {
0-64
782 if (len != 0
len != 0Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • test_kex
)
0-64
783 return
never executed: return -10;
-10;
never executed: return -10;
0
784 return
executed 64 times by 1 test: return 0;
Executed by:
  • test_kex
0;
executed 64 times by 1 test: return 0;
Executed by:
  • test_kex
64
785 }-
786 if ((
(cc->cipher->f...& (1<<2)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
cc->cipher->flags & (1<<2)) != 0
(cc->cipher->f...& (1<<2)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
787 if (len != sizeof(cc->ac_ctx.ctr)
len != sizeof(cc->ac_ctx.ctr)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
788 return
never executed: return -10;
-10;
never executed: return -10;
0
789 memcpy(iv, cc->ac_ctx.ctr, len);-
790 return
never executed: return 0;
0;
never executed: return 0;
0
791 }-
792 if ((
(cc->cipher->f...& (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
cc->cipher->flags & (1<<3)) != 0
(cc->cipher->f...& (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
793 return
never executed: return 0;
0;
never executed: return 0;
0
794-
795-
796 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);-
797 if (evplen == 0
evplen == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
798 return
never executed: return 0;
0;
never executed: return 0;
0
799 else if (evplen < 0
evplen < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
800 return
never executed: return -22;
-22;
never executed: return -22;
0
801 if ((
(size_t)evplen != lenDescription
TRUEnever evaluated
FALSEnever evaluated
size_t)evplen != len
(size_t)evplen != lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
802 return
never executed: return -10;
-10;
never executed: return -10;
0
803-
804-
805-
806-
807-
808 if (cipher_authlen(c)
cipher_authlen(c)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
809 if (!EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT...x13 , len, iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
810 0x13
!EVP_CIPHER_CT...x13 , len, iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
811 ,
!EVP_CIPHER_CT...x13 , len, iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
812 len, iv)
!EVP_CIPHER_CT...x13 , len, iv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
813 return
never executed: return -22;
-22;
never executed: return -22;
0
814 }
never executed: end of block
else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len)
!EVP_CIPHER_CT...>evp, iv, len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
815 return
never executed: return -22;
-22;
never executed: return -22;
0
816-
817 return
never executed: return 0;
0;
never executed: return 0;
0
818}-
819-
820int-
821cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv, size_t len)-
822{-
823-
824 const struct sshcipher *c = cc->cipher;-
825 int evplen = 0;-
826-
827-
828 if ((
(cc->cipher->f...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
cc->cipher->flags & (1<<1)) != 0
(cc->cipher->f...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
829 return
never executed: return 0;
0;
never executed: return 0;
0
830 if ((
(cc->cipher->f...& (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
cc->cipher->flags & (1<<3)) != 0
(cc->cipher->f...& (1<<3)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
831 return
never executed: return 0;
0;
never executed: return 0;
0
832-
833-
834 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);-
835 if (evplen <= 0
evplen <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
836 return
never executed: return -22;
-22;
never executed: return -22;
0
837 if ((
(size_t)evplen != lenDescription
TRUEnever evaluated
FALSEnever evaluated
size_t)evplen != len
(size_t)evplen != lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
838 return
never executed: return -10;
-10;
never executed: return -10;
0
839-
840-
841-
842-
843-
844-
845 if (cipher_authlen(c)
cipher_authlen(c)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
846-
847 if (!EVP_CIPHER_CTX_ctrl(cc->evp,
!EVP_CIPHER_CT...1, (void *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
848
!EVP_CIPHER_CT...1, (void *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
849 0x12
!EVP_CIPHER_CT...1, (void *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
0
850 , -1, (void *)iv)
!EVP_CIPHER_CT...1, (void *)iv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
851 return
never executed: return -22;
-22;
never executed: return -22;
0
852 }
never executed: end of block
else if (!EVP_CIPHER_CTX_set_iv(cc->evp, iv, evplen)
!EVP_CIPHER_CT...p, iv, evplen)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
853 return
never executed: return -22;
-22;
never executed: return -22;
0
854-
855 return
never executed: return 0;
0;
never executed: return 0;
0
856}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2