Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | int sshkey_private_serialize_opt(const struct sshkey *key, | - |
19 | struct sshbuf *buf, enum sshkey_serialize_rep); | - |
20 | static int sshkey_from_blob_internal(struct sshbuf *buf, | - |
21 | struct sshkey **keyp, int allow_cert); | - |
22 | static int get_sigtype(const u_char *sig, size_t siglen, char **sigtypep); | - |
23 | | - |
24 | | - |
25 | struct keytype { | - |
26 | const char *name; | - |
27 | const char *shortname; | - |
28 | const char *sigalg; | - |
29 | int type; | - |
30 | int nid; | - |
31 | int cert; | - |
32 | int sigonly; | - |
33 | }; | - |
34 | static const struct keytype keytypes[] = { | - |
35 | { "ssh-ed25519", "ED25519", | - |
36 | ((void *)0) | - |
37 | , KEY_ED25519, 0, 0, 0 }, | - |
38 | { "ssh-ed25519-cert-v01@openssh.com", "ED25519-CERT", | - |
39 | ((void *)0) | - |
40 | , | - |
41 | KEY_ED25519_CERT, 0, 1, 0 }, | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | { "ssh-rsa", "RSA", | - |
49 | ((void *)0) | - |
50 | , KEY_RSA, 0, 0, 0 }, | - |
51 | { "rsa-sha2-256", "RSA", | - |
52 | ((void *)0) | - |
53 | , KEY_RSA, 0, 0, 1 }, | - |
54 | { "rsa-sha2-512", "RSA", | - |
55 | ((void *)0) | - |
56 | , KEY_RSA, 0, 0, 1 }, | - |
57 | { "ssh-dss", "DSA", | - |
58 | ((void *)0) | - |
59 | , KEY_DSA, 0, 0, 0 }, | - |
60 | | - |
61 | { "ecdsa-sha2-nistp256", "ECDSA", | - |
62 | ((void *)0) | - |
63 | , | - |
64 | KEY_ECDSA, | - |
65 | 415 | - |
66 | , 0, 0 }, | - |
67 | { "ecdsa-sha2-nistp384", "ECDSA", | - |
68 | ((void *)0) | - |
69 | , | - |
70 | KEY_ECDSA, | - |
71 | 715 | - |
72 | , 0, 0 }, | - |
73 | | - |
74 | { "ecdsa-sha2-nistp521", "ECDSA", | - |
75 | ((void *)0) | - |
76 | , | - |
77 | KEY_ECDSA, | - |
78 | 716 | - |
79 | , 0, 0 }, | - |
80 | | - |
81 | | - |
82 | { "ssh-rsa-cert-v01@openssh.com", "RSA-CERT", | - |
83 | ((void *)0) | - |
84 | , | - |
85 | KEY_RSA_CERT, 0, 1, 0 }, | - |
86 | { "rsa-sha2-256-cert-v01@openssh.com", "RSA-CERT", | - |
87 | "ssh-rsa-sha2-256", KEY_RSA_CERT, 0, 1, 1 }, | - |
88 | { "rsa-sha2-512-cert-v01@openssh.com", "RSA-CERT", | - |
89 | "ssh-rsa-sha2-512", KEY_RSA_CERT, 0, 1, 1 }, | - |
90 | { "ssh-dss-cert-v01@openssh.com", "DSA-CERT", | - |
91 | ((void *)0) | - |
92 | , | - |
93 | KEY_DSA_CERT, 0, 1, 0 }, | - |
94 | { "ssh-rsa-cert-v01@openssh.com", "RSA-CERT", | - |
95 | ((void *)0) | - |
96 | , | - |
97 | KEY_RSA_CERT, 0, 1, 0 }, | - |
98 | { "rsa-sha2-256-cert-v01@openssh.com", "RSA-CERT", | - |
99 | "ssh-rsa-sha2-256", KEY_RSA_CERT, 0, 1, 1 }, | - |
100 | { "rsa-sha2-512-cert-v01@openssh.com", "RSA-CERT", | - |
101 | "ssh-rsa-sha2-512", KEY_RSA_CERT, 0, 1, 1 }, | - |
102 | { "ssh-dss-cert-v01@openssh.com", "DSA-CERT", | - |
103 | ((void *)0) | - |
104 | , | - |
105 | KEY_DSA_CERT, 0, 1, 0 }, | - |
106 | | - |
107 | { "ecdsa-sha2-nistp256-cert-v01@openssh.com", "ECDSA-CERT", | - |
108 | ((void *)0) | - |
109 | , | - |
110 | KEY_ECDSA_CERT, | - |
111 | 415 | - |
112 | , 1, 0 }, | - |
113 | { "ecdsa-sha2-nistp384-cert-v01@openssh.com", "ECDSA-CERT", | - |
114 | ((void *)0) | - |
115 | , | - |
116 | KEY_ECDSA_CERT, | - |
117 | 715 | - |
118 | , 1, 0 }, | - |
119 | | - |
120 | { "ecdsa-sha2-nistp521-cert-v01@openssh.com", "ECDSA-CERT", | - |
121 | ((void *)0) | - |
122 | , | - |
123 | KEY_ECDSA_CERT, | - |
124 | 716 | - |
125 | , 1, 0 }, | - |
126 | | - |
127 | | - |
128 | | - |
129 | { | - |
130 | ((void *)0) | - |
131 | , | - |
132 | ((void *)0) | - |
133 | , | - |
134 | ((void *)0) | - |
135 | , -1, -1, 0, 0 } | - |
136 | }; | - |
137 | | - |
138 | const char * | - |
139 | sshkey_type(const struct sshkey *k) | - |
140 | { | - |
141 | const struct keytype *kt; | - |
142 | | - |
143 | for (kt = keytypes; kt->type != -1TRUE | evaluated 3340 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | never evaluated |
; kt++) { | 0-3340 |
144 | if (kt->type == k->typeTRUE | evaluated 803 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | evaluated 2537 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 803-2537 |
145 | returnexecuted 803 times by 3 tests: return kt->shortname; Executed by:- ssh-keygen
- test_kex
- test_sshkey
kt->shortname;executed 803 times by 3 tests: return kt->shortname; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 803 |
146 | }executed 2537 times by 3 tests: end of block Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 2537 |
147 | return never executed: return "unknown"; "unknown";never executed: return "unknown"; | 0 |
148 | } | - |
149 | | - |
150 | static const char * | - |
151 | sshkey_ssh_name_from_type_nid(int type, int nid) | - |
152 | { | - |
153 | const struct keytype *kt; | - |
154 | | - |
155 | for (kt = keytypes; kt->type != -1TRUE | evaluated 77243 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
; kt++) { | 0-77243 |
156 | if (kt->type == typeTRUE | evaluated 11195 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | evaluated 66048 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
&& (kt->nid == 0TRUE | evaluated 229 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | evaluated 10966 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| kt->nid == nidTRUE | evaluated 10920 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | evaluated 46 times by 1 test |
)) | 46-66048 |
157 | returnexecuted 11149 times by 4 tests: return kt->name; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
kt->name;executed 11149 times by 4 tests: return kt->name; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 11149 |
158 | }executed 66094 times by 4 tests: end of block Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 66094 |
159 | return never executed: return "ssh-unknown"; "ssh-unknown";never executed: return "ssh-unknown"; | 0 |
160 | } | - |
161 | | - |
162 | int | - |
163 | sshkey_type_is_cert(int type) | - |
164 | { | - |
165 | const struct keytype *kt; | - |
166 | | - |
167 | for (kt = keytypes; kt->type != -1TRUE | evaluated 5211875 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 180136 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
; kt++) { | 180136-5211875 |
168 | if (kt->type == typeTRUE | evaluated 332251 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 4879624 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) | 332251-4879624 |
169 | returnexecuted 332251 times by 5 tests: return kt->cert; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
kt->cert;executed 332251 times by 5 tests: return kt->cert; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 332251 |
170 | }executed 4879624 times by 5 tests: end of block Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 4879624 |
171 | returnexecuted 180136 times by 5 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
0;executed 180136 times by 5 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 180136 |
172 | } | - |
173 | | - |
174 | const char * | - |
175 | sshkey_ssh_name(const struct sshkey *k) | - |
176 | { | - |
177 | returnexecuted 59 times by 4 tests: return sshkey_ssh_name_from_type_nid(k->type, k->ecdsa_nid); Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
sshkey_ssh_name_from_type_nid(k->type, k->ecdsa_nid);executed 59 times by 4 tests: return sshkey_ssh_name_from_type_nid(k->type, k->ecdsa_nid); Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 59 |
178 | } | - |
179 | | - |
180 | const char * | - |
181 | sshkey_ssh_name_plain(const struct sshkey *k) | - |
182 | { | - |
183 | returnexecuted 10859 times by 2 tests: return sshkey_ssh_name_from_type_nid(sshkey_type_plain(k->type), k->ecdsa_nid); sshkey_ssh_name_from_type_nid(sshkey_type_plain(k->type),executed 10859 times by 2 tests: return sshkey_ssh_name_from_type_nid(sshkey_type_plain(k->type), k->ecdsa_nid); | 10859 |
184 | k->ecdsa_nid);executed 10859 times by 2 tests: return sshkey_ssh_name_from_type_nid(sshkey_type_plain(k->type), k->ecdsa_nid); | 10859 |
185 | } | - |
186 | | - |
187 | int | - |
188 | sshkey_type_from_name(const char *name) | - |
189 | { | - |
190 | const struct keytype *kt; | - |
191 | | - |
192 | for (kt = keytypes; kt->type != -1TRUE | evaluated 351705 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 3141 times by 2 tests |
; kt++) { | 3141-351705 |
193 | | - |
194 | if ((kt->name != TRUE | evaluated 351705 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-351705 |
195 | ((void *)0)TRUE | evaluated 351705 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-351705 |
196 | && | - |
197 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
198 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
199 | ) && __builtin_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
200 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
201 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
202 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
203 | ), __s2_len = __builtin_strlen (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
204 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
205 | ), (!((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
206 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
207 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
208 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
209 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
210 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
211 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
212 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
213 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
214 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
215 | , TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
216 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
217 | ) : (__builtin_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
218 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
219 | ) && ((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
220 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
221 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
222 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
223 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
224 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
225 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
226 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
227 | ) && ((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
228 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
229 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
230 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
231 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
232 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
233 | , TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
234 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
235 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
236 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
237 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
238 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
239 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
240 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
241 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
242 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
243 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
244 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-297778 |
245 | ))[3] - __s2[3]);TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- 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_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
246 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
247 | ) && ((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
248 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
249 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
250 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
251 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
252 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
253 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
254 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
255 | ) && ((size_t)(const void *)((TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
256 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
257 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
258 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
259 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
260 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
261 | , TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
262 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
263 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
264 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
265 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
266 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
267 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
268 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
269 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
270 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
271 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
272 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); | 0-297778 |
273 | ))[3] - __s2[3]);TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-297778 |
274 | nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
275 | , TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
276 | kt->nameTRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
277 | )))); }) TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 53927-297778 |
278 | == 0TRUE | evaluated 53927 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 297778 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) || | 53927-297778 |
279 | (!kt->certTRUE | evaluated 183174 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 114604 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
&& strcasecmp(kt->shortname, name) == 0TRUE | evaluated 7 times by 1 test | FALSE | evaluated 183167 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
)) | 7-183174 |
280 | returnexecuted 53934 times by 5 tests: return kt->type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
kt->type;executed 53934 times by 5 tests: return kt->type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 53934 |
281 | }executed 297771 times by 5 tests: end of block Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 297771 |
282 | returnexecuted 3141 times by 2 tests: return KEY_UNSPEC; KEY_UNSPEC;executed 3141 times by 2 tests: return KEY_UNSPEC; | 3141 |
283 | } | - |
284 | | - |
285 | int | - |
286 | sshkey_ecdsa_nid_from_name(const char *name) | - |
287 | { | - |
288 | const struct keytype *kt; | - |
289 | | - |
290 | for (kt = keytypes; kt->type != -1TRUE | evaluated 99711 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 241 times by 2 tests |
; kt++) { | 241-99711 |
291 | if (kt->type != KEY_ECDSATRUE | evaluated 83684 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 16027 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
&& kt->type != KEY_ECDSA_CERTTRUE | evaluated 79010 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 4674 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 4674-83684 |
292 | continue;executed 79010 times by 4 tests: continue; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 79010 |
293 | if (kt->name != TRUE | evaluated 20701 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-20701 |
294 | ((void *)0)TRUE | evaluated 20701 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-20701 |
295 | && | - |
296 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
297 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
298 | ) && __builtin_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
299 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
300 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
301 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
302 | ), __s2_len = __builtin_strlen (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
303 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
304 | ), (!((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
305 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
306 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
307 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
308 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
309 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
310 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
311 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
312 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
313 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
314 | , TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
315 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
316 | ) : (__builtin_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
317 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
318 | ) && ((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
319 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
320 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
321 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
322 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
323 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
324 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
325 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
326 | ) && ((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
327 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
328 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
329 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
330 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
331 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
332 | , TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
333 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
334 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
335 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
336 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
337 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
338 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
339 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
340 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
341 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
342 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
343 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-13363 |
344 | ))[3] - __s2[3]);TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- 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_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
345 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
346 | ) && ((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
347 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
348 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
349 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
350 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
351 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
352 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
353 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
354 | ) && ((size_t)(const void *)((TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
355 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
356 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
357 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
358 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
359 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
360 | , TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
361 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
362 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
363 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
364 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
365 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
366 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
367 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
368 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
369 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
370 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
371 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); | 0-13363 |
372 | ))[3] - __s2[3]);TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13363 |
373 | nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
374 | , TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
375 | kt->nameTRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
376 | )))); }) TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 7338-13363 |
377 | == 0TRUE | evaluated 7338 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 13363 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) | 7338-13363 |
378 | returnexecuted 7338 times by 4 tests: return kt->nid; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
kt->nid;executed 7338 times by 4 tests: return kt->nid; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 7338 |
379 | }executed 13363 times by 4 tests: end of block Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 13363 |
380 | returnexecuted 241 times by 2 tests: return -1; -1;executed 241 times by 2 tests: return -1; | 241 |
381 | } | - |
382 | | - |
383 | char * | - |
384 | sshkey_alg_list(int certs_only, int plain_only, int include_sigonly, char sep) | - |
385 | { | - |
386 | char *tmp, *ret = | - |
387 | ((void *)0) | - |
388 | ; | - |
389 | size_t nlen, rlen = 0; | - |
390 | const struct keytype *kt; | - |
391 | | - |
392 | for (kt = keytypes; kt->type != -1TRUE | evaluated 80 times by 1 test | FALSE | evaluated 4 times by 1 test |
; kt++) { | 4-80 |
393 | if (kt->name == TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
| 0-80 |
394 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
| 0-80 |
395 | ) | - |
396 | continue; never executed: continue; | 0 |
397 | if (!include_sigonlyTRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
&& kt->sigonlyTRUE | never evaluated | FALSE | never evaluated |
) | 0-80 |
398 | continue; never executed: continue; | 0 |
399 | if ((certs_onlyTRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
&& !kt->certTRUE | never evaluated | FALSE | never evaluated |
) || (plain_onlyTRUE | evaluated 40 times by 1 test | FALSE | evaluated 40 times by 1 test |
&& kt->certTRUE | evaluated 24 times by 1 test | FALSE | evaluated 16 times by 1 test |
)) | 0-80 |
400 | continue;executed 24 times by 1 test: continue; | 24 |
401 | if (ret != TRUE | evaluated 52 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-52 |
402 | ((void *)0)TRUE | evaluated 52 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-52 |
403 | ) | - |
404 | ret[rlen++] = sep;executed 52 times by 1 test: ret[rlen++] = sep; | 52 |
405 | nlen = strlen(kt->name); | - |
406 | if ((TRUE | never evaluated | FALSE | evaluated 56 times by 1 test |
tmp = realloc(ret, rlen + nlen + 2)) == TRUE | never evaluated | FALSE | evaluated 56 times by 1 test |
| 0-56 |
407 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 56 times by 1 test |
| 0-56 |
408 | ) { | - |
409 | free(ret); | - |
410 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
411 | ((void *)0) never executed: return ((void *)0) ; | 0 |
412 | ; never executed: return ((void *)0) ; | 0 |
413 | } | - |
414 | ret = tmp; | - |
415 | memcpy(ret + rlen, kt->name, nlen + 1); | - |
416 | rlen += nlen; | - |
417 | }executed 56 times by 1 test: end of block | 56 |
418 | returnexecuted 4 times by 1 test: return ret; ret;executed 4 times by 1 test: return ret; | 4 |
419 | } | - |
420 | | - |
421 | int | - |
422 | sshkey_names_valid2(const char *names, int allow_wildcard) | - |
423 | { | - |
424 | char *s, *cp, *p; | - |
425 | const struct keytype *kt; | - |
426 | int type; | - |
427 | | - |
428 | if (names == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
429 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
430 | || | - |
431 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
432 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
433 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
434 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
435 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
436 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
437 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
438 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
439 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
440 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
441 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
442 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
443 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
444 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
445 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
446 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
447 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
448 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
449 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
450 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
451 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
452 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
453 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
454 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
455 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
456 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
457 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
458 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
459 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
460 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
461 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
462 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
463 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
464 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
465 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
466 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
467 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
468 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
469 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
470 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
471 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
472 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
473 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
474 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
475 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
476 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
477 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( names ))[3] - __s2[3]); | 0 |
478 | namesTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( names ))[3] - __s2[3]); | 0 |
479 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
480 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
481 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
482 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
483 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
484 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
485 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
486 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
487 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
488 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
489 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
490 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
491 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
492 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
493 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
494 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
495 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
496 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
497 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
498 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
499 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
500 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
501 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
502 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
503 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
504 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
505 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]); | 0 |
506 | ""TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]); | 0 |
507 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
508 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
509 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
510 | ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
511 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
512 | == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
513 | return never executed: return 0; 0;never executed: return 0; | 0 |
514 | if ((TRUE | never evaluated | FALSE | never evaluated |
s = cp = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
515 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
516 | namesTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
517 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
518 | namesTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
519 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
520 | namesTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
521 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((constTRUE | never evaluated | FALSE | never evaluated |
char *) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
522 | namesTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
523 | ))[0] == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
524 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
525 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
) __retval = (char *) memcpy (__retval, never executed: __retval = (char *) memcpy (__retval, names , __len); | 0 |
526 | namesTRUE | never evaluated | FALSE | never evaluated |
never executed: __retval = (char *) memcpy (__retval, names , __len); | 0 |
527 | , __len); __retval; })) : __strdup (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
528 | namesTRUE | never evaluated | FALSE | never evaluated |
| 0 |
529 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
530 | ) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
531 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
532 | ) | - |
533 | return never executed: return 0; 0;never executed: return 0; | 0 |
534 | for ((p = | - |
535 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
536 | "," | - |
537 | ) && ((size_t)(const void *)(( | - |
538 | "," | - |
539 | ) + 1) - (size_t)(const void *)( | - |
540 | "," | - |
541 | ) == 1) && (__r0 = ((const char *) ( | - |
542 | "," | - |
543 | ))[0], ((const char *) ( | - |
544 | "," | - |
545 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
546 | "," | - |
547 | ))[1], ((const char *) ( | - |
548 | "," | - |
549 | ))[1] == '\0') ? __strsep_1c ( | - |
550 | &cp | - |
551 | , __r0) : ((__r2 = ((const char *) ( | - |
552 | "," | - |
553 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
554 | &cp | - |
555 | , __r0, __r1) : (((const char *) ( | - |
556 | "," | - |
557 | ))[3] == '\0' ? __strsep_3c ( | - |
558 | &cp | - |
559 | , __r0, __r1, __r2) : __strsep_g ( | - |
560 | &cp | - |
561 | , | - |
562 | "," | - |
563 | )))) : __strsep_g ( | - |
564 | &cp | - |
565 | , | - |
566 | "," | - |
567 | )); }) | - |
568 | ); pTRUE | never evaluated | FALSE | never evaluated |
&& *TRUE | never evaluated | FALSE | never evaluated |
p != '\0'TRUE | never evaluated | FALSE | never evaluated |
; | 0 |
569 | (p = | - |
570 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
571 | "," | - |
572 | ) && ((size_t)(const void *)(( | - |
573 | "," | - |
574 | ) + 1) - (size_t)(const void *)( | - |
575 | "," | - |
576 | ) == 1) && (__r0 = ((const char *) ( | - |
577 | "," | - |
578 | ))[0], ((const char *) ( | - |
579 | "," | - |
580 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
581 | "," | - |
582 | ))[1], ((const char *) ( | - |
583 | "," | - |
584 | ))[1] == '\0') ? __strsep_1c ( | - |
585 | &cp | - |
586 | , __r0) : ((__r2 = ((const char *) ( | - |
587 | "," | - |
588 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
589 | &cp | - |
590 | , __r0, __r1) : (((const char *) ( | - |
591 | "," | - |
592 | ))[3] == '\0' ? __strsep_3c ( | - |
593 | &cp | - |
594 | , __r0, __r1, __r2) : __strsep_g ( | - |
595 | &cp | - |
596 | , | - |
597 | "," | - |
598 | )))) : __strsep_g ( | - |
599 | &cp | - |
600 | , | - |
601 | "," | - |
602 | )); }) | - |
603 | )) { | - |
604 | type = sshkey_type_from_name(p); | - |
605 | if (type == KEY_UNSPECTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
606 | if (allow_wildcardTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
607 | | - |
608 | | - |
609 | | - |
610 | | - |
611 | | - |
612 | for (kt = keytypes; kt->type != -1TRUE | never evaluated | FALSE | never evaluated |
; kt++) { | 0 |
613 | if (match_pattern_list(kt->name,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
614 | p, 0) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
615 | break; never executed: break; | 0 |
616 | } never executed: end of block | 0 |
617 | if (kt->type != -1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
618 | continue; never executed: continue; | 0 |
619 | } never executed: end of block | 0 |
620 | free(s); | - |
621 | return never executed: return 0; 0;never executed: return 0; | 0 |
622 | } | - |
623 | } never executed: end of block | 0 |
624 | free(s); | - |
625 | return never executed: return 1; 1;never executed: return 1; | 0 |
626 | } | - |
627 | | - |
628 | u_int | - |
629 | sshkey_size(const struct sshkey *k) | - |
630 | { | - |
631 | | - |
632 | const BIGNUM *rsa_n, *dsa_p; | - |
633 | | - |
634 | | - |
635 | switch (k->type) { | - |
636 | | - |
637 | caseexecuted 29 times by 2 tests: case KEY_RSA: KEY_RSA:executed 29 times by 2 tests: case KEY_RSA: | 29 |
638 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
639 | if (k->rsa == TRUE | never evaluated | FALSE | evaluated 29 times by 2 tests |
| 0-29 |
640 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 29 times by 2 tests |
| 0-29 |
641 | ) | - |
642 | return never executed: return 0; 0;never executed: return 0; | 0 |
643 | RSA_get0_key(k->rsa, &rsa_n, | - |
644 | ((void *)0) | - |
645 | , | - |
646 | ((void *)0) | - |
647 | ); | - |
648 | returnexecuted 29 times by 2 tests: return BN_num_bits(rsa_n); BN_num_bits(rsa_n);executed 29 times by 2 tests: return BN_num_bits(rsa_n); | 29 |
649 | caseexecuted 25 times by 2 tests: case KEY_DSA: KEY_DSA:executed 25 times by 2 tests: case KEY_DSA: | 25 |
650 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
651 | if (k->dsa == TRUE | never evaluated | FALSE | evaluated 25 times by 2 tests |
| 0-25 |
652 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 25 times by 2 tests |
| 0-25 |
653 | ) | - |
654 | return never executed: return 0; 0;never executed: return 0; | 0 |
655 | DSA_get0_pqg(k->dsa, &dsa_p, | - |
656 | ((void *)0) | - |
657 | , | - |
658 | ((void *)0) | - |
659 | ); | - |
660 | returnexecuted 25 times by 2 tests: return BN_num_bits(dsa_p); BN_num_bits(dsa_p);executed 25 times by 2 tests: return BN_num_bits(dsa_p); | 25 |
661 | caseexecuted 25 times by 2 tests: case KEY_ECDSA: KEY_ECDSA:executed 25 times by 2 tests: case KEY_ECDSA: | 25 |
662 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
663 | returnexecuted 25 times by 2 tests: return sshkey_curve_nid_to_bits(k->ecdsa_nid); sshkey_curve_nid_to_bits(k->ecdsa_nid);executed 25 times by 2 tests: return sshkey_curve_nid_to_bits(k->ecdsa_nid); | 25 |
664 | | - |
665 | caseexecuted 26 times by 2 tests: case KEY_ED25519: KEY_ED25519:executed 26 times by 2 tests: case KEY_ED25519: | 26 |
666 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
667 | case never executed: case KEY_XMSS: KEY_XMSS:never executed: case KEY_XMSS: | 0 |
668 | case never executed: case KEY_XMSS_CERT: KEY_XMSS_CERT:never executed: case KEY_XMSS_CERT: | 0 |
669 | returnexecuted 26 times by 2 tests: return 256; 256;executed 26 times by 2 tests: return 256; | 26 |
670 | } | - |
671 | return never executed: return 0; 0;never executed: return 0; | 0 |
672 | } | - |
673 | | - |
674 | static int | - |
675 | sshkey_type_is_valid_ca(int type) | - |
676 | { | - |
677 | switch (type) { | - |
678 | caseexecuted 2 times by 1 test: case KEY_RSA: KEY_RSA:executed 2 times by 1 test: case KEY_RSA: | 2 |
679 | case never executed: case KEY_DSA: KEY_DSA:never executed: case KEY_DSA: | 0 |
680 | caseexecuted 1554 times by 1 test: case KEY_ECDSA: KEY_ECDSA:executed 1554 times by 1 test: case KEY_ECDSA: | 1554 |
681 | caseexecuted 10207 times by 1 test: case KEY_ED25519: KEY_ED25519:executed 10207 times by 1 test: case KEY_ED25519: | 10207 |
682 | case never executed: case KEY_XMSS: KEY_XMSS:never executed: case KEY_XMSS: | 0 |
683 | returnexecuted 11763 times by 1 test: return 1; 1;executed 11763 times by 1 test: return 1; | 11763 |
684 | default never executed: default: :never executed: default: | 0 |
685 | return never executed: return 0; 0;never executed: return 0; | 0 |
686 | } | - |
687 | } | - |
688 | | - |
689 | int | - |
690 | sshkey_is_cert(const struct sshkey *k) | - |
691 | { | - |
692 | if (k == TRUE | never evaluated | FALSE | evaluated 499303 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-499303 |
693 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 499303 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-499303 |
694 | ) | - |
695 | return never executed: return 0; 0;never executed: return 0; | 0 |
696 | returnexecuted 499303 times by 5 tests: return sshkey_type_is_cert(k->type); Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
sshkey_type_is_cert(k->type);executed 499303 times by 5 tests: return sshkey_type_is_cert(k->type); Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 499303 |
697 | } | - |
698 | | - |
699 | | - |
700 | int | - |
701 | sshkey_type_plain(int type) | - |
702 | { | - |
703 | switch (type) { | - |
704 | caseexecuted 14 times by 1 test: case KEY_RSA_CERT: KEY_RSA_CERT:executed 14 times by 1 test: case KEY_RSA_CERT: | 14 |
705 | returnexecuted 14 times by 1 test: return KEY_RSA; KEY_RSA;executed 14 times by 1 test: return KEY_RSA; | 14 |
706 | caseexecuted 6 times by 1 test: case KEY_DSA_CERT: KEY_DSA_CERT:executed 6 times by 1 test: case KEY_DSA_CERT: | 6 |
707 | returnexecuted 6 times by 1 test: return KEY_DSA; KEY_DSA;executed 6 times by 1 test: return KEY_DSA; | 6 |
708 | caseexecuted 6 times by 1 test: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:executed 6 times by 1 test: case KEY_ECDSA_CERT: | 6 |
709 | returnexecuted 6 times by 1 test: return KEY_ECDSA; KEY_ECDSA;executed 6 times by 1 test: return KEY_ECDSA; | 6 |
710 | caseexecuted 6 times by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 6 times by 1 test: case KEY_ED25519_CERT: | 6 |
711 | returnexecuted 6 times by 1 test: return KEY_ED25519; KEY_ED25519;executed 6 times by 1 test: return KEY_ED25519; | 6 |
712 | case never executed: case KEY_XMSS_CERT: KEY_XMSS_CERT:never executed: case KEY_XMSS_CERT: | 0 |
713 | return never executed: return KEY_XMSS; KEY_XMSS;never executed: return KEY_XMSS; | 0 |
714 | defaultexecuted 116347 times by 5 tests: default: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
:executed 116347 times by 5 tests: default: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 116347 |
715 | returnexecuted 116347 times by 5 tests: return type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
type;executed 116347 times by 5 tests: return type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 116347 |
716 | } | - |
717 | } | - |
718 | | - |
719 | | - |
720 | | - |
721 | int | - |
722 | sshkey_curve_name_to_nid(const char *name) | - |
723 | { | - |
724 | if ( | - |
725 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
726 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
727 | ) && __builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
728 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
729 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
730 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
731 | ), __s2_len = __builtin_strlen (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
732 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
733 | ), (!((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
734 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
735 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
736 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
737 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
738 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
739 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
740 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
741 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
742 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
743 | , TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
744 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
745 | ) : (__builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
746 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
747 | ) && ((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
748 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
749 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
750 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
751 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
752 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
753 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
754 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
755 | ) && ((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
756 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
757 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
758 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
759 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
760 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
761 | , TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
762 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
763 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
764 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
765 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
766 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
767 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
768 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
769 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
770 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
771 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
772 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-6860 |
773 | ))[3] - __s2[3]);TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
774 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
775 | ) && ((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
776 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
777 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
778 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
779 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
780 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
781 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
782 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
783 | ) && ((size_t)(const void *)((TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
784 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
785 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
786 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
787 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
788 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
789 | , TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
790 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
791 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
792 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
793 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
794 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
795 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
796 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
797 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
798 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
799 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "nistp256" ))[3] - __s2[3]); TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
800 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp256" ))[3] - __s2[3]); | 0-6860 |
801 | ))[3] - __s2[3]);TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp256" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 0-6860 |
802 | nameTRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
803 | , TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
804 | "nistp256"TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
805 | )))); }) TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
| 261-6860 |
806 | == 0TRUE | evaluated 6860 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 261 times by 2 tests |
) | 261-6860 |
807 | returnexecuted 6860 times by 4 tests: return 415 ; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
executed 6860 times by 4 tests: return 415 ; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 6860 |
808 | 415executed 6860 times by 4 tests: return 415 ; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 6860 |
809 | ;executed 6860 times by 4 tests: return 415 ; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 6860 |
810 | else if ( | - |
811 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
812 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
813 | ) && __builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
814 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
815 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
816 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
817 | ), __s2_len = __builtin_strlen (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
818 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
819 | ), (!((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
820 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
821 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
822 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
823 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
824 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
825 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
826 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
827 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
828 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
829 | , TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
830 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
831 | ) : (__builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
832 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
833 | ) && ((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
834 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
835 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
836 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
837 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
838 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
839 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
840 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
841 | ) && ((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
842 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
843 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
844 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
845 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
846 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
847 | , TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
848 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
849 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
850 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
851 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
852 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
853 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
854 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
855 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
856 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
857 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
858 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-241 |
859 | ))[3] - __s2[3]);TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
860 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
861 | ) && ((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
862 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
863 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
864 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
865 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
866 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
867 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
868 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
869 | ) && ((size_t)(const void *)((TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
870 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
871 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
872 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
873 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
874 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
875 | , TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
876 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
877 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
878 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
879 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
880 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
881 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
882 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
883 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
884 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
885 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "nistp384" ))[3] - __s2[3]); TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
886 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp384" ))[3] - __s2[3]); | 0-241 |
887 | ))[3] - __s2[3]);TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp384" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 0-241 |
888 | nameTRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
889 | , TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
890 | "nistp384"TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
891 | )))); }) TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
| 20-241 |
892 | == 0TRUE | evaluated 20 times by 1 test | FALSE | evaluated 241 times by 2 tests |
) | 20-241 |
893 | returnexecuted 20 times by 1 test: return 715 ; executed 20 times by 1 test: return 715 ; | 20 |
894 | 715executed 20 times by 1 test: return 715 ; | 20 |
895 | ;executed 20 times by 1 test: return 715 ; | 20 |
896 | | - |
897 | else if ( | - |
898 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
899 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
900 | ) && __builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
901 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
902 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
903 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
904 | ), __s2_len = __builtin_strlen (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
905 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
906 | ), (!((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
907 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
908 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
909 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
910 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
911 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
912 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
913 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
914 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
915 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
916 | , TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
917 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
918 | ) : (__builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
919 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
920 | ) && ((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
921 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
922 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
923 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
924 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
925 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
926 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
927 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
928 | ) && ((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
929 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
930 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
931 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
932 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
933 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
934 | , TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
935 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
936 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
937 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
938 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
939 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
940 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
941 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
942 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
943 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
944 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
945 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-219 |
946 | ))[3] - __s2[3]);TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
947 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
948 | ) && ((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
949 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
950 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
951 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
952 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
953 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
954 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
955 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
956 | ) && ((size_t)(const void *)((TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
957 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
958 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
959 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
960 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
961 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
962 | , TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
963 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
964 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
965 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
966 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
967 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
968 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
969 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
970 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
971 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
972 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "nistp521" ))[3] - __s2[3]); TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
973 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp521" ))[3] - __s2[3]); | 0-219 |
974 | ))[3] - __s2[3]);TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "nistp521" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 0-219 |
975 | nameTRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
976 | , TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
977 | "nistp521"TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
978 | )))); }) TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
| 22-219 |
979 | == 0TRUE | evaluated 22 times by 2 tests | FALSE | evaluated 219 times by 1 test |
) | 22-219 |
980 | returnexecuted 22 times by 2 tests: return 716 ; executed 22 times by 2 tests: return 716 ; | 22 |
981 | 716executed 22 times by 2 tests: return 716 ; | 22 |
982 | ;executed 22 times by 2 tests: return 716 ; | 22 |
983 | | - |
984 | else | - |
985 | returnexecuted 219 times by 1 test: return -1; -1;executed 219 times by 1 test: return -1; | 219 |
986 | } | - |
987 | | - |
988 | u_int | - |
989 | sshkey_curve_nid_to_bits(int nid) | - |
990 | { | - |
991 | switch (nid) { | - |
992 | caseexecuted 12723 times by 4 tests: case 415 : Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
executed 12723 times by 4 tests: case 415 : Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 12723 |
993 | 415executed 12723 times by 4 tests: case 415 : Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 12723 |
994 | :executed 12723 times by 4 tests: case 415 : Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 12723 |
995 | returnexecuted 12723 times by 4 tests: return 256; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
256;executed 12723 times by 4 tests: return 256; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 12723 |
996 | caseexecuted 2 times by 1 test: case 715 : executed 2 times by 1 test: case 715 : | 2 |
997 | 715executed 2 times by 1 test: case 715 : | 2 |
998 | :executed 2 times by 1 test: case 715 : | 2 |
999 | returnexecuted 2 times by 1 test: return 384; 384;executed 2 times by 1 test: return 384; | 2 |
1000 | | - |
1001 | caseexecuted 26 times by 2 tests: case 716 : executed 26 times by 2 tests: case 716 : | 26 |
1002 | 716executed 26 times by 2 tests: case 716 : | 26 |
1003 | :executed 26 times by 2 tests: case 716 : | 26 |
1004 | returnexecuted 26 times by 2 tests: return 521; 521;executed 26 times by 2 tests: return 521; | 26 |
1005 | | - |
1006 | defaultexecuted 1 time by 1 test: default: :executed 1 time by 1 test: default: | 1 |
1007 | returnexecuted 1 time by 1 test: return 0; 0;executed 1 time by 1 test: return 0; | 1 |
1008 | } | - |
1009 | } | - |
1010 | | - |
1011 | int | - |
1012 | sshkey_ecdsa_bits_to_nid(int bits) | - |
1013 | { | - |
1014 | switch (bits) { | - |
1015 | caseexecuted 12 times by 3 tests: case 256: Executed by:- ssh-keygen
- test_kex
- test_sshkey
256:executed 12 times by 3 tests: case 256: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
1016 | returnexecuted 12 times by 3 tests: return 415 ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
executed 12 times by 3 tests: return 415 ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
1017 | 415executed 12 times by 3 tests: return 415 ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
1018 | ;executed 12 times by 3 tests: return 415 ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
1019 | case never executed: case 384: 384:never executed: case 384: | 0 |
1020 | return never executed: return 715 ; never executed: return 715 ; | 0 |
1021 | 715 never executed: return 715 ; | 0 |
1022 | ; never executed: return 715 ; | 0 |
1023 | | - |
1024 | case never executed: case 521: 521:never executed: case 521: | 0 |
1025 | return never executed: return 716 ; never executed: return 716 ; | 0 |
1026 | 716 never executed: return 716 ; | 0 |
1027 | ; never executed: return 716 ; | 0 |
1028 | | - |
1029 | defaultexecuted 1 time by 1 test: default: :executed 1 time by 1 test: default: | 1 |
1030 | returnexecuted 1 time by 1 test: return -1; -1;executed 1 time by 1 test: return -1; | 1 |
1031 | } | - |
1032 | } | - |
1033 | | - |
1034 | const char * | - |
1035 | sshkey_curve_nid_to_name(int nid) | - |
1036 | { | - |
1037 | switch (nid) { | - |
1038 | caseexecuted 5989 times by 3 tests: case 415 : Executed by:- ssh-keygen
- test_kex
- test_sshkey
executed 5989 times by 3 tests: case 415 : Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 5989 |
1039 | 415executed 5989 times by 3 tests: case 415 : Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 5989 |
1040 | :executed 5989 times by 3 tests: case 415 : Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 5989 |
1041 | returnexecuted 5989 times by 3 tests: return "nistp256"; Executed by:- ssh-keygen
- test_kex
- test_sshkey
"nistp256";executed 5989 times by 3 tests: return "nistp256"; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 5989 |
1042 | case never executed: case 715 : never executed: case 715 : | 0 |
1043 | 715 never executed: case 715 : | 0 |
1044 | : never executed: case 715 : | 0 |
1045 | return never executed: return "nistp384"; "nistp384";never executed: return "nistp384"; | 0 |
1046 | | - |
1047 | case never executed: case 716 : never executed: case 716 : | 0 |
1048 | 716 never executed: case 716 : | 0 |
1049 | : never executed: case 716 : | 0 |
1050 | return never executed: return "nistp521"; "nistp521";never executed: return "nistp521"; | 0 |
1051 | | - |
1052 | default never executed: default: :never executed: default: | 0 |
1053 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1054 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1055 | ; never executed: return ((void *)0) ; | 0 |
1056 | } | - |
1057 | } | - |
1058 | | - |
1059 | int | - |
1060 | sshkey_ec_nid_to_hash_alg(int nid) | - |
1061 | { | - |
1062 | int kbits = sshkey_curve_nid_to_bits(nid); | - |
1063 | | - |
1064 | if (kbits <= 0TRUE | never evaluated | FALSE | evaluated 12726 times by 2 tests |
) | 0-12726 |
1065 | return never executed: return -1; -1;never executed: return -1; | 0 |
1066 | | - |
1067 | | - |
1068 | if (kbits <= 256TRUE | evaluated 12703 times by 2 tests | FALSE | evaluated 23 times by 1 test |
) | 23-12703 |
1069 | returnexecuted 12703 times by 2 tests: return 2; 2;executed 12703 times by 2 tests: return 2; | 12703 |
1070 | else if (kbits <= 384TRUE | never evaluated | FALSE | evaluated 23 times by 1 test |
) | 0-23 |
1071 | return never executed: return 3; 3;never executed: return 3; | 0 |
1072 | else | - |
1073 | returnexecuted 23 times by 1 test: return 4; 4;executed 23 times by 1 test: return 4; | 23 |
1074 | } | - |
1075 | | - |
1076 | | - |
1077 | static void | - |
1078 | cert_free(struct sshkey_cert *cert) | - |
1079 | { | - |
1080 | u_int i; | - |
1081 | | - |
1082 | if (cert == TRUE | evaluated 11 times by 1 test | FALSE | evaluated 17199 times by 1 test |
| 11-17199 |
1083 | ((void *)0)TRUE | evaluated 11 times by 1 test | FALSE | evaluated 17199 times by 1 test |
| 11-17199 |
1084 | ) | - |
1085 | return;executed 11 times by 1 test: return; | 11 |
1086 | sshbuf_free(cert->certblob); | - |
1087 | sshbuf_free(cert->critical); | - |
1088 | sshbuf_free(cert->extensions); | - |
1089 | free(cert->key_id); | - |
1090 | for (i = 0; i < cert->nprincipalsTRUE | evaluated 26614 times by 1 test | FALSE | evaluated 17199 times by 1 test |
; i++) | 17199-26614 |
1091 | free(cert->principals[i]);executed 26614 times by 1 test: free(cert->principals[i]); | 26614 |
1092 | free(cert->principals); | - |
1093 | sshkey_free(cert->signature_key); | - |
1094 | free(cert->signature_type); | - |
1095 | freezero(cert, sizeof(*cert)); | - |
1096 | }executed 17199 times by 1 test: end of block | 17199 |
1097 | | - |
1098 | static struct sshkey_cert * | - |
1099 | cert_new(void) | - |
1100 | { | - |
1101 | struct sshkey_cert *cert; | - |
1102 | | - |
1103 | if ((TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
cert = calloc(1, sizeof(*cert))) == TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1104 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1105 | ) | - |
1106 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1107 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1108 | ; never executed: return ((void *)0) ; | 0 |
1109 | if ((TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
cert->certblob = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1110 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1111 | || | - |
1112 | (TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
cert->critical = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1113 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1114 | || | - |
1115 | (TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
cert->extensions = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1116 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17199 times by 1 test |
| 0-17199 |
1117 | ) { | - |
1118 | cert_free(cert); | - |
1119 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1120 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1121 | ; never executed: return ((void *)0) ; | 0 |
1122 | } | - |
1123 | cert->key_id = | - |
1124 | ((void *)0) | - |
1125 | ; | - |
1126 | cert->principals = | - |
1127 | ((void *)0) | - |
1128 | ; | - |
1129 | cert->signature_key = | - |
1130 | ((void *)0) | - |
1131 | ; | - |
1132 | cert->signature_type = | - |
1133 | ((void *)0) | - |
1134 | ; | - |
1135 | returnexecuted 17199 times by 1 test: return cert; cert;executed 17199 times by 1 test: return cert; | 17199 |
1136 | } | - |
1137 | | - |
1138 | struct sshkey * | - |
1139 | sshkey_new(int type) | - |
1140 | { | - |
1141 | struct sshkey *k; | - |
1142 | | - |
1143 | RSA *rsa; | - |
1144 | DSA *dsa; | - |
1145 | | - |
1146 | | - |
1147 | if ((TRUE | never evaluated | FALSE | evaluated 232433 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
k = calloc(1, sizeof(*k))) == TRUE | never evaluated | FALSE | evaluated 232433 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-232433 |
1148 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 232433 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-232433 |
1149 | ) | - |
1150 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1151 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1152 | ; never executed: return ((void *)0) ; | 0 |
1153 | k->type = type; | - |
1154 | k->ecdsa = | - |
1155 | ((void *)0) | - |
1156 | ; | - |
1157 | k->ecdsa_nid = -1; | - |
1158 | k->dsa = | - |
1159 | ((void *)0) | - |
1160 | ; | - |
1161 | k->rsa = | - |
1162 | ((void *)0) | - |
1163 | ; | - |
1164 | k->cert = | - |
1165 | ((void *)0) | - |
1166 | ; | - |
1167 | k->ed25519_sk = | - |
1168 | ((void *)0) | - |
1169 | ; | - |
1170 | k->ed25519_pk = | - |
1171 | ((void *)0) | - |
1172 | ; | - |
1173 | k->xmss_sk = | - |
1174 | ((void *)0) | - |
1175 | ; | - |
1176 | k->xmss_pk = | - |
1177 | ((void *)0) | - |
1178 | ; | - |
1179 | switch (k->type) { | - |
1180 | | - |
1181 | caseexecuted 1635 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_RSA:executed 1635 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 1635 |
1182 | caseexecuted 3845 times by 1 test: case KEY_RSA_CERT: KEY_RSA_CERT:executed 3845 times by 1 test: case KEY_RSA_CERT: | 3845 |
1183 | if ((TRUE | never evaluated | FALSE | evaluated 5480 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
rsa = RSA_new()) == TRUE | never evaluated | FALSE | evaluated 5480 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5480 |
1184 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5480 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5480 |
1185 | ) { | - |
1186 | free(k); | - |
1187 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1188 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1189 | ; never executed: return ((void *)0) ; | 0 |
1190 | } | - |
1191 | k->rsa = rsa; | - |
1192 | break;executed 5480 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 5480 |
1193 | caseexecuted 4480 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_DSA:executed 4480 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 4480 |
1194 | caseexecuted 6682 times by 1 test: case KEY_DSA_CERT: KEY_DSA_CERT:executed 6682 times by 1 test: case KEY_DSA_CERT: | 6682 |
1195 | if ((TRUE | never evaluated | FALSE | evaluated 11162 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
dsa = DSA_new()) == TRUE | never evaluated | FALSE | evaluated 11162 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11162 |
1196 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11162 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11162 |
1197 | ) { | - |
1198 | free(k); | - |
1199 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1200 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1201 | ; never executed: return ((void *)0) ; | 0 |
1202 | } | - |
1203 | k->dsa = dsa; | - |
1204 | break;executed 11162 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 11162 |
1205 | caseexecuted 3334 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_ECDSA:executed 3334 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 3334 |
1206 | caseexecuted 3951 times by 1 test: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:executed 3951 times by 1 test: case KEY_ECDSA_CERT: | 3951 |
1207 | | - |
1208 | break;executed 7285 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 7285 |
1209 | | - |
1210 | caseexecuted 26159 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_ED25519:executed 26159 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 26159 |
1211 | caseexecuted 2720 times by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 2720 times by 1 test: case KEY_ED25519_CERT: | 2720 |
1212 | case never executed: case KEY_XMSS: KEY_XMSS:never executed: case KEY_XMSS: | 0 |
1213 | case never executed: case KEY_XMSS_CERT: KEY_XMSS_CERT:never executed: case KEY_XMSS_CERT: | 0 |
1214 | | - |
1215 | break;executed 28879 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 28879 |
1216 | caseexecuted 179626 times by 5 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_UNSPEC:executed 179626 times by 5 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 179626 |
1217 | break;executed 179626 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 179626 |
1218 | defaultexecuted 1 time by 1 test: default: :executed 1 time by 1 test: default: | 1 |
1219 | free(k); | - |
1220 | returnexecuted 1 time by 1 test: return ((void *)0) ; executed 1 time by 1 test: return ((void *)0) ; | 1 |
1221 | ((void *)0)executed 1 time by 1 test: return ((void *)0) ; | 1 |
1222 | ;executed 1 time by 1 test: return ((void *)0) ; | 1 |
1223 | } | - |
1224 | | - |
1225 | if (sshkey_is_cert(k)TRUE | evaluated 17198 times by 1 test | FALSE | evaluated 215234 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 17198-215234 |
1226 | if ((TRUE | never evaluated | FALSE | evaluated 17198 times by 1 test |
k->cert = cert_new()) == TRUE | never evaluated | FALSE | evaluated 17198 times by 1 test |
| 0-17198 |
1227 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17198 times by 1 test |
| 0-17198 |
1228 | ) { | - |
1229 | sshkey_free(k); | - |
1230 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1231 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1232 | ; never executed: return ((void *)0) ; | 0 |
1233 | } | - |
1234 | }executed 17198 times by 1 test: end of block | 17198 |
1235 | | - |
1236 | returnexecuted 232432 times by 5 tests: return k; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
k;executed 232432 times by 5 tests: return k; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 232432 |
1237 | } | - |
1238 | | - |
1239 | void | - |
1240 | sshkey_free(struct sshkey *k) | - |
1241 | { | - |
1242 | if (k == TRUE | evaluated 541378 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 232424 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 232424-541378 |
1243 | ((void *)0)TRUE | evaluated 541378 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 232424 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 232424-541378 |
1244 | ) | - |
1245 | return;executed 541378 times by 5 tests: return; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 541378 |
1246 | switch (k->type) { | - |
1247 | | - |
1248 | caseexecuted 101337 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_RSA:executed 101337 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 101337 |
1249 | caseexecuted 3850 times by 1 test: case KEY_RSA_CERT: KEY_RSA_CERT:executed 3850 times by 1 test: case KEY_RSA_CERT: | 3850 |
1250 | RSA_free(k->rsa); | - |
1251 | k->rsa = | - |
1252 | ((void *)0) | - |
1253 | ; | - |
1254 | break;executed 105187 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 105187 |
1255 | caseexecuted 78057 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_DSA:executed 78057 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 78057 |
1256 | caseexecuted 6684 times by 1 test: case KEY_DSA_CERT: KEY_DSA_CERT:executed 6684 times by 1 test: case KEY_DSA_CERT: | 6684 |
1257 | DSA_free(k->dsa); | - |
1258 | k->dsa = | - |
1259 | ((void *)0) | - |
1260 | ; | - |
1261 | break;executed 84741 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 84741 |
1262 | | - |
1263 | caseexecuted 9452 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_ECDSA:executed 9452 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 9452 |
1264 | caseexecuted 3953 times by 1 test: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:executed 3953 times by 1 test: case KEY_ECDSA_CERT: | 3953 |
1265 | EC_KEY_free(k->ecdsa); | - |
1266 | k->ecdsa = | - |
1267 | ((void *)0) | - |
1268 | ; | - |
1269 | break;executed 13405 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 13405 |
1270 | | - |
1271 | | - |
1272 | caseexecuted 26338 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_ED25519:executed 26338 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 26338 |
1273 | caseexecuted 2723 times by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 2723 times by 1 test: case KEY_ED25519_CERT: | 2723 |
1274 | freezero(k->ed25519_pk, 32U); | - |
1275 | k->ed25519_pk = | - |
1276 | ((void *)0) | - |
1277 | ; | - |
1278 | freezero(k->ed25519_sk, 64U); | - |
1279 | k->ed25519_sk = | - |
1280 | ((void *)0) | - |
1281 | ; | - |
1282 | break;executed 29061 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 29061 |
1283 | caseexecuted 30 times by 4 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
KEY_UNSPEC:executed 30 times by 4 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 30 |
1284 | break;executed 30 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 30 |
1285 | default never executed: default: :never executed: default: | 0 |
1286 | break; never executed: break; | 0 |
1287 | } | - |
1288 | if (sshkey_is_cert(k)TRUE | evaluated 17210 times by 1 test | FALSE | evaluated 215214 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) | 17210-215214 |
1289 | cert_free(k->cert);executed 17210 times by 1 test: cert_free(k->cert); | 17210 |
1290 | freezero(k, sizeof(*k)); | - |
1291 | }executed 232424 times by 5 tests: end of block Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 232424 |
1292 | | - |
1293 | static int | - |
1294 | cert_compare(struct sshkey_cert *a, struct sshkey_cert *b) | - |
1295 | { | - |
1296 | if (a == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1297 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1298 | && b == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1299 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1300 | ) | - |
1301 | return never executed: return 1; 1;never executed: return 1; | 0 |
1302 | if (a == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1303 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1304 | || b == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1305 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1306 | ) | - |
1307 | return never executed: return 0; 0;never executed: return 0; | 0 |
1308 | if (sshbuf_len(a->certblob) != sshbuf_len(b->certblob)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
1309 | return never executed: return 0; 0;never executed: return 0; | 0 |
1310 | if (timingsafe_bcmp(sshbuf_ptr(a->certblob), sshbuf_ptr(b->certblob),TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1311 | sshbuf_len(a->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
1312 | return never executed: return 0; 0;never executed: return 0; | 0 |
1313 | return never executed: return 1; 1;never executed: return 1; | 0 |
1314 | } | - |
1315 | | - |
1316 | | - |
1317 | | - |
1318 | | - |
1319 | | - |
1320 | int | - |
1321 | sshkey_equal_public(const struct sshkey *a, const struct sshkey *b) | - |
1322 | { | - |
1323 | | - |
1324 | const BIGNUM *rsa_e_a, *rsa_n_a; | - |
1325 | const BIGNUM *rsa_e_b, *rsa_n_b; | - |
1326 | const BIGNUM *dsa_p_a, *dsa_q_a, *dsa_g_a, *dsa_pub_key_a; | - |
1327 | const BIGNUM *dsa_p_b, *dsa_q_b, *dsa_g_b, *dsa_pub_key_b; | - |
1328 | | - |
1329 | BN_CTX *bnctx; | - |
1330 | | - |
1331 | | - |
1332 | | - |
1333 | if (a == TRUE | never evaluated | FALSE | evaluated 268 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-268 |
1334 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 268 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-268 |
1335 | || b == TRUE | never evaluated | FALSE | evaluated 268 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-268 |
1336 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 268 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-268 |
1337 | || | - |
1338 | sshkey_type_plain(a->type) != sshkey_type_plain(b->type)TRUE | never evaluated | FALSE | evaluated 268 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
) | 0-268 |
1339 | return never executed: return 0; 0;never executed: return 0; | 0 |
1340 | | - |
1341 | switch (a->type) { | - |
1342 | | - |
1343 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
1344 | caseexecuted 67 times by 3 tests: case KEY_RSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
KEY_RSA:executed 67 times by 3 tests: case KEY_RSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 67 |
1345 | if (a->rsa == TRUE | never evaluated | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-67 |
1346 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-67 |
1347 | || b->rsa == TRUE | never evaluated | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-67 |
1348 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-67 |
1349 | ) | - |
1350 | return never executed: return 0; 0;never executed: return 0; | 0 |
1351 | RSA_get0_key(a->rsa, &rsa_n_a, &rsa_e_a, | - |
1352 | ((void *)0) | - |
1353 | ); | - |
1354 | RSA_get0_key(b->rsa, &rsa_n_b, &rsa_e_b, | - |
1355 | ((void *)0) | - |
1356 | ); | - |
1357 | returnexecuted 67 times by 3 tests: return BN_cmp(rsa_e_a, rsa_e_b) == 0 && BN_cmp(rsa_n_a, rsa_n_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
BN_cmp(rsa_e_a, rsa_e_b) == 0TRUE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
&&executed 67 times by 3 tests: return BN_cmp(rsa_e_a, rsa_e_b) == 0 && BN_cmp(rsa_n_a, rsa_n_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-67 |
1358 | BN_cmp(rsa_n_a, rsa_n_b) == 0TRUE | evaluated 66 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 1 time by 1 test |
;executed 67 times by 3 tests: return BN_cmp(rsa_e_a, rsa_e_b) == 0 && BN_cmp(rsa_n_a, rsa_n_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 1-67 |
1359 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
1360 | caseexecuted 68 times by 3 tests: case KEY_DSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
KEY_DSA:executed 68 times by 3 tests: case KEY_DSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 68 |
1361 | if (a->dsa == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1362 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1363 | || b->dsa == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1364 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1365 | ) | - |
1366 | return never executed: return 0; 0;never executed: return 0; | 0 |
1367 | DSA_get0_pqg(a->dsa, &dsa_p_a, &dsa_q_a, &dsa_g_a); | - |
1368 | DSA_get0_pqg(b->dsa, &dsa_p_b, &dsa_q_b, &dsa_g_b); | - |
1369 | DSA_get0_key(a->dsa, &dsa_pub_key_a, | - |
1370 | ((void *)0) | - |
1371 | ); | - |
1372 | DSA_get0_key(b->dsa, &dsa_pub_key_b, | - |
1373 | ((void *)0) | - |
1374 | ); | - |
1375 | returnexecuted 68 times by 3 tests: return BN_cmp(dsa_p_a, dsa_p_b) == 0 && BN_cmp(dsa_q_a, dsa_q_b) == 0 && BN_cmp(dsa_g_a, dsa_g_b) == 0 && BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
BN_cmp(dsa_p_a, dsa_p_b) == 0TRUE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 1 time by 1 test |
&&executed 68 times by 3 tests: return BN_cmp(dsa_p_a, dsa_p_b) == 0 && BN_cmp(dsa_q_a, dsa_q_b) == 0 && BN_cmp(dsa_g_a, dsa_g_b) == 0 && BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 1-68 |
1376 | BN_cmp(dsa_q_a, dsa_q_b) == 0TRUE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
&&executed 68 times by 3 tests: return BN_cmp(dsa_p_a, dsa_p_b) == 0 && BN_cmp(dsa_q_a, dsa_q_b) == 0 && BN_cmp(dsa_g_a, dsa_g_b) == 0 && BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-68 |
1377 | BN_cmp(dsa_g_a, dsa_g_b) == 0TRUE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
&&executed 68 times by 3 tests: return BN_cmp(dsa_p_a, dsa_p_b) == 0 && BN_cmp(dsa_q_a, dsa_q_b) == 0 && BN_cmp(dsa_g_a, dsa_g_b) == 0 && BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-68 |
1378 | BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0TRUE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
;executed 68 times by 3 tests: return BN_cmp(dsa_p_a, dsa_p_b) == 0 && BN_cmp(dsa_q_a, dsa_q_b) == 0 && BN_cmp(dsa_g_a, dsa_g_b) == 0 && BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-68 |
1379 | | - |
1380 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
1381 | caseexecuted 68 times by 3 tests: case KEY_ECDSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
KEY_ECDSA:executed 68 times by 3 tests: case KEY_ECDSA: Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 68 |
1382 | if (a->ecdsa == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1383 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1384 | || b->ecdsa == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1385 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1386 | || | - |
1387 | EC_KEY_get0_public_key(a->ecdsa) == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1388 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1389 | || | - |
1390 | EC_KEY_get0_public_key(b->ecdsa) == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1391 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1392 | ) | - |
1393 | return never executed: return 0; 0;never executed: return 0; | 0 |
1394 | if ((TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
bnctx = BN_CTX_new()) == TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1395 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1396 | ) | - |
1397 | return never executed: return 0; 0;never executed: return 0; | 0 |
1398 | if (EC_GROUP_cmp(EC_KEY_get0_group(a->ecdsa),TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 0-68 |
1399 | EC_KEY_get0_group(b->ecdsa), bnctx) != 0TRUE | never evaluated | FALSE | evaluated 68 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
|| | 0-68 |
1400 | EC_POINT_cmp(EC_KEY_get0_group(a->ecdsa),TRUE | evaluated 1 time by 1 test | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 1-67 |
1401 | EC_KEY_get0_public_key(a->ecdsa),TRUE | evaluated 1 time by 1 test | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
| 1-67 |
1402 | EC_KEY_get0_public_key(b->ecdsa), bnctx) != 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 67 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
|
) { | 1-67 |
1403 | BN_CTX_free(bnctx); | - |
1404 | returnexecuted 1 time by 1 test: return 0; 0;executed 1 time by 1 test: return 0; | 1 |
1405 | } | - |
1406 | BN_CTX_free(bnctx); | - |
1407 | returnexecuted 67 times by 3 tests: return 1; Executed by:- test_hostkeys
- test_kex
- test_sshkey
1;executed 67 times by 3 tests: return 1; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 67 |
1408 | | - |
1409 | | - |
1410 | caseexecuted 65 times by 3 tests: case KEY_ED25519: Executed by:- test_hostkeys
- test_kex
- test_sshkey
KEY_ED25519:executed 65 times by 3 tests: case KEY_ED25519: Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 65 |
1411 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
1412 | returnexecuted 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
a->ed25519_pk != TRUE | evaluated 65 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-65 |
1413 | ((void *)0)TRUE | evaluated 65 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-65 |
1414 | && b->ed25519_pk != TRUE | evaluated 65 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-65 |
1415 | ((void *)0)TRUE | evaluated 65 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 0-65 |
1416 | &&executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 65 |
1417 | memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0TRUE | evaluated 64 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_sshkey
| FALSE | evaluated 1 time by 1 test |
;executed 65 times by 3 tests: return a->ed25519_pk != ((void *)0) && b->ed25519_pk != ((void *)0) && memcmp(a->ed25519_pk, b->ed25519_pk, 32U) == 0; Executed by:- test_hostkeys
- test_kex
- test_sshkey
| 1-65 |
1418 | | - |
1419 | | - |
1420 | | - |
1421 | | - |
1422 | | - |
1423 | | - |
1424 | | - |
1425 | default never executed: default: :never executed: default: | 0 |
1426 | return never executed: return 0; 0;never executed: return 0; | 0 |
1427 | } | - |
1428 | | - |
1429 | } | - |
1430 | | - |
1431 | int | - |
1432 | sshkey_equal(const struct sshkey *a, const struct sshkey *b) | - |
1433 | { | - |
1434 | if (a == TRUE | never evaluated | FALSE | evaluated 111 times by 2 tests |
| 0-111 |
1435 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 111 times by 2 tests |
| 0-111 |
1436 | || b == TRUE | never evaluated | FALSE | evaluated 111 times by 2 tests |
| 0-111 |
1437 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 111 times by 2 tests |
| 0-111 |
1438 | || a->type != b->typeTRUE | evaluated 9 times by 1 test | FALSE | evaluated 102 times by 2 tests |
) | 9-102 |
1439 | returnexecuted 9 times by 1 test: return 0; 0;executed 9 times by 1 test: return 0; | 9 |
1440 | if (sshkey_is_cert(a)TRUE | never evaluated | FALSE | evaluated 102 times by 2 tests |
) { | 0-102 |
1441 | if (!cert_compare(a->cert, b->cert)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
1442 | return never executed: return 0; 0;never executed: return 0; | 0 |
1443 | } never executed: end of block | 0 |
1444 | returnexecuted 102 times by 2 tests: return sshkey_equal_public(a, b); sshkey_equal_public(a, b);executed 102 times by 2 tests: return sshkey_equal_public(a, b); | 102 |
1445 | } | - |
1446 | | - |
1447 | static int | - |
1448 | to_blob_buf(const struct sshkey *key, struct sshbuf *b, int force_plain, | - |
1449 | enum sshkey_serialize_rep opts) | - |
1450 | { | - |
1451 | int type, ret = -1; | - |
1452 | const char *typename; | - |
1453 | | - |
1454 | const BIGNUM *rsa_n, *rsa_e, *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key; | - |
1455 | | - |
1456 | | - |
1457 | if (key == TRUE | never evaluated | FALSE | evaluated 231 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-231 |
1458 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 231 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-231 |
1459 | ) | - |
1460 | return never executed: return -10; -10;never executed: return -10; | 0 |
1461 | | - |
1462 | if (sshkey_is_cert(key)TRUE | evaluated 10 times by 1 test | FALSE | evaluated 221 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
) { | 10-221 |
1463 | if (key->cert == TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
1464 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
1465 | ) | - |
1466 | return never executed: return -16; -16;never executed: return -16; | 0 |
1467 | if (sshbuf_len(key->cert->certblob) == 0TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
) | 0-10 |
1468 | return never executed: return -17; -17;never executed: return -17; | 0 |
1469 | }executed 10 times by 1 test: end of block | 10 |
1470 | type = force_plainTRUE | evaluated 41 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | evaluated 190 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
? sshkey_type_plain(key->type) : key->type; | 41-190 |
1471 | typename = sshkey_ssh_name_from_type_nid(type, key->ecdsa_nid); | - |
1472 | | - |
1473 | switch (type) { | - |
1474 | | - |
1475 | caseexecuted 1 time by 1 test: case KEY_DSA_CERT: KEY_DSA_CERT:executed 1 time by 1 test: case KEY_DSA_CERT: | 1 |
1476 | caseexecuted 1 time by 1 test: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:executed 1 time by 1 test: case KEY_ECDSA_CERT: | 1 |
1477 | caseexecuted 2 times by 1 test: case KEY_RSA_CERT: KEY_RSA_CERT:executed 2 times by 1 test: case KEY_RSA_CERT: | 2 |
1478 | | - |
1479 | caseexecuted 2 times by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 2 times by 1 test: case KEY_ED25519_CERT: | 2 |
1480 | | - |
1481 | | - |
1482 | | - |
1483 | | - |
1484 | | - |
1485 | if ((TRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
ret = sshbuf_putb(b, key->cert->certblob)) != 0TRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
) | 0-6 |
1486 | return never executed: return ret; ret;never executed: return ret; | 0 |
1487 | break;executed 6 times by 1 test: break; | 6 |
1488 | | - |
1489 | caseexecuted 52 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_DSA:executed 52 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 52 |
1490 | if (key->dsa == TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
1491 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
1492 | ) | - |
1493 | return never executed: return -10; -10;never executed: return -10; | 0 |
1494 | DSA_get0_pqg(key->dsa, &dsa_p, &dsa_q, &dsa_g); | - |
1495 | DSA_get0_key(key->dsa, &dsa_pub_key, | - |
1496 | ((void *)0) | - |
1497 | ); | - |
1498 | if ((TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_cstring(b, typename)) != 0TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-52 |
1499 | (TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, dsa_p)) != 0TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-52 |
1500 | (TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, dsa_q)) != 0TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-52 |
1501 | (TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, dsa_g)) != 0TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-52 |
1502 | (TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, dsa_pub_key)) != 0TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 0-52 |
1503 | return never executed: return ret; ret;never executed: return ret; | 0 |
1504 | break;executed 52 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 52 |
1505 | | - |
1506 | caseexecuted 50 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_ECDSA:executed 50 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 50 |
1507 | if (key->ecdsa == TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-50 |
1508 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-50 |
1509 | ) | - |
1510 | return never executed: return -10; -10;never executed: return -10; | 0 |
1511 | if ((TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_cstring(b, typename)) != 0TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-50 |
1512 | (TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_cstring(b,TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-50 |
1513 | sshkey_curve_nid_to_name(key->ecdsa_nid))) != 0TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-50 |
1514 | (TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
ret = sshbuf_put_eckey(b, key->ecdsa)) != 0TRUE | never evaluated | FALSE | evaluated 50 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 0-50 |
1515 | return never executed: return ret; ret;never executed: return ret; | 0 |
1516 | break;executed 50 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 50 |
1517 | | - |
1518 | caseexecuted 64 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
KEY_RSA:executed 64 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 64 |
1519 | if (key->rsa == TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-64 |
1520 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-64 |
1521 | ) | - |
1522 | return never executed: return -10; -10;never executed: return -10; | 0 |
1523 | RSA_get0_key(key->rsa, &rsa_n, &rsa_e, | - |
1524 | ((void *)0) | - |
1525 | ); | - |
1526 | if ((TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = sshbuf_put_cstring(b, typename)) != 0TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
|| | 0-64 |
1527 | (TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, rsa_e)) != 0TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
|| | 0-64 |
1528 | (TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = sshbuf_put_bignum2(b, rsa_n)) != 0TRUE | never evaluated | FALSE | evaluated 64 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
) | 0-64 |
1529 | return never executed: return ret; ret;never executed: return ret; | 0 |
1530 | break;executed 64 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 64 |
1531 | | - |
1532 | caseexecuted 59 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
KEY_ED25519:executed 59 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 59 |
1533 | if (key->ed25519_pk == TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-59 |
1534 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-59 |
1535 | ) | - |
1536 | return never executed: return -10; -10;never executed: return -10; | 0 |
1537 | if ((TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = sshbuf_put_cstring(b, typename)) != 0TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
|| | 0-59 |
1538 | (TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = sshbuf_put_string(b,TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-59 |
1539 | key->ed25519_pk, 32U)) != 0TRUE | never evaluated | FALSE | evaluated 59 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
) | 0-59 |
1540 | return never executed: return ret; ret;never executed: return ret; | 0 |
1541 | break;executed 59 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 59 |
1542 | default never executed: default: :never executed: default: | 0 |
1543 | return never executed: return -14; -14;never executed: return -14; | 0 |
1544 | } | - |
1545 | returnexecuted 231 times by 4 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
0;executed 231 times by 4 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 231 |
1546 | } | - |
1547 | | - |
1548 | int | - |
1549 | sshkey_putb(const struct sshkey *key, struct sshbuf *b) | - |
1550 | { | - |
1551 | returnexecuted 21 times by 2 tests: return to_blob_buf(key, b, 0, SSHKEY_SERIALIZE_DEFAULT); to_blob_buf(key, b, 0, SSHKEY_SERIALIZE_DEFAULT);executed 21 times by 2 tests: return to_blob_buf(key, b, 0, SSHKEY_SERIALIZE_DEFAULT); | 21 |
1552 | } | - |
1553 | | - |
1554 | int | - |
1555 | sshkey_puts_opts(const struct sshkey *key, struct sshbuf *b, | - |
1556 | enum sshkey_serialize_rep opts) | - |
1557 | { | - |
1558 | struct sshbuf *tmp; | - |
1559 | int r; | - |
1560 | | - |
1561 | if ((TRUE | never evaluated | FALSE | never evaluated |
tmp = sshbuf_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1562 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1563 | ) | - |
1564 | return never executed: return -2; -2;never executed: return -2; | 0 |
1565 | r = to_blob_buf(key, tmp, 0, opts); | - |
1566 | if (r == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
1567 | r = sshbuf_put_stringb(b, tmp); never executed: r = sshbuf_put_stringb(b, tmp); | 0 |
1568 | sshbuf_free(tmp); | - |
1569 | return never executed: return r; r;never executed: return r; | 0 |
1570 | } | - |
1571 | | - |
1572 | int | - |
1573 | sshkey_puts(const struct sshkey *key, struct sshbuf *b) | - |
1574 | { | - |
1575 | return never executed: return sshkey_puts_opts(key, b, SSHKEY_SERIALIZE_DEFAULT); sshkey_puts_opts(key, b, SSHKEY_SERIALIZE_DEFAULT);never executed: return sshkey_puts_opts(key, b, SSHKEY_SERIALIZE_DEFAULT); | 0 |
1576 | } | - |
1577 | | - |
1578 | int | - |
1579 | sshkey_putb_plain(const struct sshkey *key, struct sshbuf *b) | - |
1580 | { | - |
1581 | returnexecuted 1 time by 1 test: return to_blob_buf(key, b, 1, SSHKEY_SERIALIZE_DEFAULT); to_blob_buf(key, b, 1, SSHKEY_SERIALIZE_DEFAULT);executed 1 time by 1 test: return to_blob_buf(key, b, 1, SSHKEY_SERIALIZE_DEFAULT); | 1 |
1582 | } | - |
1583 | | - |
1584 | static int | - |
1585 | to_blob(const struct sshkey *key, u_char **blobp, size_t *lenp, int force_plain, | - |
1586 | enum sshkey_serialize_rep opts) | - |
1587 | { | - |
1588 | int ret = -1; | - |
1589 | size_t len; | - |
1590 | struct sshbuf *b = | - |
1591 | ((void *)0) | - |
1592 | ; | - |
1593 | | - |
1594 | if (lenp != TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1595 | ((void *)0)TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1596 | ) | - |
1597 | *executed 209 times by 4 tests: *lenp = 0; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
lenp = 0;executed 209 times by 4 tests: *lenp = 0; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1598 | if (blobp != TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1599 | ((void *)0)TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1600 | ) | - |
1601 | *executed 209 times by 4 tests: *blobp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
blobp = executed 209 times by 4 tests: *blobp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1602 | ((void *)0)executed 209 times by 4 tests: *blobp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1603 | ;executed 209 times by 4 tests: *blobp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1604 | if ((TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
b = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-209 |
1605 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-209 |
1606 | ) | - |
1607 | return never executed: return -2; -2;never executed: return -2; | 0 |
1608 | if ((TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
ret = to_blob_buf(key, b, force_plain, opts)) != 0TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
) | 0-209 |
1609 | goto never executed: goto out; out;never executed: goto out; | 0 |
1610 | len = sshbuf_len(b); | - |
1611 | if (lenp != TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1612 | ((void *)0)TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1613 | ) | - |
1614 | *executed 209 times by 4 tests: *lenp = len; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
lenp = len;executed 209 times by 4 tests: *lenp = len; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1615 | if (blobp != TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1616 | ((void *)0)TRUE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-209 |
1617 | ) { | - |
1618 | if ((*TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
blobp = malloc(len)) == TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-209 |
1619 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 209 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-209 |
1620 | ) { | - |
1621 | ret = -2; | - |
1622 | goto never executed: goto out; out;never executed: goto out; | 0 |
1623 | } | - |
1624 | memcpy(*blobp, sshbuf_ptr(b), len); | - |
1625 | }executed 209 times by 4 tests: end of block Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1626 | ret = 0; | - |
1627 | out:code before this statement executed 209 times by 4 tests: out: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1628 | sshbuf_free(b); | - |
1629 | returnexecuted 209 times by 4 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
ret;executed 209 times by 4 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 209 |
1630 | } | - |
1631 | | - |
1632 | int | - |
1633 | sshkey_to_blob(const struct sshkey *key, u_char **blobp, size_t *lenp) | - |
1634 | { | - |
1635 | returnexecuted 169 times by 3 tests: return to_blob(key, blobp, lenp, 0, SSHKEY_SERIALIZE_DEFAULT); Executed by:- ssh-keygen
- test_kex
- test_sshkey
to_blob(key, blobp, lenp, 0, SSHKEY_SERIALIZE_DEFAULT);executed 169 times by 3 tests: return to_blob(key, blobp, lenp, 0, SSHKEY_SERIALIZE_DEFAULT); Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 169 |
1636 | } | - |
1637 | | - |
1638 | int | - |
1639 | sshkey_plain_to_blob(const struct sshkey *key, u_char **blobp, size_t *lenp) | - |
1640 | { | - |
1641 | return never executed: return to_blob(key, blobp, lenp, 1, SSHKEY_SERIALIZE_DEFAULT); to_blob(key, blobp, lenp, 1, SSHKEY_SERIALIZE_DEFAULT);never executed: return to_blob(key, blobp, lenp, 1, SSHKEY_SERIALIZE_DEFAULT); | 0 |
1642 | } | - |
1643 | | - |
1644 | int | - |
1645 | sshkey_fingerprint_raw(const struct sshkey *k, int dgst_alg, | - |
1646 | u_char **retp, size_t *lenp) | - |
1647 | { | - |
1648 | u_char *blob = | - |
1649 | ((void *)0) | - |
1650 | , *ret = | - |
1651 | ((void *)0) | - |
1652 | ; | - |
1653 | size_t blob_len = 0; | - |
1654 | int r = -1; | - |
1655 | | - |
1656 | if (retp != TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1657 | ((void *)0)TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1658 | ) | - |
1659 | *executed 40 times by 3 tests: *retp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
retp = executed 40 times by 3 tests: *retp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1660 | ((void *)0)executed 40 times by 3 tests: *retp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1661 | ;executed 40 times by 3 tests: *retp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1662 | if (lenp != TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1663 | ((void *)0)TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1664 | ) | - |
1665 | *executed 40 times by 3 tests: *lenp = 0; Executed by:- ssh-keygen
- sshd
- test_sshkey
lenp = 0;executed 40 times by 3 tests: *lenp = 0; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1666 | if (ssh_digest_bytes(dgst_alg) == 0TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) { | 0-40 |
1667 | r = -10; | - |
1668 | goto never executed: goto out; out;never executed: goto out; | 0 |
1669 | } | - |
1670 | if ((TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
r = to_blob(k, &blob, &blob_len, 1, SSHKEY_SERIALIZE_DEFAULT))TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-40 |
1671 | != 0TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) | 0-40 |
1672 | goto never executed: goto out; out;never executed: goto out; | 0 |
1673 | if ((TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
ret = calloc(1, 64)) == TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-40 |
1674 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-40 |
1675 | ) { | - |
1676 | r = -2; | - |
1677 | goto never executed: goto out; out;never executed: goto out; | 0 |
1678 | } | - |
1679 | if ((TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
r = ssh_digest_memory(dgst_alg, blob, blob_len,TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-40 |
1680 | ret, 64)) != 0TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) | 0-40 |
1681 | goto never executed: goto out; out;never executed: goto out; | 0 |
1682 | | - |
1683 | if (retp != TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1684 | ((void *)0)TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1685 | ) { | - |
1686 | *retp = ret; | - |
1687 | ret = | - |
1688 | ((void *)0) | - |
1689 | ; | - |
1690 | }executed 40 times by 3 tests: end of block Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1691 | if (lenp != TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1692 | ((void *)0)TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1693 | ) | - |
1694 | *executed 40 times by 3 tests: *lenp = ssh_digest_bytes(dgst_alg); Executed by:- ssh-keygen
- sshd
- test_sshkey
lenp = ssh_digest_bytes(dgst_alg);executed 40 times by 3 tests: *lenp = ssh_digest_bytes(dgst_alg); Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1695 | r = 0; | - |
1696 | out:code before this statement executed 40 times by 3 tests: out: Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1697 | free(ret); | - |
1698 | if (blob != TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1699 | ((void *)0)TRUE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-40 |
1700 | ) { | - |
1701 | explicit_bzero(blob, blob_len); | - |
1702 | free(blob); | - |
1703 | }executed 40 times by 3 tests: end of block Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1704 | returnexecuted 40 times by 3 tests: return r; Executed by:- ssh-keygen
- sshd
- test_sshkey
r;executed 40 times by 3 tests: return r; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1705 | } | - |
1706 | | - |
1707 | static char * | - |
1708 | fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len) | - |
1709 | { | - |
1710 | char *ret; | - |
1711 | size_t plen = strlen(alg) + 1; | - |
1712 | size_t rlen = ((dgst_raw_len + 2) / 3) * 4 + plen + 1; | - |
1713 | int r; | - |
1714 | | - |
1715 | if (dgst_raw_len > 65536TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
|| (TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
ret = calloc(1, rlen)) == TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-18 |
1716 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-18 |
1717 | ) | - |
1718 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1719 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1720 | ; never executed: return ((void *)0) ; | 0 |
1721 | strlcpy(ret, alg, rlen); | - |
1722 | strlcat(ret, ":", rlen); | - |
1723 | if (dgst_raw_len == 0TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) | 0-18 |
1724 | return never executed: return ret; ret;never executed: return ret; | 0 |
1725 | if ((TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
r = TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-18 |
1726 | __b64_ntopTRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-18 |
1727 | (dgst_raw,dgst_raw_len,ret + plen,rlen - plen)TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-18 |
1728 | ) == -1TRUE | never evaluated | FALSE | evaluated 18 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) { | 0-18 |
1729 | freezero(ret, rlen); | - |
1730 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1731 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1732 | ; never executed: return ((void *)0) ; | 0 |
1733 | } | - |
1734 | | - |
1735 | ret[ | - |
1736 | __builtin_strcspn ( | - |
1737 | ret | - |
1738 | , | - |
1739 | "=" | - |
1740 | ) | - |
1741 | ] = '\0'; | - |
1742 | returnexecuted 18 times by 3 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_sshkey
ret;executed 18 times by 3 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 18 |
1743 | } | - |
1744 | | - |
1745 | static char * | - |
1746 | fingerprint_hex(const char *alg, u_char *dgst_raw, size_t dgst_raw_len) | - |
1747 | { | - |
1748 | char *retval, hex[5]; | - |
1749 | size_t i, rlen = dgst_raw_len * 3 + strlen(alg) + 2; | - |
1750 | | - |
1751 | if (dgst_raw_len > 65536TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
retval = calloc(1, rlen)) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
1752 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
1753 | ) | - |
1754 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1755 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1756 | ; never executed: return ((void *)0) ; | 0 |
1757 | strlcpy(retval, alg, rlen); | - |
1758 | strlcat(retval, ":", rlen); | - |
1759 | for (i = 0; i < dgst_raw_lenTRUE | evaluated 16 times by 1 test | FALSE | evaluated 1 time by 1 test |
; i++) { | 1-16 |
1760 | snprintf(hex, sizeof(hex), "%s%02x", | - |
1761 | i > 0 ? ":" : "", dgst_raw[i]); | - |
1762 | strlcat(retval, hex, rlen); | - |
1763 | }executed 16 times by 1 test: end of block | 16 |
1764 | returnexecuted 1 time by 1 test: return retval; retval;executed 1 time by 1 test: return retval; | 1 |
1765 | } | - |
1766 | | - |
1767 | static char * | - |
1768 | fingerprint_bubblebabble(u_char *dgst_raw, size_t dgst_raw_len) | - |
1769 | { | - |
1770 | char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' }; | - |
1771 | char consonants[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm', | - |
1772 | 'n', 'p', 'r', 's', 't', 'v', 'z', 'x' }; | - |
1773 | u_int i, j = 0, rounds, seed = 1; | - |
1774 | char *retval; | - |
1775 | | - |
1776 | rounds = (dgst_raw_len / 2) + 1; | - |
1777 | if ((TRUE | never evaluated | FALSE | evaluated 9 times by 2 tests |
retval = calloc(rounds, 6)) == TRUE | never evaluated | FALSE | evaluated 9 times by 2 tests |
| 0-9 |
1778 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9 times by 2 tests |
| 0-9 |
1779 | ) | - |
1780 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1781 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1782 | ; never executed: return ((void *)0) ; | 0 |
1783 | retval[j++] = 'x'; | - |
1784 | for (i = 0; i < roundsTRUE | evaluated 99 times by 2 tests | FALSE | evaluated 9 times by 2 tests |
; i++) { | 9-99 |
1785 | u_int idx0, idx1, idx2, idx3, idx4; | - |
1786 | if ((TRUE | evaluated 90 times by 2 tests | FALSE | evaluated 9 times by 2 tests |
i + 1 < rounds)TRUE | evaluated 90 times by 2 tests | FALSE | evaluated 9 times by 2 tests |
|| (TRUE | never evaluated | FALSE | evaluated 9 times by 2 tests |
dgst_raw_len % 2 != 0)TRUE | never evaluated | FALSE | evaluated 9 times by 2 tests |
) { | 0-90 |
1787 | idx0 = (((((u_int)(dgst_raw[2 * i])) >> 6) & 3) + | - |
1788 | seed) % 6; | - |
1789 | idx1 = (((u_int)(dgst_raw[2 * i])) >> 2) & 15; | - |
1790 | idx2 = ((((u_int)(dgst_raw[2 * i])) & 3) + | - |
1791 | (seed / 6)) % 6; | - |
1792 | retval[j++] = vowels[idx0]; | - |
1793 | retval[j++] = consonants[idx1]; | - |
1794 | retval[j++] = vowels[idx2]; | - |
1795 | if ((TRUE | evaluated 90 times by 2 tests | FALSE | never evaluated |
i + 1) < roundsTRUE | evaluated 90 times by 2 tests | FALSE | never evaluated |
) { | 0-90 |
1796 | idx3 = (((u_int)(dgst_raw[(2 * i) + 1])) >> 4) & 15; | - |
1797 | idx4 = (((u_int)(dgst_raw[(2 * i) + 1]))) & 15; | - |
1798 | retval[j++] = consonants[idx3]; | - |
1799 | retval[j++] = '-'; | - |
1800 | retval[j++] = consonants[idx4]; | - |
1801 | seed = ((seed * 5) + | - |
1802 | ((((u_int)(dgst_raw[2 * i])) * 7) + | - |
1803 | ((u_int)(dgst_raw[(2 * i) + 1])))) % 36; | - |
1804 | }executed 90 times by 2 tests: end of block | 90 |
1805 | }executed 90 times by 2 tests: end of block else { | 90 |
1806 | idx0 = seed % 6; | - |
1807 | idx1 = 16; | - |
1808 | idx2 = seed / 6; | - |
1809 | retval[j++] = vowels[idx0]; | - |
1810 | retval[j++] = consonants[idx1]; | - |
1811 | retval[j++] = vowels[idx2]; | - |
1812 | }executed 9 times by 2 tests: end of block | 9 |
1813 | } | - |
1814 | retval[j++] = 'x'; | - |
1815 | retval[j++] = '\0'; | - |
1816 | returnexecuted 9 times by 2 tests: return retval; retval;executed 9 times by 2 tests: return retval; | 9 |
1817 | } | - |
1818 | static char * | - |
1819 | fingerprint_randomart(const char *alg, u_char *dgst_raw, size_t dgst_raw_len, | - |
1820 | const struct sshkey *k) | - |
1821 | { | - |
1822 | | - |
1823 | | - |
1824 | | - |
1825 | | - |
1826 | char *augmentation_string = " .o+=*BOX@%&#/^SE"; | - |
1827 | char *retval, *p, title[(8 * 2 + 1)], hash[(8 * 2 + 1)]; | - |
1828 | u_char field[(8 * 2 + 1)][(8 + 1)]; | - |
1829 | size_t i, tlen, hlen; | - |
1830 | u_int b; | - |
1831 | int x, y, r; | - |
1832 | size_t len = strlen(augmentation_string) - 1; | - |
1833 | | - |
1834 | if ((TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
retval = calloc(((8 * 2 + 1) + 3), ((8 + 1) + 2))) == TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
| 0-12 |
1835 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
| 0-12 |
1836 | ) | - |
1837 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1838 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1839 | ; never executed: return ((void *)0) ; | 0 |
1840 | | - |
1841 | | - |
1842 | memset(field, 0, (8 * 2 + 1) * (8 + 1) * sizeof(char)); | - |
1843 | x = (8 * 2 + 1) / 2; | - |
1844 | y = (8 + 1) / 2; | - |
1845 | | - |
1846 | | - |
1847 | for (i = 0; i < dgst_raw_lenTRUE | evaluated 368 times by 1 test | FALSE | evaluated 12 times by 1 test |
; i++) { | 12-368 |
1848 | int input; | - |
1849 | | - |
1850 | input = dgst_raw[i]; | - |
1851 | for (b = 0; b < 4TRUE | evaluated 1472 times by 1 test | FALSE | evaluated 368 times by 1 test |
; b++) { | 368-1472 |
1852 | | - |
1853 | x += (TRUE | evaluated 756 times by 1 test | FALSE | evaluated 716 times by 1 test |
input & 0x1)TRUE | evaluated 756 times by 1 test | FALSE | evaluated 716 times by 1 test |
? 1 : -1; | 716-756 |
1854 | y += (TRUE | evaluated 760 times by 1 test | FALSE | evaluated 712 times by 1 test |
input & 0x2)TRUE | evaluated 760 times by 1 test | FALSE | evaluated 712 times by 1 test |
? 1 : -1; | 712-760 |
1855 | | - |
1856 | | - |
1857 | x = (((TRUE | evaluated 1453 times by 1 test | FALSE | evaluated 19 times by 1 test |
x) > (0))TRUE | evaluated 1453 times by 1 test | FALSE | evaluated 19 times by 1 test |
? (x) : (0)); | 19-1453 |
1858 | y = (((TRUE | evaluated 1366 times by 1 test | FALSE | evaluated 106 times by 1 test |
y) > (0))TRUE | evaluated 1366 times by 1 test | FALSE | evaluated 106 times by 1 test |
? (y) : (0)); | 106-1366 |
1859 | x = (((TRUE | evaluated 1407 times by 1 test | FALSE | evaluated 65 times by 1 test |
x) < ((8 * 2 + 1) - 1))TRUE | evaluated 1407 times by 1 test | FALSE | evaluated 65 times by 1 test |
? (x) : ((8 * 2 + 1) - 1)); | 65-1407 |
1860 | y = (((TRUE | evaluated 1306 times by 1 test | FALSE | evaluated 166 times by 1 test |
y) < ((8 + 1) - 1))TRUE | evaluated 1306 times by 1 test | FALSE | evaluated 166 times by 1 test |
? (y) : ((8 + 1) - 1)); | 166-1306 |
1861 | | - |
1862 | | - |
1863 | if (field[x][y] < len - 2TRUE | evaluated 1472 times by 1 test | FALSE | never evaluated |
) | 0-1472 |
1864 | field[x][y]++;executed 1472 times by 1 test: field[x][y]++; | 1472 |
1865 | input = input >> 2; | - |
1866 | }executed 1472 times by 1 test: end of block | 1472 |
1867 | }executed 368 times by 1 test: end of block | 368 |
1868 | | - |
1869 | | - |
1870 | field[(8 * 2 + 1) / 2][(8 + 1) / 2] = len - 1; | - |
1871 | field[x][y] = len; | - |
1872 | | - |
1873 | | - |
1874 | r = snprintf(title, sizeof(title), "[%s %u]", | - |
1875 | sshkey_type(k), sshkey_size(k)); | - |
1876 | | - |
1877 | if (r < 0TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
|| r > (int)sizeof(title)TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
) | 0-12 |
1878 | r = snprintf(title, sizeof(title), "[%s]", sshkey_type(k)); never executed: r = snprintf(title, sizeof(title), "[%s]", sshkey_type(k)); | 0 |
1879 | tlen = (TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
r <= 0)TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
? 0 : strlen(title); | 0-12 |
1880 | | - |
1881 | | - |
1882 | r = snprintf(hash, sizeof(hash), "[%s]", alg); | - |
1883 | hlen = (TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
r <= 0)TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
? 0 : strlen(hash); | 0-12 |
1884 | | - |
1885 | | - |
1886 | p = retval; | - |
1887 | *p++ = '+'; | - |
1888 | for (i = 0; i < ((8 * 2 + 1) - tlen) / 2TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
; i++) | 12-33 |
1889 | *executed 33 times by 1 test: *p++ = '-'; p++ = '-';executed 33 times by 1 test: *p++ = '-'; | 33 |
1890 | memcpy(p, title, tlen); | - |
1891 | p += tlen; | - |
1892 | for (i += tlen; i < (8 * 2 + 1)TRUE | evaluated 40 times by 1 test | FALSE | evaluated 12 times by 1 test |
; i++) | 12-40 |
1893 | *executed 40 times by 1 test: *p++ = '-'; p++ = '-';executed 40 times by 1 test: *p++ = '-'; | 40 |
1894 | *p++ = '+'; | - |
1895 | *p++ = '\n'; | - |
1896 | | - |
1897 | | - |
1898 | for (y = 0; y < (8 + 1)TRUE | evaluated 108 times by 1 test | FALSE | evaluated 12 times by 1 test |
; y++) { | 12-108 |
1899 | *p++ = '|'; | - |
1900 | for (x = 0; x < (8 * 2 + 1)TRUE | evaluated 1836 times by 1 test | FALSE | evaluated 108 times by 1 test |
; x++) | 108-1836 |
1901 | *executed 1836 times by 1 test: *p++ = augmentation_string[(((field[x][y]) < (len)) ? (field[x][y]) : (len))]; p++ = augmentation_string[(((field[x][y]) < (len)) ? (field[x][y]) : (len))];executed 1836 times by 1 test: *p++ = augmentation_string[(((field[x][y]) < (len)) ? (field[x][y]) : (len))]; | 1836 |
1902 | *p++ = '|'; | - |
1903 | *p++ = '\n'; | - |
1904 | }executed 108 times by 1 test: end of block | 108 |
1905 | | - |
1906 | | - |
1907 | *p++ = '+'; | - |
1908 | for (i = 0; i < ((8 * 2 + 1) - hlen) / 2TRUE | evaluated 50 times by 1 test | FALSE | evaluated 12 times by 1 test |
; i++) | 12-50 |
1909 | *executed 50 times by 1 test: *p++ = '-'; p++ = '-';executed 50 times by 1 test: *p++ = '-'; | 50 |
1910 | memcpy(p, hash, hlen); | - |
1911 | p += hlen; | - |
1912 | for (i += hlen; i < (8 * 2 + 1)TRUE | evaluated 61 times by 1 test | FALSE | evaluated 12 times by 1 test |
; i++) | 12-61 |
1913 | *executed 61 times by 1 test: *p++ = '-'; p++ = '-';executed 61 times by 1 test: *p++ = '-'; | 61 |
1914 | *p++ = '+'; | - |
1915 | | - |
1916 | returnexecuted 12 times by 1 test: return retval; retval;executed 12 times by 1 test: return retval; | 12 |
1917 | } | - |
1918 | | - |
1919 | char * | - |
1920 | sshkey_fingerprint(const struct sshkey *k, int dgst_alg, | - |
1921 | enum sshkey_fp_rep dgst_rep) | - |
1922 | { | - |
1923 | char *retval = | - |
1924 | ((void *)0) | - |
1925 | ; | - |
1926 | u_char *dgst_raw; | - |
1927 | size_t dgst_raw_len; | - |
1928 | | - |
1929 | if (sshkey_fingerprint_raw(k, dgst_alg, &dgst_raw, &dgst_raw_len) != 0TRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
) | 0-40 |
1930 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1931 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1932 | ; never executed: return ((void *)0) ; | 0 |
1933 | switch (dgst_rep) { | - |
1934 | caseexecuted 11 times by 2 tests: case SSH_FP_DEFAULT: SSH_FP_DEFAULT:executed 11 times by 2 tests: case SSH_FP_DEFAULT: | 11 |
1935 | if (dgst_alg == 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 10 times by 2 tests |
) { | 1-10 |
1936 | retval = fingerprint_hex(ssh_digest_alg_name(dgst_alg), | - |
1937 | dgst_raw, dgst_raw_len); | - |
1938 | }executed 1 time by 1 test: end of block else { | 1 |
1939 | retval = fingerprint_b64(ssh_digest_alg_name(dgst_alg), | - |
1940 | dgst_raw, dgst_raw_len); | - |
1941 | }executed 10 times by 2 tests: end of block | 10 |
1942 | break;executed 11 times by 2 tests: break; | 11 |
1943 | case never executed: case SSH_FP_HEX: SSH_FP_HEX:never executed: case SSH_FP_HEX: | 0 |
1944 | retval = fingerprint_hex(ssh_digest_alg_name(dgst_alg), | - |
1945 | dgst_raw, dgst_raw_len); | - |
1946 | break; never executed: break; | 0 |
1947 | caseexecuted 8 times by 1 test: case SSH_FP_BASE64: SSH_FP_BASE64:executed 8 times by 1 test: case SSH_FP_BASE64: | 8 |
1948 | retval = fingerprint_b64(ssh_digest_alg_name(dgst_alg), | - |
1949 | dgst_raw, dgst_raw_len); | - |
1950 | break;executed 8 times by 1 test: break; | 8 |
1951 | caseexecuted 9 times by 2 tests: case SSH_FP_BUBBLEBABBLE: SSH_FP_BUBBLEBABBLE:executed 9 times by 2 tests: case SSH_FP_BUBBLEBABBLE: | 9 |
1952 | retval = fingerprint_bubblebabble(dgst_raw, dgst_raw_len); | - |
1953 | break;executed 9 times by 2 tests: break; | 9 |
1954 | caseexecuted 12 times by 1 test: case SSH_FP_RANDOMART: SSH_FP_RANDOMART:executed 12 times by 1 test: case SSH_FP_RANDOMART: | 12 |
1955 | retval = fingerprint_randomart(ssh_digest_alg_name(dgst_alg), | - |
1956 | dgst_raw, dgst_raw_len, k); | - |
1957 | break;executed 12 times by 1 test: break; | 12 |
1958 | default never executed: default: :never executed: default: | 0 |
1959 | explicit_bzero(dgst_raw, dgst_raw_len); | - |
1960 | free(dgst_raw); | - |
1961 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1962 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1963 | ; never executed: return ((void *)0) ; | 0 |
1964 | } | - |
1965 | explicit_bzero(dgst_raw, dgst_raw_len); | - |
1966 | free(dgst_raw); | - |
1967 | returnexecuted 40 times by 3 tests: return retval; Executed by:- ssh-keygen
- sshd
- test_sshkey
retval;executed 40 times by 3 tests: return retval; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 40 |
1968 | } | - |
1969 | | - |
1970 | static int | - |
1971 | peek_type_nid(const char *s, size_t l, int *nid) | - |
1972 | { | - |
1973 | const struct keytype *kt; | - |
1974 | | - |
1975 | for (kt = keytypes; kt->type != -1TRUE | evaluated 3108 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 4 times by 1 test |
; kt++) { | 4-3108 |
1976 | if (kt->name == TRUE | never evaluated | FALSE | evaluated 3108 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-3108 |
1977 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3108 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-3108 |
1978 | || strlen(kt->name) != lTRUE | evaluated 2183 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 925 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) | 925-2183 |
1979 | continue;executed 2183 times by 4 tests: continue; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 2183 |
1980 | if (memcmp(s, kt->name, l) == 0TRUE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 243 times by 3 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_sshkey
|
) { | 243-682 |
1981 | *nid = -1; | - |
1982 | if (kt->type == KEY_ECDSATRUE | evaluated 169 times by 3 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_sshkey
| FALSE | evaluated 513 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
|| kt->type == KEY_ECDSA_CERTTRUE | evaluated 2 times by 1 test | FALSE | evaluated 511 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) | 2-513 |
1983 | *executed 171 times by 3 tests: *nid = kt->nid; Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
nid = kt->nid;executed 171 times by 3 tests: *nid = kt->nid; Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 171 |
1984 | returnexecuted 682 times by 4 tests: return kt->type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
kt->type;executed 682 times by 4 tests: return kt->type; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 682 |
1985 | } | - |
1986 | }executed 243 times by 3 tests: end of block Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 243 |
1987 | returnexecuted 4 times by 1 test: return KEY_UNSPEC; KEY_UNSPEC;executed 4 times by 1 test: return KEY_UNSPEC; | 4 |
1988 | } | - |
1989 | | - |
1990 | | - |
1991 | int | - |
1992 | sshkey_read(struct sshkey *ret, char **cpp) | - |
1993 | { | - |
1994 | struct sshkey *k; | - |
1995 | char *cp, *blobcopy; | - |
1996 | size_t space; | - |
1997 | int r, type, curve_nid = -1; | - |
1998 | struct sshbuf *blob; | - |
1999 | | - |
2000 | if (ret == TRUE | never evaluated | FALSE | evaluated 686 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-686 |
2001 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 686 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-686 |
2002 | ) | - |
2003 | return never executed: return -10; -10;never executed: return -10; | 0 |
2004 | | - |
2005 | switch (ret->type) { | - |
2006 | caseexecuted 686 times by 4 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
KEY_UNSPEC:executed 686 times by 4 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 686 |
2007 | case never executed: case KEY_RSA: KEY_RSA:never executed: case KEY_RSA: | 0 |
2008 | case never executed: case KEY_DSA: KEY_DSA:never executed: case KEY_DSA: | 0 |
2009 | case never executed: case KEY_ECDSA: KEY_ECDSA:never executed: case KEY_ECDSA: | 0 |
2010 | case never executed: case KEY_ED25519: KEY_ED25519:never executed: case KEY_ED25519: | 0 |
2011 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
2012 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
2013 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
2014 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
2015 | | - |
2016 | | - |
2017 | | - |
2018 | | - |
2019 | break;executed 686 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 686 |
2020 | default never executed: default: :never executed: default: | 0 |
2021 | return never executed: return -10; -10;never executed: return -10; | 0 |
2022 | } | - |
2023 | | - |
2024 | | - |
2025 | cp = *cpp; | - |
2026 | space = | - |
2027 | __builtin_strcspn ( | - |
2028 | cp | - |
2029 | , | - |
2030 | " \t" | - |
2031 | ) | - |
2032 | ; | - |
2033 | if (space == strlen(cp)TRUE | never evaluated | FALSE | evaluated 686 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) | 0-686 |
2034 | return never executed: return -4; -4;never executed: return -4; | 0 |
2035 | if ((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
type = peek_type_nid(cp, space, &curve_nid)) == KEY_UNSPECTRUE | evaluated 4 times by 1 test | FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) | 4-682 |
2036 | returnexecuted 4 times by 1 test: return -4; -4;executed 4 times by 1 test: return -4; | 4 |
2037 | | - |
2038 | | - |
2039 | for (cp += space; *TRUE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
cp == ' 'TRUE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
|| *TRUE | never evaluated | FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
cp == '\t'TRUE | never evaluated | FALSE | evaluated 682 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
; cp++) | 0-682 |
2040 | ;executed 682 times by 4 tests: ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 682 |
2041 | if (*TRUE | evaluated 3 times by 1 test | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
cp == '\0'TRUE | evaluated 3 times by 1 test | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) | 3-679 |
2042 | returnexecuted 3 times by 1 test: return -4; -4;executed 3 times by 1 test: return -4; | 3 |
2043 | if (ret->type != KEY_UNSPECTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
&& ret->type != typeTRUE | never evaluated | FALSE | never evaluated |
) | 0-679 |
2044 | return never executed: return -13; -13;never executed: return -13; | 0 |
2045 | if ((TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
blob = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2046 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2047 | ) | - |
2048 | return never executed: return -2; -2;never executed: return -2; | 0 |
2049 | | - |
2050 | | - |
2051 | space = | - |
2052 | __builtin_strcspn ( | - |
2053 | cp | - |
2054 | , | - |
2055 | " \t" | - |
2056 | ) | - |
2057 | ; | - |
2058 | if ((TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
blobcopy = TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2059 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2060 | cpTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2061 | )TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2062 | cpTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2063 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2064 | cpTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2065 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((constTRUE | never evaluated | FALSE | never evaluated |
char *) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2066 | cpTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2067 | ))[0] == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2068 | cpTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2069 | ) + 1; size_t __n = (TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2070 | spaceTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2071 | ); char *__retval; if (__n < __lenTRUE | never evaluated | FALSE | never evaluated |
) __len = __n + 1;never executed: __len = __n + 1; __retval = (char *) malloc (__len); if (__retval != ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
) { __retval[__len - 1] = '\0'; __retval = (char *) memcpy (__retval, TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2072 | cpTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2073 | , __len - 1); } never executed: end of block __retval; })) : __strndup (TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2074 | cpTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2075 | , TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2076 | spaceTRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2077 | )))TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2078 | ) == TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2079 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
| 0-679 |
2080 | ) { | - |
2081 | sshbuf_free(blob); | - |
2082 | return never executed: return -2; -2;never executed: return -2; | 0 |
2083 | } | - |
2084 | if ((TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
r = sshbuf_b64tod(blob, blobcopy)) != 0TRUE | never evaluated | FALSE | evaluated 679 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) { | 0-679 |
2085 | free(blobcopy); | - |
2086 | sshbuf_free(blob); | - |
2087 | return never executed: return r; r;never executed: return r; | 0 |
2088 | } | - |
2089 | free(blobcopy); | - |
2090 | if ((TRUE | evaluated 3 times by 1 test | FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
r = sshkey_fromb(blob, &k)) != 0TRUE | evaluated 3 times by 1 test | FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) { | 3-676 |
2091 | sshbuf_free(blob); | - |
2092 | returnexecuted 3 times by 1 test: return r; r;executed 3 times by 1 test: return r; | 3 |
2093 | } | - |
2094 | sshbuf_free(blob); | - |
2095 | | - |
2096 | | - |
2097 | for (cp += space; *TRUE | evaluated 672 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
cp == ' 'TRUE | evaluated 672 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
|| *TRUE | never evaluated | FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
cp == '\t'TRUE | never evaluated | FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
; cp++) | 0-676 |
2098 | ;executed 672 times by 4 tests: ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 672 |
2099 | | - |
2100 | | - |
2101 | if (k->type != typeTRUE | never evaluated | FALSE | evaluated 676 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) { | 0-676 |
2102 | sshkey_free(k); | - |
2103 | return never executed: return -13; -13;never executed: return -13; | 0 |
2104 | } | - |
2105 | if (sshkey_type_plain(type) == KEY_ECDSATRUE | evaluated 171 times by 3 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_sshkey
| FALSE | evaluated 505 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
&& curve_nid != k->ecdsa_nidTRUE | never evaluated | FALSE | evaluated 171 times by 3 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_sshkey
|
) { | 0-505 |
2106 | sshkey_free(k); | - |
2107 | return never executed: return -15; -15;never executed: return -15; | 0 |
2108 | } | - |
2109 | | - |
2110 | | - |
2111 | ret->type = type; | - |
2112 | if (sshkey_is_cert(ret)TRUE | evaluated 11 times by 1 test | FALSE | evaluated 665 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
|
) { | 11-665 |
2113 | if (!sshkey_is_cert(k)TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) { | 0-11 |
2114 | sshkey_free(k); | - |
2115 | return never executed: return -16; -16;never executed: return -16; | 0 |
2116 | } | - |
2117 | if (ret->cert != TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2118 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2119 | ) | - |
2120 | cert_free(ret->cert); never executed: cert_free(ret->cert); | 0 |
2121 | ret->cert = k->cert; | - |
2122 | k->cert = | - |
2123 | ((void *)0) | - |
2124 | ; | - |
2125 | }executed 11 times by 1 test: end of block | 11 |
2126 | switch (sshkey_type_plain(ret->type)) { | - |
2127 | | - |
2128 | caseexecuted 161 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
KEY_RSA:executed 161 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 161 |
2129 | RSA_free(ret->rsa); | - |
2130 | ret->rsa = k->rsa; | - |
2131 | k->rsa = | - |
2132 | ((void *)0) | - |
2133 | ; | - |
2134 | | - |
2135 | | - |
2136 | | - |
2137 | break;executed 161 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 161 |
2138 | caseexecuted 171 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
KEY_DSA:executed 171 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 171 |
2139 | DSA_free(ret->dsa); | - |
2140 | ret->dsa = k->dsa; | - |
2141 | k->dsa = | - |
2142 | ((void *)0) | - |
2143 | ; | - |
2144 | | - |
2145 | | - |
2146 | | - |
2147 | break;executed 171 times by 3 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 171 |
2148 | | - |
2149 | caseexecuted 171 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
KEY_ECDSA:executed 171 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 171 |
2150 | EC_KEY_free(ret->ecdsa); | - |
2151 | ret->ecdsa = k->ecdsa; | - |
2152 | ret->ecdsa_nid = k->ecdsa_nid; | - |
2153 | k->ecdsa = | - |
2154 | ((void *)0) | - |
2155 | ; | - |
2156 | k->ecdsa_nid = -1; | - |
2157 | | - |
2158 | | - |
2159 | | - |
2160 | break;executed 171 times by 3 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_sshkey
| 171 |
2161 | | - |
2162 | | - |
2163 | caseexecuted 173 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
KEY_ED25519:executed 173 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 173 |
2164 | freezero(ret->ed25519_pk, 32U); | - |
2165 | ret->ed25519_pk = k->ed25519_pk; | - |
2166 | k->ed25519_pk = | - |
2167 | ((void *)0) | - |
2168 | ; | - |
2169 | | - |
2170 | | - |
2171 | | - |
2172 | break;executed 173 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 173 |
2173 | default never executed: default: :never executed: default: | 0 |
2174 | sshkey_free(k); | - |
2175 | return never executed: return -1; -1;never executed: return -1; | 0 |
2176 | } | - |
2177 | sshkey_free(k); | - |
2178 | | - |
2179 | | - |
2180 | *cpp = cp; | - |
2181 | returnexecuted 676 times by 4 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
0;executed 676 times by 4 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 676 |
2182 | } | - |
2183 | | - |
2184 | | - |
2185 | int | - |
2186 | sshkey_to_base64(const struct sshkey *key, char **b64p) | - |
2187 | { | - |
2188 | int r = -1; | - |
2189 | struct sshbuf *b = | - |
2190 | ((void *)0) | - |
2191 | ; | - |
2192 | char *uu = | - |
2193 | ((void *)0) | - |
2194 | ; | - |
2195 | | - |
2196 | if (b64p != TRUE | evaluated 11 times by 1 test | FALSE | never evaluated |
| 0-11 |
2197 | ((void *)0)TRUE | evaluated 11 times by 1 test | FALSE | never evaluated |
| 0-11 |
2198 | ) | - |
2199 | *executed 11 times by 1 test: *b64p = ((void *)0) ; b64p = executed 11 times by 1 test: *b64p = ((void *)0) ; | 11 |
2200 | ((void *)0)executed 11 times by 1 test: *b64p = ((void *)0) ; | 11 |
2201 | ;executed 11 times by 1 test: *b64p = ((void *)0) ; | 11 |
2202 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
b = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2203 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2204 | ) | - |
2205 | return never executed: return -2; -2;never executed: return -2; | 0 |
2206 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
r = sshkey_putb(key, b)) != 0TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
2207 | goto never executed: goto out; out;never executed: goto out; | 0 |
2208 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
uu = sshbuf_dtob64(b)) == TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2209 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2210 | ) { | - |
2211 | r = -2; | - |
2212 | goto never executed: goto out; out;never executed: goto out; | 0 |
2213 | } | - |
2214 | | - |
2215 | if (b64p != TRUE | evaluated 11 times by 1 test | FALSE | never evaluated |
| 0-11 |
2216 | ((void *)0)TRUE | evaluated 11 times by 1 test | FALSE | never evaluated |
| 0-11 |
2217 | ) { | - |
2218 | *b64p = uu; | - |
2219 | uu = | - |
2220 | ((void *)0) | - |
2221 | ; | - |
2222 | }executed 11 times by 1 test: end of block | 11 |
2223 | r = 0; | - |
2224 | out:code before this statement executed 11 times by 1 test: out: | 11 |
2225 | sshbuf_free(b); | - |
2226 | free(uu); | - |
2227 | returnexecuted 11 times by 1 test: return r; r;executed 11 times by 1 test: return r; | 11 |
2228 | } | - |
2229 | | - |
2230 | int | - |
2231 | sshkey_format_text(const struct sshkey *key, struct sshbuf *b) | - |
2232 | { | - |
2233 | int r = -1; | - |
2234 | char *uu = | - |
2235 | ((void *)0) | - |
2236 | ; | - |
2237 | | - |
2238 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
r = sshkey_to_base64(key, &uu)) != 0TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
2239 | goto never executed: goto out; out;never executed: goto out; | 0 |
2240 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
r = sshbuf_putf(b, "%s %s",TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2241 | sshkey_ssh_name(key), uu)) != 0TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
2242 | goto never executed: goto out; out;never executed: goto out; | 0 |
2243 | r = 0; | - |
2244 | out:code before this statement executed 11 times by 1 test: out: | 11 |
2245 | free(uu); | - |
2246 | returnexecuted 11 times by 1 test: return r; r;executed 11 times by 1 test: return r; | 11 |
2247 | } | - |
2248 | | - |
2249 | int | - |
2250 | sshkey_write(const struct sshkey *key, FILE *f) | - |
2251 | { | - |
2252 | struct sshbuf *b = | - |
2253 | ((void *)0) | - |
2254 | ; | - |
2255 | int r = -1; | - |
2256 | | - |
2257 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
b = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2258 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
| 0-11 |
2259 | ) | - |
2260 | return never executed: return -2; -2;never executed: return -2; | 0 |
2261 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
r = sshkey_format_text(key, b)) != 0TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
2262 | goto never executed: goto out; out;never executed: goto out; | 0 |
2263 | if (fwrite(sshbuf_ptr(b), sshbuf_len(b), 1, f) != 1TRUE | never evaluated | FALSE | evaluated 11 times by 1 test |
) { | 0-11 |
2264 | if (feof(f)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
2265 | | - |
2266 | (* never executed: (*__errno_location ()) = 32 ; __errno_location ()) never executed: (*__errno_location ()) = 32 ; | 0 |
2267 | = never executed: (*__errno_location ()) = 32 ; | 0 |
2268 | 32 never executed: (*__errno_location ()) = 32 ; | 0 |
2269 | ; never executed: (*__errno_location ()) = 32 ; | 0 |
2270 | r = -24; | - |
2271 | goto never executed: goto out; out;never executed: goto out; | 0 |
2272 | } | - |
2273 | | - |
2274 | r = 0; | - |
2275 | out:code before this statement executed 11 times by 1 test: out: | 11 |
2276 | sshbuf_free(b); | - |
2277 | returnexecuted 11 times by 1 test: return r; r;executed 11 times by 1 test: return r; | 11 |
2278 | } | - |
2279 | | - |
2280 | const char * | - |
2281 | sshkey_cert_type(const struct sshkey *k) | - |
2282 | { | - |
2283 | switch (k->cert->type) { | - |
2284 | case never executed: case 1: 1:never executed: case 1: | 0 |
2285 | return never executed: return "user"; "user";never executed: return "user"; | 0 |
2286 | case never executed: case 2: 2:never executed: case 2: | 0 |
2287 | return never executed: return "host"; "host";never executed: return "host"; | 0 |
2288 | default never executed: default: :never executed: default: | 0 |
2289 | return never executed: return "unknown"; "unknown";never executed: return "unknown"; | 0 |
2290 | } | - |
2291 | } | - |
2292 | | - |
2293 | | - |
2294 | static int | - |
2295 | rsa_generate_private_key(u_int bits, RSA **rsap) | - |
2296 | { | - |
2297 | RSA *private = | - |
2298 | ((void *)0) | - |
2299 | ; | - |
2300 | BIGNUM *f4 = | - |
2301 | ((void *)0) | - |
2302 | ; | - |
2303 | int ret = -1; | - |
2304 | | - |
2305 | if (rsap == TRUE | never evaluated | FALSE | evaluated 15 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-15 |
2306 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 15 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-15 |
2307 | ) | - |
2308 | return never executed: return -10; -10;never executed: return -10; | 0 |
2309 | if (bits < 1024TRUE | evaluated 2 times by 1 test | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 2-13 |
2310 | bits > (16384 / 8) * 8TRUE | evaluated 1 time by 1 test | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 1-12 |
2311 | returnexecuted 3 times by 1 test: return -56; -56;executed 3 times by 1 test: return -56; | 3 |
2312 | *rsap = | - |
2313 | ((void *)0) | - |
2314 | ; | - |
2315 | if ((privateTRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
= RSA_new()) == TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2316 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2317 | || (TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
f4 = BN_new()) == TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2318 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2319 | ) { | - |
2320 | ret = -2; | - |
2321 | goto never executed: goto out; out;never executed: goto out; | 0 |
2322 | } | - |
2323 | if (!BN_set_word(f4, TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2324 | 0x10001LTRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2325 | )TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| | 0-12 |
2326 | !RSA_generate_key_ex(private, bits, f4, TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2327 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2328 | )TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-12 |
2329 | ret = -22; | - |
2330 | goto never executed: goto out; out;never executed: goto out; | 0 |
2331 | } | - |
2332 | *rsap = private; | - |
2333 | private = | - |
2334 | ((void *)0) | - |
2335 | ; | - |
2336 | ret = 0; | - |
2337 | out:code before this statement executed 12 times by 3 tests: out: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2338 | RSA_free(private); | - |
2339 | BN_free(f4); | - |
2340 | returnexecuted 12 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
ret;executed 12 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2341 | } | - |
2342 | | - |
2343 | static int | - |
2344 | dsa_generate_private_key(u_int bits, DSA **dsap) | - |
2345 | { | - |
2346 | DSA *private; | - |
2347 | int ret = -1; | - |
2348 | | - |
2349 | if (dsap == TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2350 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2351 | ) | - |
2352 | return never executed: return -10; -10;never executed: return -10; | 0 |
2353 | if (bits != 1024TRUE | evaluated 1 time by 1 test | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 1-11 |
2354 | returnexecuted 1 time by 1 test: return -56; -56;executed 1 time by 1 test: return -56; | 1 |
2355 | if ((privateTRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
= DSA_new()) == TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2356 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2357 | ) { | - |
2358 | ret = -2; | - |
2359 | goto never executed: goto out; out;never executed: goto out; | 0 |
2360 | } | - |
2361 | *dsap = | - |
2362 | ((void *)0) | - |
2363 | ; | - |
2364 | if (!DSA_generate_parameters_ex(private, bits, TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2365 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2366 | , 0, TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2367 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2368 | ,TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2369 | TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2370 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2371 | , TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2372 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2373 | )TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| !DSA_generate_key(private)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-11 |
2374 | ret = -22; | - |
2375 | goto never executed: goto out; out;never executed: goto out; | 0 |
2376 | } | - |
2377 | *dsap = private; | - |
2378 | private = | - |
2379 | ((void *)0) | - |
2380 | ; | - |
2381 | ret = 0; | - |
2382 | out:code before this statement executed 11 times by 3 tests: out: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 11 |
2383 | DSA_free(private); | - |
2384 | returnexecuted 11 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
ret;executed 11 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 11 |
2385 | } | - |
2386 | | - |
2387 | | - |
2388 | int | - |
2389 | sshkey_ecdsa_key_to_nid(EC_KEY *k) | - |
2390 | { | - |
2391 | EC_GROUP *eg; | - |
2392 | int nids[] = { | - |
2393 | | - |
2394 | 415 | - |
2395 | , | - |
2396 | | - |
2397 | 715 | - |
2398 | , | - |
2399 | | - |
2400 | | - |
2401 | 716 | - |
2402 | , | - |
2403 | | - |
2404 | -1 | - |
2405 | }; | - |
2406 | int nid; | - |
2407 | u_int i; | - |
2408 | BN_CTX *bnctx; | - |
2409 | const EC_GROUP *g = EC_KEY_get0_group(k); | - |
2410 | if ((TRUE | evaluated 5938 times by 1 test | FALSE | never evaluated |
nid = EC_GROUP_get_curve_name(g)) > 0TRUE | evaluated 5938 times by 1 test | FALSE | never evaluated |
) | 0-5938 |
2411 | returnexecuted 5938 times by 1 test: return nid; nid;executed 5938 times by 1 test: return nid; | 5938 |
2412 | if ((TRUE | never evaluated | FALSE | never evaluated |
bnctx = BN_CTX_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2413 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2414 | ) | - |
2415 | return never executed: return -1; -1;never executed: return -1; | 0 |
2416 | for (i = 0; nids[i] != -1TRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
2417 | if ((TRUE | never evaluated | FALSE | never evaluated |
eg = EC_GROUP_new_by_curve_name(nids[i])) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2418 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2419 | ) { | - |
2420 | BN_CTX_free(bnctx); | - |
2421 | return never executed: return -1; -1;never executed: return -1; | 0 |
2422 | } | - |
2423 | if (EC_GROUP_cmp(g, eg, bnctx) == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
2424 | break; never executed: break; | 0 |
2425 | EC_GROUP_free(eg); | - |
2426 | } never executed: end of block | 0 |
2427 | BN_CTX_free(bnctx); | - |
2428 | if (nids[i] != -1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
2429 | | - |
2430 | EC_GROUP_set_asn1_flag(eg, | - |
2431 | 0x001 | - |
2432 | ); | - |
2433 | if (EC_KEY_set_group(k, eg) != 1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
2434 | EC_GROUP_free(eg); | - |
2435 | return never executed: return -1; -1;never executed: return -1; | 0 |
2436 | } | - |
2437 | } never executed: end of block | 0 |
2438 | return never executed: return nids[i]; nids[i];never executed: return nids[i]; | 0 |
2439 | } | - |
2440 | | - |
2441 | static int | - |
2442 | ecdsa_generate_private_key(u_int bits, int *nid, EC_KEY **ecdsap) | - |
2443 | { | - |
2444 | EC_KEY *private; | - |
2445 | int ret = -1; | - |
2446 | | - |
2447 | if (nid == TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2448 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2449 | || ecdsap == TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2450 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 12 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-12 |
2451 | ) | - |
2452 | return never executed: return -10; -10;never executed: return -10; | 0 |
2453 | if ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
nid = sshkey_ecdsa_bits_to_nid(bits)) == -1TRUE | evaluated 1 time by 1 test | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 1-11 |
2454 | returnexecuted 1 time by 1 test: return -56; -56;executed 1 time by 1 test: return -56; | 1 |
2455 | *ecdsap = | - |
2456 | ((void *)0) | - |
2457 | ; | - |
2458 | if ((privateTRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
= EC_KEY_new_by_curve_name(*nid)) == TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2459 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-11 |
2460 | ) { | - |
2461 | ret = -2; | - |
2462 | goto never executed: goto out; out;never executed: goto out; | 0 |
2463 | } | - |
2464 | if (EC_KEY_generate_key(private) != 1TRUE | never evaluated | FALSE | evaluated 11 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-11 |
2465 | ret = -22; | - |
2466 | goto never executed: goto out; out;never executed: goto out; | 0 |
2467 | } | - |
2468 | EC_KEY_set_asn1_flag(private, | - |
2469 | 0x001 | - |
2470 | ); | - |
2471 | *ecdsap = private; | - |
2472 | private = | - |
2473 | ((void *)0) | - |
2474 | ; | - |
2475 | ret = 0; | - |
2476 | out:code before this statement executed 11 times by 3 tests: out: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 11 |
2477 | EC_KEY_free(private); | - |
2478 | returnexecuted 11 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
ret;executed 11 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 11 |
2479 | } | - |
2480 | | - |
2481 | | - |
2482 | | - |
2483 | int | - |
2484 | sshkey_generate(int type, u_int bits, struct sshkey **keyp) | - |
2485 | { | - |
2486 | struct sshkey *k; | - |
2487 | int ret = -1; | - |
2488 | | - |
2489 | if (keyp == TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
2490 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
2491 | ) | - |
2492 | return never executed: return -10; -10;never executed: return -10; | 0 |
2493 | *keyp = | - |
2494 | ((void *)0) | - |
2495 | ; | - |
2496 | if ((TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
k = sshkey_new(KEY_UNSPEC)) == TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
2497 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 52 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-52 |
2498 | ) | - |
2499 | return never executed: return -2; -2;never executed: return -2; | 0 |
2500 | switch (type) { | - |
2501 | caseexecuted 13 times by 3 tests: case KEY_ED25519: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_ED25519:executed 13 times by 3 tests: case KEY_ED25519: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 13 |
2502 | if ((TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
k->ed25519_pk = malloc(32U)) == TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-13 |
2503 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-13 |
2504 | || | - |
2505 | (TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
k->ed25519_sk = malloc(64U)) == TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-13 |
2506 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 13 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-13 |
2507 | ) { | - |
2508 | ret = -2; | - |
2509 | break; never executed: break; | 0 |
2510 | } | - |
2511 | crypto_sign_ed25519_keypair(k->ed25519_pk, k->ed25519_sk); | - |
2512 | ret = 0; | - |
2513 | break;executed 13 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 13 |
2514 | | - |
2515 | | - |
2516 | | - |
2517 | | - |
2518 | | - |
2519 | | - |
2520 | caseexecuted 12 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_DSA:executed 12 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2521 | ret = dsa_generate_private_key(bits, &k->dsa); | - |
2522 | break;executed 12 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2523 | | - |
2524 | caseexecuted 12 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_ECDSA:executed 12 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2525 | ret = ecdsa_generate_private_key(bits, &k->ecdsa_nid, | - |
2526 | &k->ecdsa); | - |
2527 | break;executed 12 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 12 |
2528 | | - |
2529 | caseexecuted 15 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_RSA:executed 15 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 15 |
2530 | ret = rsa_generate_private_key(bits, &k->rsa); | - |
2531 | break;executed 15 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 15 |
2532 | | - |
2533 | default never executed: default: :never executed: default: | 0 |
2534 | ret = -10; | - |
2535 | } never executed: end of block | 0 |
2536 | if (ret == 0TRUE | evaluated 47 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | evaluated 5 times by 1 test |
) { | 5-47 |
2537 | k->type = type; | - |
2538 | *keyp = k; | - |
2539 | }executed 47 times by 3 tests: end of block Executed by:- ssh-keygen
- test_kex
- test_sshkey
else | 47 |
2540 | sshkey_free(k);executed 5 times by 1 test: sshkey_free(k); | 5 |
2541 | returnexecuted 52 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
ret;executed 52 times by 3 tests: return ret; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 52 |
2542 | } | - |
2543 | | - |
2544 | int | - |
2545 | sshkey_cert_copy(const struct sshkey *from_key, struct sshkey *to_key) | - |
2546 | { | - |
2547 | u_int i; | - |
2548 | const struct sshkey_cert *from; | - |
2549 | struct sshkey_cert *to; | - |
2550 | int r = -1; | - |
2551 | | - |
2552 | if (to_key == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2553 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2554 | || (TRUE | never evaluated | FALSE | never evaluated |
from = from_key->cert) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2555 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2556 | ) | - |
2557 | return never executed: return -10; -10;never executed: return -10; | 0 |
2558 | | - |
2559 | if ((TRUE | never evaluated | FALSE | never evaluated |
to = cert_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2560 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2561 | ) | - |
2562 | return never executed: return -2; -2;never executed: return -2; | 0 |
2563 | | - |
2564 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_putb(to->certblob, from->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
2565 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_putb(to->critical, from->critical)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
2566 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_putb(to->extensions, from->extensions)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
2567 | goto never executed: goto out; out;never executed: goto out; | 0 |
2568 | | - |
2569 | to->serial = from->serial; | - |
2570 | to->type = from->type; | - |
2571 | if (from->key_id == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2572 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2573 | ) | - |
2574 | to->key_id = never executed: to->key_id = ((void *)0) ; | 0 |
2575 | ((void *)0) never executed: to->key_id = ((void *)0) ; | 0 |
2576 | ; never executed: to->key_id = ((void *)0) ; | 0 |
2577 | else if ((TRUE | never evaluated | FALSE | never evaluated |
to->key_id = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2578 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2579 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2580 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2581 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2582 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2583 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2584 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((constTRUE | never evaluated | FALSE | never evaluated |
char *) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2585 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2586 | ))[0] == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2587 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
| 0 |
2588 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
) __retval = (char *) memcpy (__retval, never executed: __retval = (char *) memcpy (__retval, from->key_id , __len); | 0 |
2589 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
never executed: __retval = (char *) memcpy (__retval, from->key_id , __len); | 0 |
2590 | , __len); __retval; })) : __strdup (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2591 | from->key_idTRUE | never evaluated | FALSE | never evaluated |
| 0 |
2592 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2593 | ) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2594 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2595 | ) { | - |
2596 | r = -2; | - |
2597 | goto never executed: goto out; out;never executed: goto out; | 0 |
2598 | } | - |
2599 | to->valid_after = from->valid_after; | - |
2600 | to->valid_before = from->valid_before; | - |
2601 | if (from->signature_key == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2602 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2603 | ) | - |
2604 | to->signature_key = never executed: to->signature_key = ((void *)0) ; | 0 |
2605 | ((void *)0) never executed: to->signature_key = ((void *)0) ; | 0 |
2606 | ; never executed: to->signature_key = ((void *)0) ; | 0 |
2607 | else if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_from_private(from->signature_key,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2608 | &to->signature_key)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
2609 | goto never executed: goto out; out;never executed: goto out; | 0 |
2610 | if (from->signature_type != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2611 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2612 | && | - |
2613 | (TRUE | never evaluated | FALSE | never evaluated |
to->signature_type = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2614 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2615 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2616 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2617 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2618 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2619 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2620 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2621 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2622 | ))[0] == '\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2623 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
2624 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)) __retval = (char *) memcpy (__retval, never executed: __retval = (char *) memcpy (__retval, from->signature_type , __len); | 0 |
2625 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
never executed: __retval = (char *) memcpy (__retval, from->signature_type , __len); | 0 |
2626 | , __len); __retval; })) : __strdup (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2627 | from->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
2628 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2629 | ) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2630 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2631 | ) { | - |
2632 | r = -2; | - |
2633 | goto never executed: goto out; out;never executed: goto out; | 0 |
2634 | } | - |
2635 | if (from->nprincipals > 256TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
2636 | r = -10; | - |
2637 | goto never executed: goto out; out;never executed: goto out; | 0 |
2638 | } | - |
2639 | if (from->nprincipals > 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
2640 | if ((TRUE | never evaluated | FALSE | never evaluated |
to->principals = calloc(from->nprincipals,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2641 | sizeof(*to->principals))) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2642 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2643 | ) { | - |
2644 | r = -2; | - |
2645 | goto never executed: goto out; out;never executed: goto out; | 0 |
2646 | } | - |
2647 | for (i = 0; i < from->nprincipalsTRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
2648 | to->principals[i] = | - |
2649 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2650 | from->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2651 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2652 | from->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2653 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2654 | from->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2655 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((constTRUE | never evaluated | FALSE | never evaluated |
char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2656 | from->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2657 | ))[0] == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen ( | 0 |
2658 | from->principals[i] | - |
2659 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
) __retval = (char *) memcpy (__retval, never executed: __retval = (char *) memcpy (__retval, from->principals[i] , __len); | 0 |
2660 | from->principals[i] never executed: __retval = (char *) memcpy (__retval, from->principals[i] , __len); | 0 |
2661 | , __len); never executed: __retval = (char *) memcpy (__retval, from->principals[i] , __len); __retval; })) : __strdup ( | 0 |
2662 | from->principals[i] | - |
2663 | ))) | - |
2664 | ; | - |
2665 | if (to->principals[i] == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2666 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
2667 | ) { | - |
2668 | to->nprincipals = i; | - |
2669 | r = -2; | - |
2670 | goto never executed: goto out; out;never executed: goto out; | 0 |
2671 | } | - |
2672 | } never executed: end of block | 0 |
2673 | } never executed: end of block | 0 |
2674 | to->nprincipals = from->nprincipals; | - |
2675 | | - |
2676 | | - |
2677 | cert_free(to_key->cert); | - |
2678 | to_key->cert = to; | - |
2679 | to = | - |
2680 | ((void *)0) | - |
2681 | ; | - |
2682 | r = 0; | - |
2683 | out: code before this statement never executed: out: | 0 |
2684 | cert_free(to); | - |
2685 | return never executed: return r; r;never executed: return r; | 0 |
2686 | } | - |
2687 | | - |
2688 | int | - |
2689 | sshkey_from_private(const struct sshkey *k, struct sshkey **pkp) | - |
2690 | { | - |
2691 | struct sshkey *n = | - |
2692 | ((void *)0) | - |
2693 | ; | - |
2694 | int r = -1; | - |
2695 | | - |
2696 | const BIGNUM *rsa_n, *rsa_e; | - |
2697 | BIGNUM *rsa_n_dup = | - |
2698 | ((void *)0) | - |
2699 | , *rsa_e_dup = | - |
2700 | ((void *)0) | - |
2701 | ; | - |
2702 | const BIGNUM *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key; | - |
2703 | BIGNUM *dsa_p_dup = | - |
2704 | ((void *)0) | - |
2705 | , *dsa_q_dup = | - |
2706 | ((void *)0) | - |
2707 | , *dsa_g_dup = | - |
2708 | ((void *)0) | - |
2709 | ; | - |
2710 | BIGNUM *dsa_pub_key_dup = | - |
2711 | ((void *)0) | - |
2712 | ; | - |
2713 | | - |
2714 | | - |
2715 | *pkp = | - |
2716 | ((void *)0) | - |
2717 | ; | - |
2718 | switch (k->type) { | - |
2719 | | - |
2720 | caseexecuted 26 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_DSA:executed 26 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 26 |
2721 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
2722 | if ((TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
n = sshkey_new(k->type)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2723 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2724 | ) { | - |
2725 | r = -2; | - |
2726 | goto never executed: goto out; out;never executed: goto out; | 0 |
2727 | } | - |
2728 | | - |
2729 | DSA_get0_pqg(k->dsa, &dsa_p, &dsa_q, &dsa_g); | - |
2730 | DSA_get0_key(k->dsa, &dsa_pub_key, | - |
2731 | ((void *)0) | - |
2732 | ); | - |
2733 | if ((TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
dsa_p_dup = BN_dup(dsa_p)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2734 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2735 | || | - |
2736 | (TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
dsa_q_dup = BN_dup(dsa_q)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2737 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2738 | || | - |
2739 | (TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
dsa_g_dup = BN_dup(dsa_g)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2740 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2741 | || | - |
2742 | (TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
dsa_pub_key_dup = BN_dup(dsa_pub_key)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2743 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2744 | ) { | - |
2745 | r = -2; | - |
2746 | goto never executed: goto out; out;never executed: goto out; | 0 |
2747 | } | - |
2748 | if (!DSA_set0_pqg(n->dsa, dsa_p_dup, dsa_q_dup, dsa_g_dup)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-26 |
2749 | r = -22; | - |
2750 | goto never executed: goto out; out;never executed: goto out; | 0 |
2751 | } | - |
2752 | dsa_p_dup = dsa_q_dup = dsa_g_dup = | - |
2753 | ((void *)0) | - |
2754 | ; | - |
2755 | if (!DSA_set0_key(n->dsa, dsa_pub_key_dup, TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2756 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2757 | )TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-26 |
2758 | r = -22; | - |
2759 | goto never executed: goto out; out;never executed: goto out; | 0 |
2760 | } | - |
2761 | dsa_pub_key_dup = | - |
2762 | ((void *)0) | - |
2763 | ; | - |
2764 | | - |
2765 | break;executed 26 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 26 |
2766 | | - |
2767 | caseexecuted 26 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_ECDSA:executed 26 times by 3 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 26 |
2768 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
2769 | if ((TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
n = sshkey_new(k->type)) == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2770 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2771 | ) { | - |
2772 | r = -2; | - |
2773 | goto never executed: goto out; out;never executed: goto out; | 0 |
2774 | } | - |
2775 | n->ecdsa_nid = k->ecdsa_nid; | - |
2776 | n->ecdsa = EC_KEY_new_by_curve_name(k->ecdsa_nid); | - |
2777 | if (n->ecdsa == TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2778 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2779 | ) { | - |
2780 | r = -2; | - |
2781 | goto never executed: goto out; out;never executed: goto out; | 0 |
2782 | } | - |
2783 | if (EC_KEY_set_public_key(n->ecdsa,TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-26 |
2784 | EC_KEY_get0_public_key(k->ecdsa)) != 1TRUE | never evaluated | FALSE | evaluated 26 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) { | 0-26 |
2785 | r = -22; | - |
2786 | goto never executed: goto out; out;never executed: goto out; | 0 |
2787 | } | - |
2788 | break;executed 26 times by 3 tests: break; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 26 |
2789 | | - |
2790 | caseexecuted 28 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
KEY_RSA:executed 28 times by 4 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 28 |
2791 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
2792 | if ((TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
n = sshkey_new(k->type)) == TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2793 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2794 | ) { | - |
2795 | r = -2; | - |
2796 | goto never executed: goto out; out;never executed: goto out; | 0 |
2797 | } | - |
2798 | RSA_get0_key(k->rsa, &rsa_n, &rsa_e, | - |
2799 | ((void *)0) | - |
2800 | ); | - |
2801 | if ((TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
rsa_n_dup = BN_dup(rsa_n)) == TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2802 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2803 | || | - |
2804 | (TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
rsa_e_dup = BN_dup(rsa_e)) == TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2805 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2806 | ) { | - |
2807 | r = -2; | - |
2808 | goto never executed: goto out; out;never executed: goto out; | 0 |
2809 | } | - |
2810 | if (!RSA_set0_key(n->rsa, rsa_n_dup, rsa_e_dup, TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2811 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-28 |
2812 | )TRUE | never evaluated | FALSE | evaluated 28 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
) { | 0-28 |
2813 | r = -22; | - |
2814 | goto never executed: goto out; out;never executed: goto out; | 0 |
2815 | } | - |
2816 | rsa_n_dup = rsa_e_dup = | - |
2817 | ((void *)0) | - |
2818 | ; | - |
2819 | break;executed 28 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 28 |
2820 | | - |
2821 | caseexecuted 30 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
KEY_ED25519:executed 30 times by 4 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 30 |
2822 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
2823 | if ((TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
n = sshkey_new(k->type)) == TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-30 |
2824 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-30 |
2825 | ) { | - |
2826 | r = -2; | - |
2827 | goto never executed: goto out; out;never executed: goto out; | 0 |
2828 | } | - |
2829 | if (k->ed25519_pk != TRUE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-30 |
2830 | ((void *)0)TRUE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-30 |
2831 | ) { | - |
2832 | if ((TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
n->ed25519_pk = malloc(32U)) == TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-30 |
2833 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 30 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
| 0-30 |
2834 | ) { | - |
2835 | r = -2; | - |
2836 | goto never executed: goto out; out;never executed: goto out; | 0 |
2837 | } | - |
2838 | memcpy(n->ed25519_pk, k->ed25519_pk, 32U); | - |
2839 | }executed 30 times by 4 tests: end of block Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 30 |
2840 | break;executed 30 times by 4 tests: break; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 30 |
2841 | default never executed: default: :never executed: default: | 0 |
2842 | r = -14; | - |
2843 | goto never executed: goto out; out;never executed: goto out; | 0 |
2844 | } | - |
2845 | if (sshkey_is_cert(k)TRUE | never evaluated | FALSE | evaluated 110 times by 4 testsEvaluated by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
|
&& (TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_cert_copy(k, n)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0-110 |
2846 | goto never executed: goto out; out;never executed: goto out; | 0 |
2847 | | - |
2848 | *pkp = n; | - |
2849 | n = | - |
2850 | ((void *)0) | - |
2851 | ; | - |
2852 | r = 0; | - |
2853 | out:code before this statement executed 110 times by 4 tests: out: Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 110 |
2854 | sshkey_free(n); | - |
2855 | | - |
2856 | BN_clear_free(rsa_n_dup); | - |
2857 | BN_clear_free(rsa_e_dup); | - |
2858 | BN_clear_free(dsa_p_dup); | - |
2859 | BN_clear_free(dsa_q_dup); | - |
2860 | BN_clear_free(dsa_g_dup); | - |
2861 | BN_clear_free(dsa_pub_key_dup); | - |
2862 | | - |
2863 | | - |
2864 | returnexecuted 110 times by 4 tests: return r; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
r;executed 110 times by 4 tests: return r; Executed by:- ssh-keygen
- sshd
- test_kex
- test_sshkey
| 110 |
2865 | } | - |
2866 | | - |
2867 | static int | - |
2868 | cert_parse(struct sshbuf *b, struct sshkey *key, struct sshbuf *certbuf) | - |
2869 | { | - |
2870 | struct sshbuf *principals = | - |
2871 | ((void *)0) | - |
2872 | , *crit = | - |
2873 | ((void *)0) | - |
2874 | ; | - |
2875 | struct sshbuf *exts = | - |
2876 | ((void *)0) | - |
2877 | , *ca = | - |
2878 | ((void *)0) | - |
2879 | ; | - |
2880 | u_char *sig = | - |
2881 | ((void *)0) | - |
2882 | ; | - |
2883 | size_t signed_len = 0, slen = 0, kidlen = 0; | - |
2884 | int ret = -1; | - |
2885 | | - |
2886 | | - |
2887 | if ((TRUE | never evaluated | FALSE | evaluated 15578 times by 1 test |
ret = sshbuf_putb(key->cert->certblob, certbuf)) != 0TRUE | never evaluated | FALSE | evaluated 15578 times by 1 test |
) | 0-15578 |
2888 | return never executed: return ret; ret;never executed: return ret; | 0 |
2889 | | - |
2890 | | - |
2891 | if ((TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15546 times by 1 test |
ret = sshbuf_get_u64(b, &key->cert->serial)) != 0TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15546 times by 1 test |
|| | 32-15546 |
2892 | (TRUE | evaluated 16 times by 1 test | FALSE | evaluated 15530 times by 1 test |
ret = sshbuf_get_u32(b, &key->cert->type)) != 0TRUE | evaluated 16 times by 1 test | FALSE | evaluated 15530 times by 1 test |
|| | 16-15530 |
2893 | (TRUE | evaluated 183 times by 1 test | FALSE | evaluated 15347 times by 1 test |
ret = sshbuf_get_cstring(b, &key->cert->key_id, &kidlen)) != 0TRUE | evaluated 183 times by 1 test | FALSE | evaluated 15347 times by 1 test |
|| | 183-15347 |
2894 | (TRUE | evaluated 213 times by 1 test | FALSE | evaluated 15134 times by 1 test |
ret = sshbuf_froms(b, &principals)) != 0TRUE | evaluated 213 times by 1 test | FALSE | evaluated 15134 times by 1 test |
|| | 213-15134 |
2895 | (TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15102 times by 1 test |
ret = sshbuf_get_u64(b, &key->cert->valid_after)) != 0TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15102 times by 1 test |
|| | 32-15102 |
2896 | (TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15070 times by 1 test |
ret = sshbuf_get_u64(b, &key->cert->valid_before)) != 0TRUE | evaluated 32 times by 1 test | FALSE | evaluated 15070 times by 1 test |
|| | 32-15070 |
2897 | (TRUE | evaluated 147 times by 1 test | FALSE | evaluated 14923 times by 1 test |
ret = sshbuf_froms(b, &crit)) != 0TRUE | evaluated 147 times by 1 test | FALSE | evaluated 14923 times by 1 test |
|| | 147-14923 |
2898 | (TRUE | evaluated 148 times by 1 test | FALSE | evaluated 14775 times by 1 test |
ret = sshbuf_froms(b, &exts)) != 0TRUE | evaluated 148 times by 1 test | FALSE | evaluated 14775 times by 1 test |
|| | 148-14775 |
2899 | (TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
ret = sshbuf_get_string_direct(b, TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
| 144-14631 |
2900 | ((void *)0)TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
| 144-14631 |
2901 | , TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
| 144-14631 |
2902 | ((void *)0)TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
| 144-14631 |
2903 | )) != 0TRUE | evaluated 144 times by 1 test | FALSE | evaluated 14631 times by 1 test |
|| | 144-14631 |
2904 | (TRUE | evaluated 444 times by 1 test | FALSE | evaluated 14187 times by 1 test |
ret = sshbuf_froms(b, &ca)) != 0TRUE | evaluated 444 times by 1 test | FALSE | evaluated 14187 times by 1 test |
) { | 444-14187 |
2905 | | - |
2906 | ret = -4; | - |
2907 | gotoexecuted 1391 times by 1 test: goto out; out;executed 1391 times by 1 test: goto out; | 1391 |
2908 | } | - |
2909 | | - |
2910 | | - |
2911 | signed_len = sshbuf_len(key->cert->certblob) - sshbuf_len(b); | - |
2912 | | - |
2913 | if ((TRUE | evaluated 531 times by 1 test | FALSE | evaluated 13656 times by 1 test |
ret = sshbuf_get_string(b, &sig, &slen)) != 0TRUE | evaluated 531 times by 1 test | FALSE | evaluated 13656 times by 1 test |
) { | 531-13656 |
2914 | ret = -4; | - |
2915 | gotoexecuted 531 times by 1 test: goto out; out;executed 531 times by 1 test: goto out; | 531 |
2916 | } | - |
2917 | | - |
2918 | if (key->cert->type != 1TRUE | evaluated 13652 times by 1 test | FALSE | evaluated 4 times by 1 test |
&& | 4-13652 |
2919 | key->cert->type != 2TRUE | evaluated 144 times by 1 test | FALSE | evaluated 13508 times by 1 test |
) { | 144-13508 |
2920 | ret = -18; | - |
2921 | gotoexecuted 144 times by 1 test: goto out; out;executed 144 times by 1 test: goto out; | 144 |
2922 | } | - |
2923 | | - |
2924 | | - |
2925 | while (sshbuf_len(principals) > 0TRUE | evaluated 26898 times by 1 test | FALSE | evaluated 13224 times by 1 test |
) { | 13224-26898 |
2926 | char *principal = | - |
2927 | ((void *)0) | - |
2928 | ; | - |
2929 | char **oprincipals = | - |
2930 | ((void *)0) | - |
2931 | ; | - |
2932 | | - |
2933 | if (key->cert->nprincipals >= 256TRUE | never evaluated | FALSE | evaluated 26898 times by 1 test |
) { | 0-26898 |
2934 | ret = -4; | - |
2935 | goto never executed: goto out; out;never executed: goto out; | 0 |
2936 | } | - |
2937 | if ((TRUE | evaluated 288 times by 1 test | FALSE | evaluated 26610 times by 1 test |
ret = sshbuf_get_cstring(principals, &principal,TRUE | evaluated 288 times by 1 test | FALSE | evaluated 26610 times by 1 test |
| 288-26610 |
2938 | TRUE | evaluated 288 times by 1 test | FALSE | evaluated 26610 times by 1 test |
| 288-26610 |
2939 | ((void *)0)TRUE | evaluated 288 times by 1 test | FALSE | evaluated 26610 times by 1 test |
| 288-26610 |
2940 | )) != 0TRUE | evaluated 288 times by 1 test | FALSE | evaluated 26610 times by 1 test |
) { | 288-26610 |
2941 | ret = -4; | - |
2942 | gotoexecuted 288 times by 1 test: goto out; out;executed 288 times by 1 test: goto out; | 288 |
2943 | } | - |
2944 | oprincipals = key->cert->principals; | - |
2945 | key->cert->principals = recallocarray(key->cert->principals, | - |
2946 | key->cert->nprincipals, key->cert->nprincipals + 1, | - |
2947 | sizeof(*key->cert->principals)); | - |
2948 | if (key->cert->principals == TRUE | never evaluated | FALSE | evaluated 26610 times by 1 test |
| 0-26610 |
2949 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 26610 times by 1 test |
| 0-26610 |
2950 | ) { | - |
2951 | free(principal); | - |
2952 | key->cert->principals = oprincipals; | - |
2953 | ret = -2; | - |
2954 | goto never executed: goto out; out;never executed: goto out; | 0 |
2955 | } | - |
2956 | key->cert->principals[key->cert->nprincipals++] = principal; | - |
2957 | }executed 26610 times by 1 test: end of block | 26610 |
2958 | | - |
2959 | | - |
2960 | | - |
2961 | | - |
2962 | | - |
2963 | if ((TRUE | never evaluated | FALSE | evaluated 13224 times by 1 test |
ret = sshbuf_putb(key->cert->critical, crit)) != 0TRUE | never evaluated | FALSE | evaluated 13224 times by 1 test |
|| | 0-13224 |
2964 | (exts != TRUE | evaluated 13224 times by 1 test | FALSE | never evaluated |
| 0-13224 |
2965 | ((void *)0)TRUE | evaluated 13224 times by 1 test | FALSE | never evaluated |
| 0-13224 |
2966 | && | - |
2967 | (TRUE | never evaluated | FALSE | evaluated 13224 times by 1 test |
ret = sshbuf_putb(key->cert->extensions, exts)) != 0TRUE | never evaluated | FALSE | evaluated 13224 times by 1 test |
)) | 0-13224 |
2968 | goto never executed: goto out; out;never executed: goto out; | 0 |
2969 | | - |
2970 | | - |
2971 | | - |
2972 | | - |
2973 | while (sshbuf_len(crit) != 0TRUE | evaluated 9 times by 1 test | FALSE | evaluated 13224 times by 1 test |
) { | 9-13224 |
2974 | if ((TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
ret = sshbuf_get_string_direct(crit, TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2975 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2976 | , TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2977 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2978 | )) != 0TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
|| | 0-9 |
2979 | (TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
ret = sshbuf_get_string_direct(crit, TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2980 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2981 | , TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2982 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
| 0-9 |
2983 | )) != 0TRUE | never evaluated | FALSE | evaluated 9 times by 1 test |
) { | 0-9 |
2984 | sshbuf_reset(key->cert->critical); | - |
2985 | ret = -4; | - |
2986 | goto never executed: goto out; out;never executed: goto out; | 0 |
2987 | } | - |
2988 | }executed 9 times by 1 test: end of block | 9 |
2989 | while (exts != TRUE | evaluated 13234 times by 1 test | FALSE | never evaluated |
| 0-13234 |
2990 | ((void *)0)TRUE | evaluated 13234 times by 1 test | FALSE | never evaluated |
| 0-13234 |
2991 | && sshbuf_len(exts) != 0TRUE | evaluated 14 times by 1 test | FALSE | evaluated 13220 times by 1 test |
) { | 14-13220 |
2992 | if ((TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
ret = sshbuf_get_string_direct(exts, TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
| 0-14 |
2993 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
| 0-14 |
2994 | , TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
| 0-14 |
2995 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
| 0-14 |
2996 | )) != 0TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
|| | 0-14 |
2997 | (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
ret = sshbuf_get_string_direct(exts, TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 4-10 |
2998 | ((void *)0)TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 4-10 |
2999 | , TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 4-10 |
3000 | ((void *)0)TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 4-10 |
3001 | )) != 0TRUE | evaluated 4 times by 1 test | FALSE | evaluated 10 times by 1 test |
) { | 4-10 |
3002 | sshbuf_reset(key->cert->extensions); | - |
3003 | ret = -4; | - |
3004 | gotoexecuted 4 times by 1 test: goto out; out;executed 4 times by 1 test: goto out; | 4 |
3005 | } | - |
3006 | }executed 10 times by 1 test: end of block | 10 |
3007 | | - |
3008 | | - |
3009 | if (sshkey_from_blob_internal(ca, &key->cert->signature_key, 0) != 0TRUE | evaluated 1458 times by 1 test | FALSE | evaluated 11762 times by 1 test |
) { | 1458-11762 |
3010 | ret = -19; | - |
3011 | gotoexecuted 1458 times by 1 test: goto out; out;executed 1458 times by 1 test: goto out; | 1458 |
3012 | } | - |
3013 | if (!sshkey_type_is_valid_ca(key->cert->signature_key->type)TRUE | never evaluated | FALSE | evaluated 11762 times by 1 test |
) { | 0-11762 |
3014 | ret = -19; | - |
3015 | goto never executed: goto out; out;never executed: goto out; | 0 |
3016 | } | - |
3017 | if ((TRUE | evaluated 11746 times by 1 test | FALSE | evaluated 16 times by 1 test |
ret = sshkey_verify(key->cert->signature_key, sig, slen,TRUE | evaluated 11746 times by 1 test | FALSE | evaluated 16 times by 1 test |
| 16-11746 |
3018 | sshbuf_ptr(key->cert->certblob), signed_len, TRUE | evaluated 11746 times by 1 test | FALSE | evaluated 16 times by 1 test |
| 16-11746 |
3019 | ((void *)0)TRUE | evaluated 11746 times by 1 test | FALSE | evaluated 16 times by 1 test |
| 16-11746 |
3020 | , 0)) != 0TRUE | evaluated 11746 times by 1 test | FALSE | evaluated 16 times by 1 test |
) | 16-11746 |
3021 | gotoexecuted 11746 times by 1 test: goto out; out;executed 11746 times by 1 test: goto out; | 11746 |
3022 | if ((TRUE | never evaluated | FALSE | evaluated 16 times by 1 test |
ret = get_sigtype(sig, slen, &key->cert->signature_type)) != 0TRUE | never evaluated | FALSE | evaluated 16 times by 1 test |
) | 0-16 |
3023 | goto never executed: goto out; out;never executed: goto out; | 0 |
3024 | | - |
3025 | | - |
3026 | ret = 0; | - |
3027 | out:code before this statement executed 16 times by 1 test: out: | 16 |
3028 | sshbuf_free(ca); | - |
3029 | sshbuf_free(crit); | - |
3030 | sshbuf_free(exts); | - |
3031 | sshbuf_free(principals); | - |
3032 | free(sig); | - |
3033 | returnexecuted 15578 times by 1 test: return ret; ret;executed 15578 times by 1 test: return ret; | 15578 |
3034 | } | - |
3035 | | - |
3036 | | - |
3037 | static int | - |
3038 | check_rsa_length(const RSA *rsa) | - |
3039 | { | - |
3040 | const BIGNUM *rsa_n; | - |
3041 | | - |
3042 | RSA_get0_key(rsa, &rsa_n, | - |
3043 | ((void *)0) | - |
3044 | , | - |
3045 | ((void *)0) | - |
3046 | ); | - |
3047 | if (BN_num_bits(rsa_n) < 1024TRUE | evaluated 14 times by 1 test | FALSE | evaluated 104542 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) | 14-104542 |
3048 | returnexecuted 14 times by 1 test: return -56; -56;executed 14 times by 1 test: return -56; | 14 |
3049 | returnexecuted 104542 times by 5 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
0;executed 104542 times by 5 tests: return 0; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 104542 |
3050 | } | - |
3051 | | - |
3052 | | - |
3053 | static int | - |
3054 | sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp, | - |
3055 | int allow_cert) | - |
3056 | { | - |
3057 | int type, ret = -1; | - |
3058 | char *ktype = | - |
3059 | ((void *)0) | - |
3060 | , *curve = | - |
3061 | ((void *)0) | - |
3062 | , *xmss_name = | - |
3063 | ((void *)0) | - |
3064 | ; | - |
3065 | struct sshkey *key = | - |
3066 | ((void *)0) | - |
3067 | ; | - |
3068 | size_t len; | - |
3069 | u_char *pk = | - |
3070 | ((void *)0) | - |
3071 | ; | - |
3072 | struct sshbuf *copy; | - |
3073 | | - |
3074 | BIGNUM *rsa_n = | - |
3075 | ((void *)0) | - |
3076 | , *rsa_e = | - |
3077 | ((void *)0) | - |
3078 | ; | - |
3079 | BIGNUM *dsa_p = | - |
3080 | ((void *)0) | - |
3081 | , *dsa_q = | - |
3082 | ((void *)0) | - |
3083 | , *dsa_g = | - |
3084 | ((void *)0) | - |
3085 | , *dsa_pub_key = | - |
3086 | ((void *)0) | - |
3087 | ; | - |
3088 | | - |
3089 | EC_POINT *q = | - |
3090 | ((void *)0) | - |
3091 | ; | - |
3092 | | - |
3093 | | - |
3094 | | - |
3095 | | - |
3096 | | - |
3097 | | - |
3098 | if (keyp != TRUE | evaluated 43059 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-43059 |
3099 | ((void *)0)TRUE | evaluated 43059 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-43059 |
3100 | ) | - |
3101 | *executed 43059 times by 5 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
keyp = executed 43059 times by 5 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 43059 |
3102 | ((void *)0)executed 43059 times by 5 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 43059 |
3103 | ;executed 43059 times by 5 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 43059 |
3104 | if ((TRUE | never evaluated | FALSE | evaluated 43059 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
copy = sshbuf_fromb(b)) == TRUE | never evaluated | FALSE | evaluated 43059 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-43059 |
3105 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 43059 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-43059 |
3106 | ) { | - |
3107 | ret = -2; | - |
3108 | goto never executed: goto out; out;never executed: goto out; | 0 |
3109 | } | - |
3110 | if (sshbuf_get_cstring(b, &ktype, TRUE | evaluated 3129 times by 2 tests | FALSE | evaluated 39930 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 3129-39930 |
3111 | ((void *)0)TRUE | evaluated 3129 times by 2 tests | FALSE | evaluated 39930 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 3129-39930 |
3112 | ) != 0TRUE | evaluated 3129 times by 2 tests | FALSE | evaluated 39930 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 3129-39930 |
3113 | ret = -4; | - |
3114 | gotoexecuted 3129 times by 2 tests: goto out; out;executed 3129 times by 2 tests: goto out; | 3129 |
3115 | } | - |
3116 | | - |
3117 | type = sshkey_type_from_name(ktype); | - |
3118 | if (!allow_certTRUE | evaluated 13084 times by 1 test | FALSE | evaluated 26846 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
&& sshkey_type_is_cert(type)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 13083 times by 1 test |
) { | 1-26846 |
3119 | ret = -19; | - |
3120 | gotoexecuted 1 time by 1 test: goto out; out;executed 1 time by 1 test: goto out; | 1 |
3121 | } | - |
3122 | switch (type) { | - |
3123 | | - |
3124 | caseexecuted 3908 times by 1 test: case KEY_RSA_CERT: KEY_RSA_CERT:executed 3908 times by 1 test: case KEY_RSA_CERT: | 3908 |
3125 | | - |
3126 | if (sshbuf_get_string_direct(b, TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3845 times by 1 test |
| 63-3845 |
3127 | ((void *)0)TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3845 times by 1 test |
| 63-3845 |
3128 | , TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3845 times by 1 test |
| 63-3845 |
3129 | ((void *)0)TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3845 times by 1 test |
| 63-3845 |
3130 | ) != 0TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3845 times by 1 test |
) { | 63-3845 |
3131 | ret = -4; | - |
3132 | gotoexecuted 63 times by 1 test: goto out; out;executed 63 times by 1 test: goto out; | 63 |
3133 | } | - |
3134 | | - |
3135 | caseexecuted 1600 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_RSA:executed 1600 times by 5 tests: case KEY_RSA: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
code before this statement executed 3845 times by 1 test: case KEY_RSA: | 1600-3845 |
3136 | if ((TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
key = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3137 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3138 | ) { | - |
3139 | ret = -2; | - |
3140 | goto never executed: goto out; out;never executed: goto out; | 0 |
3141 | } | - |
3142 | if ((TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
rsa_e = BN_new()) == TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3143 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3144 | || | - |
3145 | (TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
rsa_n = BN_new()) == TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3146 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5445 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5445 |
3147 | ) { | - |
3148 | ret = -2; | - |
3149 | goto never executed: goto out; out;never executed: goto out; | 0 |
3150 | } | - |
3151 | if (sshbuf_get_bignum2(b, rsa_e) != 0TRUE | evaluated 82 times by 1 test | FALSE | evaluated 5363 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 82-5363 |
3152 | sshbuf_get_bignum2(b, rsa_n) != 0TRUE | evaluated 348 times by 1 test | FALSE | evaluated 5015 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 348-5015 |
3153 | ret = -4; | - |
3154 | gotoexecuted 430 times by 1 test: goto out; out;executed 430 times by 1 test: goto out; | 430 |
3155 | } | - |
3156 | if (!RSA_set0_key(key->rsa, rsa_n, rsa_e, TRUE | never evaluated | FALSE | evaluated 5015 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5015 |
3157 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5015 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-5015 |
3158 | )TRUE | never evaluated | FALSE | evaluated 5015 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-5015 |
3159 | ret = -22; | - |
3160 | goto never executed: goto out; out;never executed: goto out; | 0 |
3161 | } | - |
3162 | rsa_n = rsa_e = | - |
3163 | ((void *)0) | - |
3164 | ; | - |
3165 | if ((TRUE | evaluated 10 times by 1 test | FALSE | evaluated 5005 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
ret = check_rsa_length(key->rsa)) != 0TRUE | evaluated 10 times by 1 test | FALSE | evaluated 5005 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) | 10-5005 |
3166 | gotoexecuted 10 times by 1 test: goto out; out;executed 10 times by 1 test: goto out; | 10 |
3167 | | - |
3168 | | - |
3169 | | - |
3170 | break;executed 5005 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 5005 |
3171 | caseexecuted 6744 times by 1 test: case KEY_DSA_CERT: KEY_DSA_CERT:executed 6744 times by 1 test: case KEY_DSA_CERT: | 6744 |
3172 | | - |
3173 | if (sshbuf_get_string_direct(b, TRUE | evaluated 62 times by 1 test | FALSE | evaluated 6682 times by 1 test |
| 62-6682 |
3174 | ((void *)0)TRUE | evaluated 62 times by 1 test | FALSE | evaluated 6682 times by 1 test |
| 62-6682 |
3175 | , TRUE | evaluated 62 times by 1 test | FALSE | evaluated 6682 times by 1 test |
| 62-6682 |
3176 | ((void *)0)TRUE | evaluated 62 times by 1 test | FALSE | evaluated 6682 times by 1 test |
| 62-6682 |
3177 | ) != 0TRUE | evaluated 62 times by 1 test | FALSE | evaluated 6682 times by 1 test |
) { | 62-6682 |
3178 | ret = -4; | - |
3179 | gotoexecuted 62 times by 1 test: goto out; out;executed 62 times by 1 test: goto out; | 62 |
3180 | } | - |
3181 | | - |
3182 | caseexecuted 4451 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_DSA:executed 4451 times by 4 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
code before this statement executed 6682 times by 1 test: case KEY_DSA: | 4451-6682 |
3183 | if ((TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
key = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3184 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3185 | ) { | - |
3186 | ret = -2; | - |
3187 | goto never executed: goto out; out;never executed: goto out; | 0 |
3188 | } | - |
3189 | if ((TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
dsa_p = BN_new()) == TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3190 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3191 | || | - |
3192 | (TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
dsa_q = BN_new()) == TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3193 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3194 | || | - |
3195 | (TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
dsa_g = BN_new()) == TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3196 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3197 | || | - |
3198 | (TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
dsa_pub_key = BN_new()) == TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3199 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 11133 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-11133 |
3200 | ) { | - |
3201 | ret = -2; | - |
3202 | goto never executed: goto out; out;never executed: goto out; | 0 |
3203 | } | - |
3204 | if (sshbuf_get_bignum2(b, dsa_p) != 0TRUE | evaluated 333 times by 1 test | FALSE | evaluated 10800 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 333-10800 |
3205 | sshbuf_get_bignum2(b, dsa_q) != 0TRUE | evaluated 126 times by 1 test | FALSE | evaluated 10674 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 126-10674 |
3206 | sshbuf_get_bignum2(b, dsa_g) != 0TRUE | evaluated 343 times by 1 test | FALSE | evaluated 10331 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 343-10331 |
3207 | sshbuf_get_bignum2(b, dsa_pub_key) != 0TRUE | evaluated 349 times by 1 test | FALSE | evaluated 9982 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 349-9982 |
3208 | ret = -4; | - |
3209 | gotoexecuted 1151 times by 1 test: goto out; out;executed 1151 times by 1 test: goto out; | 1151 |
3210 | } | - |
3211 | if (!DSA_set0_pqg(key->dsa, dsa_p, dsa_q, dsa_g)TRUE | never evaluated | FALSE | evaluated 9982 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-9982 |
3212 | ret = -22; | - |
3213 | goto never executed: goto out; out;never executed: goto out; | 0 |
3214 | } | - |
3215 | dsa_p = dsa_q = dsa_g = | - |
3216 | ((void *)0) | - |
3217 | ; | - |
3218 | if (!DSA_set0_key(key->dsa, dsa_pub_key, TRUE | never evaluated | FALSE | evaluated 9982 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-9982 |
3219 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 9982 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-9982 |
3220 | )TRUE | never evaluated | FALSE | evaluated 9982 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-9982 |
3221 | ret = -22; | - |
3222 | goto never executed: goto out; out;never executed: goto out; | 0 |
3223 | } | - |
3224 | dsa_pub_key = | - |
3225 | ((void *)0) | - |
3226 | ; | - |
3227 | | - |
3228 | | - |
3229 | | - |
3230 | break;executed 9982 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 9982 |
3231 | caseexecuted 4014 times by 1 test: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:executed 4014 times by 1 test: case KEY_ECDSA_CERT: | 4014 |
3232 | | - |
3233 | if (sshbuf_get_string_direct(b, TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3951 times by 1 test |
| 63-3951 |
3234 | ((void *)0)TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3951 times by 1 test |
| 63-3951 |
3235 | , TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3951 times by 1 test |
| 63-3951 |
3236 | ((void *)0)TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3951 times by 1 test |
| 63-3951 |
3237 | ) != 0TRUE | evaluated 63 times by 1 test | FALSE | evaluated 3951 times by 1 test |
) { | 63-3951 |
3238 | ret = -4; | - |
3239 | gotoexecuted 63 times by 1 test: goto out; out;executed 63 times by 1 test: goto out; | 63 |
3240 | } | - |
3241 | | - |
3242 | | - |
3243 | caseexecuted 3306 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
KEY_ECDSA:executed 3306 times by 4 tests: case KEY_ECDSA: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
code before this statement executed 3951 times by 1 test: case KEY_ECDSA: | 3306-3951 |
3244 | if ((TRUE | never evaluated | FALSE | evaluated 7257 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
key = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 7257 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-7257 |
3245 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7257 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-7257 |
3246 | ) { | - |
3247 | ret = -2; | - |
3248 | goto never executed: goto out; out;never executed: goto out; | 0 |
3249 | } | - |
3250 | key->ecdsa_nid = sshkey_ecdsa_nid_from_name(ktype); | - |
3251 | if (sshbuf_get_cstring(b, &curve, TRUE | evaluated 137 times by 1 test | FALSE | evaluated 7120 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 137-7120 |
3252 | ((void *)0)TRUE | evaluated 137 times by 1 test | FALSE | evaluated 7120 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 137-7120 |
3253 | ) != 0TRUE | evaluated 137 times by 1 test | FALSE | evaluated 7120 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 137-7120 |
3254 | ret = -4; | - |
3255 | gotoexecuted 137 times by 1 test: goto out; out;executed 137 times by 1 test: goto out; | 137 |
3256 | } | - |
3257 | if (key->ecdsa_nid != sshkey_curve_name_to_nid(curve)TRUE | evaluated 219 times by 1 test | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 219-6901 |
3258 | ret = -15; | - |
3259 | gotoexecuted 219 times by 1 test: goto out; out;executed 219 times by 1 test: goto out; | 219 |
3260 | } | - |
3261 | EC_KEY_free(key->ecdsa); | - |
3262 | if ((TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
key->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid))TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-6901 |
3263 | == TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-6901 |
3264 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-6901 |
3265 | ) { | - |
3266 | ret = -12; | - |
3267 | goto never executed: goto out; out;never executed: goto out; | 0 |
3268 | } | - |
3269 | if ((TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
q = EC_POINT_new(EC_KEY_get0_group(key->ecdsa))) == TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-6901 |
3270 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 6901 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-6901 |
3271 | ) { | - |
3272 | ret = -2; | - |
3273 | goto never executed: goto out; out;never executed: goto out; | 0 |
3274 | } | - |
3275 | if (sshbuf_get_ec(b, q, EC_KEY_get0_group(key->ecdsa)) != 0TRUE | evaluated 2004 times by 1 test | FALSE | evaluated 4897 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 2004-4897 |
3276 | ret = -4; | - |
3277 | gotoexecuted 2004 times by 1 test: goto out; out;executed 2004 times by 1 test: goto out; | 2004 |
3278 | } | - |
3279 | if (sshkey_ec_validate_public(EC_KEY_get0_group(key->ecdsa),TRUE | never evaluated | FALSE | evaluated 4897 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-4897 |
3280 | q) != 0TRUE | never evaluated | FALSE | evaluated 4897 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-4897 |
3281 | ret = -20; | - |
3282 | goto never executed: goto out; out;never executed: goto out; | 0 |
3283 | } | - |
3284 | if (EC_KEY_set_public_key(key->ecdsa, q) != 1TRUE | never evaluated | FALSE | evaluated 4897 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-4897 |
3285 | | - |
3286 | ret = -2; | - |
3287 | goto never executed: goto out; out;never executed: goto out; | 0 |
3288 | } | - |
3289 | | - |
3290 | | - |
3291 | | - |
3292 | break;executed 4897 times by 4 tests: break; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 4897 |
3293 | | - |
3294 | | - |
3295 | caseexecuted 2865 times by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 2865 times by 1 test: case KEY_ED25519_CERT: | 2865 |
3296 | | - |
3297 | if (sshbuf_get_string_direct(b, TRUE | evaluated 64 times by 1 test | FALSE | evaluated 2801 times by 1 test |
| 64-2801 |
3298 | ((void *)0)TRUE | evaluated 64 times by 1 test | FALSE | evaluated 2801 times by 1 test |
| 64-2801 |
3299 | , TRUE | evaluated 64 times by 1 test | FALSE | evaluated 2801 times by 1 test |
| 64-2801 |
3300 | ((void *)0)TRUE | evaluated 64 times by 1 test | FALSE | evaluated 2801 times by 1 test |
| 64-2801 |
3301 | ) != 0TRUE | evaluated 64 times by 1 test | FALSE | evaluated 2801 times by 1 test |
) { | 64-2801 |
3302 | ret = -4; | - |
3303 | gotoexecuted 64 times by 1 test: goto out; out;executed 64 times by 1 test: goto out; | 64 |
3304 | } | - |
3305 | | - |
3306 | caseexecuted 10895 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
KEY_ED25519:executed 10895 times by 5 tests: case KEY_ED25519: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
code before this statement executed 2801 times by 1 test: case KEY_ED25519: | 2801-10895 |
3307 | if ((TRUE | evaluated 248 times by 1 test | FALSE | evaluated 13448 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
ret = sshbuf_get_string(b, &pk, &len)) != 0TRUE | evaluated 248 times by 1 test | FALSE | evaluated 13448 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) | 248-13448 |
3308 | gotoexecuted 248 times by 1 test: goto out; out;executed 248 times by 1 test: goto out; | 248 |
3309 | if (len != 32UTRUE | evaluated 16 times by 1 test | FALSE | evaluated 13432 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 16-13432 |
3310 | ret = -4; | - |
3311 | gotoexecuted 16 times by 1 test: goto out; out;executed 16 times by 1 test: goto out; | 16 |
3312 | } | - |
3313 | if ((TRUE | never evaluated | FALSE | evaluated 13432 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
key = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 13432 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13432 |
3314 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 13432 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-13432 |
3315 | ) { | - |
3316 | ret = -2; | - |
3317 | goto never executed: goto out; out;never executed: goto out; | 0 |
3318 | } | - |
3319 | key->ed25519_pk = pk; | - |
3320 | pk = | - |
3321 | ((void *)0) | - |
3322 | ; | - |
3323 | break;executed 13432 times by 5 tests: break; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 13432 |
3324 | caseexecuted 2146 times by 1 test: case KEY_UNSPEC: KEY_UNSPEC:executed 2146 times by 1 test: case KEY_UNSPEC: | 2146 |
3325 | default never executed: default: :never executed: default: | 0 |
3326 | ret = -14; | - |
3327 | gotoexecuted 2146 times by 1 test: goto out; out;executed 2146 times by 1 test: goto out; | 2146 |
3328 | } | - |
3329 | | - |
3330 | | - |
3331 | if (sshkey_is_cert(key)TRUE | evaluated 15578 times by 1 test | FALSE | evaluated 17738 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
&& (TRUE | evaluated 15562 times by 1 test | FALSE | evaluated 16 times by 1 test |
ret = cert_parse(b, key, copy)) != 0TRUE | evaluated 15562 times by 1 test | FALSE | evaluated 16 times by 1 test |
) | 16-17738 |
3332 | gotoexecuted 15562 times by 1 test: goto out; out;executed 15562 times by 1 test: goto out; | 15562 |
3333 | | - |
3334 | if (key != TRUE | evaluated 17754 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-17754 |
3335 | ((void *)0)TRUE | evaluated 17754 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-17754 |
3336 | && sshbuf_len(b) != 0TRUE | evaluated 11 times by 1 test | FALSE | evaluated 17743 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 11-17743 |
3337 | ret = -4; | - |
3338 | gotoexecuted 11 times by 1 test: goto out; out;executed 11 times by 1 test: goto out; | 11 |
3339 | } | - |
3340 | ret = 0; | - |
3341 | if (keyp != TRUE | evaluated 17743 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-17743 |
3342 | ((void *)0)TRUE | evaluated 17743 times by 5 testsEvaluated by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-17743 |
3343 | ) { | - |
3344 | *keyp = key; | - |
3345 | key = | - |
3346 | ((void *)0) | - |
3347 | ; | - |
3348 | }executed 17743 times by 5 tests: end of block Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 17743 |
3349 | out:code before this statement executed 17743 times by 5 tests: out: Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 17743 |
3350 | sshbuf_free(copy); | - |
3351 | sshkey_free(key); | - |
3352 | free(xmss_name); | - |
3353 | free(ktype); | - |
3354 | free(curve); | - |
3355 | free(pk); | - |
3356 | | - |
3357 | BN_clear_free(rsa_n); | - |
3358 | BN_clear_free(rsa_e); | - |
3359 | BN_clear_free(dsa_p); | - |
3360 | BN_clear_free(dsa_q); | - |
3361 | BN_clear_free(dsa_g); | - |
3362 | BN_clear_free(dsa_pub_key); | - |
3363 | | - |
3364 | EC_POINT_free(q); | - |
3365 | | - |
3366 | | - |
3367 | returnexecuted 43059 times by 5 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
ret;executed 43059 times by 5 tests: return ret; Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_kex
- test_sshkey
| 43059 |
3368 | } | - |
3369 | | - |
3370 | int | - |
3371 | sshkey_from_blob(const u_char *blob, size_t blen, struct sshkey **keyp) | - |
3372 | { | - |
3373 | struct sshbuf *b; | - |
3374 | int r; | - |
3375 | | - |
3376 | if ((TRUE | never evaluated | FALSE | evaluated 29160 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
b = sshbuf_from(blob, blen)) == TRUE | never evaluated | FALSE | evaluated 29160 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-29160 |
3377 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 29160 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
| 0-29160 |
3378 | ) | - |
3379 | return never executed: return -2; -2;never executed: return -2; | 0 |
3380 | r = sshkey_from_blob_internal(b, keyp, 1); | - |
3381 | sshbuf_free(b); | - |
3382 | returnexecuted 29160 times by 3 tests: return r; Executed by:- ssh-keygen
- test_kex
- test_sshkey
r;executed 29160 times by 3 tests: return r; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 29160 |
3383 | } | - |
3384 | | - |
3385 | int | - |
3386 | sshkey_fromb(struct sshbuf *b, struct sshkey **keyp) | - |
3387 | { | - |
3388 | returnexecuted 679 times by 4 tests: return sshkey_from_blob_internal(b, keyp, 1); Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
sshkey_from_blob_internal(b, keyp, 1);executed 679 times by 4 tests: return sshkey_from_blob_internal(b, keyp, 1); Executed by:- ssh-keygen
- sshd
- test_hostkeys
- test_sshkey
| 679 |
3389 | } | - |
3390 | | - |
3391 | int | - |
3392 | sshkey_froms(struct sshbuf *buf, struct sshkey **keyp) | - |
3393 | { | - |
3394 | struct sshbuf *b; | - |
3395 | int r; | - |
3396 | | - |
3397 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_froms(buf, &b)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3398 | return never executed: return r; r;never executed: return r; | 0 |
3399 | r = sshkey_from_blob_internal(b, keyp, 1); | - |
3400 | sshbuf_free(b); | - |
3401 | return never executed: return r; r;never executed: return r; | 0 |
3402 | } | - |
3403 | | - |
3404 | static int | - |
3405 | get_sigtype(const u_char *sig, size_t siglen, char **sigtypep) | - |
3406 | { | - |
3407 | int r; | - |
3408 | struct sshbuf *b = | - |
3409 | ((void *)0) | - |
3410 | ; | - |
3411 | char *sigtype = | - |
3412 | ((void *)0) | - |
3413 | ; | - |
3414 | | - |
3415 | if (sigtypep != TRUE | evaluated 17 times by 1 test | FALSE | never evaluated |
| 0-17 |
3416 | ((void *)0)TRUE | evaluated 17 times by 1 test | FALSE | never evaluated |
| 0-17 |
3417 | ) | - |
3418 | *executed 17 times by 1 test: *sigtypep = ((void *)0) ; sigtypep = executed 17 times by 1 test: *sigtypep = ((void *)0) ; | 17 |
3419 | ((void *)0)executed 17 times by 1 test: *sigtypep = ((void *)0) ; | 17 |
3420 | ;executed 17 times by 1 test: *sigtypep = ((void *)0) ; | 17 |
3421 | if ((TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
b = sshbuf_from(sig, siglen)) == TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
| 0-17 |
3422 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
| 0-17 |
3423 | ) | - |
3424 | return never executed: return -2; -2;never executed: return -2; | 0 |
3425 | if ((TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
r = sshbuf_get_cstring(b, &sigtype, TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
| 0-17 |
3426 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
| 0-17 |
3427 | )) != 0TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
) | 0-17 |
3428 | goto never executed: goto out; out;never executed: goto out; | 0 |
3429 | | - |
3430 | if (sigtypep != TRUE | evaluated 17 times by 1 test | FALSE | never evaluated |
| 0-17 |
3431 | ((void *)0)TRUE | evaluated 17 times by 1 test | FALSE | never evaluated |
| 0-17 |
3432 | ) { | - |
3433 | *sigtypep = sigtype; | - |
3434 | sigtype = | - |
3435 | ((void *)0) | - |
3436 | ; | - |
3437 | }executed 17 times by 1 test: end of block | 17 |
3438 | r = 0; | - |
3439 | out:code before this statement executed 17 times by 1 test: out: | 17 |
3440 | free(sigtype); | - |
3441 | sshbuf_free(b); | - |
3442 | returnexecuted 17 times by 1 test: return r; r;executed 17 times by 1 test: return r; | 17 |
3443 | } | - |
3444 | int | - |
3445 | sshkey_check_cert_sigtype(const struct sshkey *key, const char *allowed) | - |
3446 | { | - |
3447 | if (key == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3448 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3449 | || allowed == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3450 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3451 | ) | - |
3452 | return never executed: return -10; -10;never executed: return -10; | 0 |
3453 | if (!sshkey_type_is_cert(key->type)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3454 | return never executed: return 0; 0;never executed: return 0; | 0 |
3455 | if (key->cert == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3456 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3457 | || key->cert->signature_type == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3458 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3459 | ) | - |
3460 | return never executed: return -10; -10;never executed: return -10; | 0 |
3461 | if (match_pattern_list(key->cert->signature_type, allowed, 0) != 1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3462 | return never executed: return -58; -58;never executed: return -58; | 0 |
3463 | return never executed: return 0; 0;never executed: return 0; | 0 |
3464 | } | - |
3465 | | - |
3466 | | - |
3467 | | - |
3468 | | - |
3469 | const char * | - |
3470 | sshkey_sigalg_by_name(const char *name) | - |
3471 | { | - |
3472 | const struct keytype *kt; | - |
3473 | | - |
3474 | for (kt = keytypes; kt->type != -1TRUE | never evaluated | FALSE | never evaluated |
; kt++) { | 0 |
3475 | if ( | - |
3476 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3477 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3478 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3479 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3480 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3481 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3482 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3483 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3484 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3485 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3486 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3487 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3488 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3489 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3490 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3491 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3492 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3493 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3494 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3495 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3496 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3497 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3498 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3499 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3500 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3501 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3502 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3503 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3504 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3505 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3506 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3507 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3508 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3509 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3510 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3511 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3512 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3513 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3514 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3515 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3516 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3517 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3518 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3519 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3520 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3521 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3522 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); | 0 |
3523 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( kt->name ))[3] - __s2[3]); | 0 |
3524 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3525 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3526 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3527 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3528 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3529 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3530 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3531 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3532 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3533 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3534 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3535 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3536 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3537 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3538 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3539 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3540 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3541 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3542 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3543 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3544 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3545 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3546 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3547 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3548 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3549 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3550 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
3551 | nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
3552 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3553 | kt->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3554 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3555 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3556 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3557 | != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3558 | continue; never executed: continue; | 0 |
3559 | if (kt->sigalg != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3560 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3561 | ) | - |
3562 | return never executed: return kt->sigalg; kt->sigalg;never executed: return kt->sigalg; | 0 |
3563 | if (!kt->certTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3564 | return never executed: return kt->name; kt->name;never executed: return kt->name; | 0 |
3565 | return never executed: return sshkey_ssh_name_from_type_nid( sshkey_type_plain(kt->type), kt->nid); sshkey_ssh_name_from_type_nid(never executed: return sshkey_ssh_name_from_type_nid( sshkey_type_plain(kt->type), kt->nid); | 0 |
3566 | sshkey_type_plain(kt->type), kt->nid); never executed: return sshkey_ssh_name_from_type_nid( sshkey_type_plain(kt->type), kt->nid); | 0 |
3567 | } | - |
3568 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
3569 | ((void *)0) never executed: return ((void *)0) ; | 0 |
3570 | ; never executed: return ((void *)0) ; | 0 |
3571 | } | - |
3572 | | - |
3573 | | - |
3574 | | - |
3575 | | - |
3576 | | - |
3577 | int | - |
3578 | sshkey_check_sigtype(const u_char *sig, size_t siglen, | - |
3579 | const char *requested_alg) | - |
3580 | { | - |
3581 | const char *expected_alg; | - |
3582 | char *sigtype = | - |
3583 | ((void *)0) | - |
3584 | ; | - |
3585 | int r; | - |
3586 | | - |
3587 | if (requested_alg == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3588 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3589 | ) | - |
3590 | return never executed: return 0; 0;never executed: return 0; | 0 |
3591 | if ((TRUE | never evaluated | FALSE | never evaluated |
expected_alg = sshkey_sigalg_by_name(requested_alg)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3592 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3593 | ) | - |
3594 | return never executed: return -10; -10;never executed: return -10; | 0 |
3595 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = get_sigtype(sig, siglen, &sigtype)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3596 | return never executed: return r; r;never executed: return r; | 0 |
3597 | r = | - |
3598 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( | - |
3599 | expected_alg | - |
3600 | ) && __builtin_constant_p ( | - |
3601 | sigtype | - |
3602 | ) && (__s1_len = __builtin_strlen ( | - |
3603 | expected_alg | - |
3604 | ), __s2_len = __builtin_strlen ( | - |
3605 | sigtype | - |
3606 | ), (!((size_t)(const void *)(( | - |
3607 | expected_alg | - |
3608 | ) + 1) - (size_t)(const void *)( | - |
3609 | expected_alg | - |
3610 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( | - |
3611 | sigtype | - |
3612 | ) + 1) - (size_t)(const void *)( | - |
3613 | sigtype | - |
3614 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( | - |
3615 | expected_alg | - |
3616 | , | - |
3617 | sigtype | - |
3618 | ) : (__builtin_constant_p ( | - |
3619 | expected_alg | - |
3620 | ) && ((size_t)(const void *)(( | - |
3621 | expected_alg | - |
3622 | ) + 1) - (size_t)(const void *)( | - |
3623 | expected_alg | - |
3624 | ) == 1) && (__s1_len = __builtin_strlen ( | - |
3625 | expected_alg | - |
3626 | ), __s1_len < 4) ? (__builtin_constant_p ( | - |
3627 | sigtype | - |
3628 | ) && ((size_t)(const void *)(( | - |
3629 | sigtype | - |
3630 | ) + 1) - (size_t)(const void *)( | - |
3631 | sigtype | - |
3632 | ) == 1) ? __builtin_strcmp ( | - |
3633 | expected_alg | - |
3634 | , | - |
3635 | sigtype | - |
3636 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
3637 | sigtype | - |
3638 | ); int __result = (((const unsigned char *) (const char *) ( | - |
3639 | expected_alg | - |
3640 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
3641 | expected_alg | - |
3642 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
3643 | expected_alg | - |
3644 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( expected_alg ))[3] - __s2[3]); | 0 |
3645 | expected_alg never executed: __result = (((const unsigned char *) (const char *) ( expected_alg ))[3] - __s2[3]); | 0 |
3646 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( expected_alg ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p ( | 0 |
3647 | sigtype | - |
3648 | ) && ((size_t)(const void *)(( | - |
3649 | sigtype | - |
3650 | ) + 1) - (size_t)(const void *)( | - |
3651 | sigtype | - |
3652 | ) == 1) && (__s2_len = __builtin_strlen ( | - |
3653 | sigtype | - |
3654 | ), __s2_len < 4) ? (__builtin_constant_p ( | - |
3655 | expected_alg | - |
3656 | ) && ((size_t)(const void *)(( | - |
3657 | expected_alg | - |
3658 | ) + 1) - (size_t)(const void *)( | - |
3659 | expected_alg | - |
3660 | ) == 1) ? __builtin_strcmp ( | - |
3661 | expected_alg | - |
3662 | , | - |
3663 | sigtype | - |
3664 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
3665 | expected_alg | - |
3666 | ); int __result = (((const unsigned char *) (const char *) ( | - |
3667 | sigtype | - |
3668 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
3669 | sigtype | - |
3670 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
3671 | sigtype | - |
3672 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( sigtype ))[3] - __s2[3]); | 0 |
3673 | sigtype never executed: __result = (((const unsigned char *) (const char *) ( sigtype ))[3] - __s2[3]); | 0 |
3674 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( sigtype ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp ( | 0 |
3675 | expected_alg | - |
3676 | , | - |
3677 | sigtype | - |
3678 | )))); }) | - |
3679 | == 0; | - |
3680 | free(sigtype); | - |
3681 | return never executed: return r ? 0 : -58; rTRUE | never evaluated | FALSE | never evaluated |
? 0 : -58;never executed: return r ? 0 : -58; | 0 |
3682 | } | - |
3683 | | - |
3684 | int | - |
3685 | sshkey_sign(const struct sshkey *key, | - |
3686 | u_char **sigp, size_t *lenp, | - |
3687 | const u_char *data, size_t datalen, const char *alg, u_int compat) | - |
3688 | { | - |
3689 | if (sigp != TRUE | evaluated 310 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-310 |
3690 | ((void *)0)TRUE | evaluated 310 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-310 |
3691 | ) | - |
3692 | *executed 310 times by 3 tests: *sigp = ((void *)0) ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
sigp = executed 310 times by 3 tests: *sigp = ((void *)0) ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 310 |
3693 | ((void *)0)executed 310 times by 3 tests: *sigp = ((void *)0) ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 310 |
3694 | ;executed 310 times by 3 tests: *sigp = ((void *)0) ; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 310 |
3695 | if (lenp != TRUE | evaluated 310 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-310 |
3696 | ((void *)0)TRUE | evaluated 310 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
| FALSE | never evaluated |
| 0-310 |
3697 | ) | - |
3698 | *executed 310 times by 3 tests: *lenp = 0; Executed by:- ssh-keygen
- test_kex
- test_sshkey
lenp = 0;executed 310 times by 3 tests: *lenp = 0; Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 310 |
3699 | if (datalen > (1 << 20)TRUE | never evaluated | FALSE | evaluated 310 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 0-310 |
3700 | return never executed: return -10; -10;never executed: return -10; | 0 |
3701 | switch (key->type) { | - |
3702 | | - |
3703 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
3704 | caseexecuted 65 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_DSA:executed 65 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 65 |
3705 | returnexecuted 65 times by 3 tests: return ssh_dss_sign(key, sigp, lenp, data, datalen, compat); Executed by:- ssh-keygen
- test_kex
- test_sshkey
ssh_dss_sign(key, sigp, lenp, data, datalen, compat);executed 65 times by 3 tests: return ssh_dss_sign(key, sigp, lenp, data, datalen, compat); Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 65 |
3706 | | - |
3707 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
3708 | caseexecuted 64 times by 2 tests: case KEY_ECDSA: KEY_ECDSA:executed 64 times by 2 tests: case KEY_ECDSA: | 64 |
3709 | returnexecuted 64 times by 2 tests: return ssh_ecdsa_sign(key, sigp, lenp, data, datalen, compat); ssh_ecdsa_sign(key, sigp, lenp, data, datalen, compat);executed 64 times by 2 tests: return ssh_ecdsa_sign(key, sigp, lenp, data, datalen, compat); | 64 |
3710 | | - |
3711 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
3712 | caseexecuted 116 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_RSA:executed 116 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 116 |
3713 | returnexecuted 116 times by 3 tests: return ssh_rsa_sign(key, sigp, lenp, data, datalen, alg); Executed by:- ssh-keygen
- test_kex
- test_sshkey
ssh_rsa_sign(key, sigp, lenp, data, datalen, alg);executed 116 times by 3 tests: return ssh_rsa_sign(key, sigp, lenp, data, datalen, alg); Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 116 |
3714 | | - |
3715 | caseexecuted 65 times by 2 tests: case KEY_ED25519: KEY_ED25519:executed 65 times by 2 tests: case KEY_ED25519: | 65 |
3716 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
3717 | returnexecuted 65 times by 2 tests: return ssh_ed25519_sign(key, sigp, lenp, data, datalen, compat); ssh_ed25519_sign(key, sigp, lenp, data, datalen, compat);executed 65 times by 2 tests: return ssh_ed25519_sign(key, sigp, lenp, data, datalen, compat); | 65 |
3718 | | - |
3719 | | - |
3720 | | - |
3721 | | - |
3722 | | - |
3723 | default never executed: default: :never executed: default: | 0 |
3724 | return never executed: return -14; -14;never executed: return -14; | 0 |
3725 | } | - |
3726 | } | - |
3727 | | - |
3728 | | - |
3729 | | - |
3730 | | - |
3731 | | - |
3732 | int | - |
3733 | sshkey_verify(const struct sshkey *key, | - |
3734 | const u_char *sig, size_t siglen, | - |
3735 | const u_char *data, size_t dlen, const char *alg, u_int compat) | - |
3736 | { | - |
3737 | if (siglen == 0TRUE | evaluated 6 times by 1 test | FALSE | evaluated 103275 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
|| dlen > (1 << 20)TRUE | never evaluated | FALSE | evaluated 103275 times by 3 testsEvaluated by:- ssh-keygen
- test_kex
- test_sshkey
|
) | 0-103275 |
3738 | returnexecuted 6 times by 1 test: return -10; -10;executed 6 times by 1 test: return -10; | 6 |
3739 | switch (key->type) { | - |
3740 | | - |
3741 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
3742 | caseexecuted 3684 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_DSA:executed 3684 times by 3 tests: case KEY_DSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 3684 |
3743 | returnexecuted 3684 times by 3 tests: return ssh_dss_verify(key, sig, siglen, data, dlen, compat); Executed by:- ssh-keygen
- test_kex
- test_sshkey
ssh_dss_verify(key, sig, siglen, data, dlen, compat);executed 3684 times by 3 tests: return ssh_dss_verify(key, sig, siglen, data, dlen, compat); Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 3684 |
3744 | | - |
3745 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
3746 | caseexecuted 12662 times by 2 tests: case KEY_ECDSA: KEY_ECDSA:executed 12662 times by 2 tests: case KEY_ECDSA: | 12662 |
3747 | returnexecuted 12662 times by 2 tests: return ssh_ecdsa_verify(key, sig, siglen, data, dlen, compat); ssh_ecdsa_verify(key, sig, siglen, data, dlen, compat);executed 12662 times by 2 tests: return ssh_ecdsa_verify(key, sig, siglen, data, dlen, compat); | 12662 |
3748 | | - |
3749 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
3750 | caseexecuted 68896 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
KEY_RSA:executed 68896 times by 3 tests: case KEY_RSA: Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 68896 |
3751 | returnexecuted 68896 times by 3 tests: return ssh_rsa_verify(key, sig, siglen, data, dlen, alg); Executed by:- ssh-keygen
- test_kex
- test_sshkey
ssh_rsa_verify(key, sig, siglen, data, dlen, alg);executed 68896 times by 3 tests: return ssh_rsa_verify(key, sig, siglen, data, dlen, alg); Executed by:- ssh-keygen
- test_kex
- test_sshkey
| 68896 |
3752 | | - |
3753 | caseexecuted 18033 times by 2 tests: case KEY_ED25519: KEY_ED25519:executed 18033 times by 2 tests: case KEY_ED25519: | 18033 |
3754 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
3755 | returnexecuted 18033 times by 2 tests: return ssh_ed25519_verify(key, sig, siglen, data, dlen, compat); ssh_ed25519_verify(key, sig, siglen, data, dlen, compat);executed 18033 times by 2 tests: return ssh_ed25519_verify(key, sig, siglen, data, dlen, compat); | 18033 |
3756 | | - |
3757 | | - |
3758 | | - |
3759 | | - |
3760 | | - |
3761 | default never executed: default: :never executed: default: | 0 |
3762 | return never executed: return -14; -14;never executed: return -14; | 0 |
3763 | } | - |
3764 | } | - |
3765 | | - |
3766 | | - |
3767 | int | - |
3768 | sshkey_to_certified(struct sshkey *k) | - |
3769 | { | - |
3770 | int newtype; | - |
3771 | | - |
3772 | switch (k->type) { | - |
3773 | | - |
3774 | case never executed: case KEY_RSA: KEY_RSA:never executed: case KEY_RSA: | 0 |
3775 | newtype = KEY_RSA_CERT; | - |
3776 | break; never executed: break; | 0 |
3777 | case never executed: case KEY_DSA: KEY_DSA:never executed: case KEY_DSA: | 0 |
3778 | newtype = KEY_DSA_CERT; | - |
3779 | break; never executed: break; | 0 |
3780 | case never executed: case KEY_ECDSA: KEY_ECDSA:never executed: case KEY_ECDSA: | 0 |
3781 | newtype = KEY_ECDSA_CERT; | - |
3782 | break; never executed: break; | 0 |
3783 | | - |
3784 | caseexecuted 1 time by 1 test: case KEY_ED25519: KEY_ED25519:executed 1 time by 1 test: case KEY_ED25519: | 1 |
3785 | newtype = KEY_ED25519_CERT; | - |
3786 | break;executed 1 time by 1 test: break; | 1 |
3787 | | - |
3788 | | - |
3789 | | - |
3790 | | - |
3791 | | - |
3792 | default never executed: default: :never executed: default: | 0 |
3793 | return never executed: return -10; -10;never executed: return -10; | 0 |
3794 | } | - |
3795 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
k->cert = cert_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3796 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3797 | ) | - |
3798 | return never executed: return -2; -2;never executed: return -2; | 0 |
3799 | k->type = newtype; | - |
3800 | returnexecuted 1 time by 1 test: return 0; 0;executed 1 time by 1 test: return 0; | 1 |
3801 | } | - |
3802 | | - |
3803 | | - |
3804 | int | - |
3805 | sshkey_drop_cert(struct sshkey *k) | - |
3806 | { | - |
3807 | if (!sshkey_type_is_cert(k->type)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3808 | return never executed: return -14; -14;never executed: return -14; | 0 |
3809 | cert_free(k->cert); | - |
3810 | k->cert = | - |
3811 | ((void *)0) | - |
3812 | ; | - |
3813 | k->type = sshkey_type_plain(k->type); | - |
3814 | return never executed: return 0; 0;never executed: return 0; | 0 |
3815 | } | - |
3816 | | - |
3817 | | - |
3818 | int | - |
3819 | sshkey_certify_custom(struct sshkey *k, struct sshkey *ca, const char *alg, | - |
3820 | sshkey_certify_signer *signer, void *signer_ctx) | - |
3821 | { | - |
3822 | struct sshbuf *principals = | - |
3823 | ((void *)0) | - |
3824 | ; | - |
3825 | u_char *ca_blob = | - |
3826 | ((void *)0) | - |
3827 | , *sig_blob = | - |
3828 | ((void *)0) | - |
3829 | , nonce[32]; | - |
3830 | size_t i, ca_len, sig_len; | - |
3831 | int ret = -1; | - |
3832 | struct sshbuf *cert = | - |
3833 | ((void *)0) | - |
3834 | ; | - |
3835 | char *sigtype = | - |
3836 | ((void *)0) | - |
3837 | ; | - |
3838 | | - |
3839 | const BIGNUM *rsa_n, *rsa_e, *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key; | - |
3840 | | - |
3841 | | - |
3842 | if (k == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3843 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3844 | || k->cert == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3845 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3846 | || | - |
3847 | k->cert->certblob == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3848 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3849 | || ca == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3850 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
3851 | ) | - |
3852 | return never executed: return -10; -10;never executed: return -10; | 0 |
3853 | if (!sshkey_is_cert(k)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
3854 | return never executed: return -14; -14;never executed: return -14; | 0 |
3855 | if (!sshkey_type_is_valid_ca(ca->type)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
3856 | return never executed: return -19; -19;never executed: return -19; | 0 |
3857 | | - |
3858 | | - |
3859 | | - |
3860 | | - |
3861 | | - |
3862 | if (alg == TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
3863 | ((void *)0)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
3864 | ) | - |
3865 | alg = k->cert->signature_type;executed 1 time by 1 test: alg = k->cert->signature_type; | 1 |
3866 | else if (k->cert->signature_type != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3867 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3868 | && | - |
3869 | | - |
3870 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3871 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3872 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3873 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3874 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3875 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3876 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3877 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3878 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3879 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3880 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3881 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3882 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3883 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3884 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3885 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3886 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3887 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3888 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3889 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3890 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3891 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3892 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3893 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3894 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3895 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3896 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3897 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3898 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3899 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3900 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3901 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3902 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3903 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3904 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3905 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3906 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3907 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3908 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3909 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3910 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3911 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3912 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3913 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3914 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3915 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3916 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( alg ))[3] - __s2[3]); | 0 |
3917 | algTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( alg ))[3] - __s2[3]); | 0 |
3918 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3919 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3920 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3921 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3922 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3923 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3924 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3925 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3926 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3927 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3928 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3929 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3930 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3931 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3932 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3933 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3934 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3935 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3936 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3937 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3938 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3939 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3940 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3941 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3942 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3943 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3944 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( k->cert->signature_type ))[3] - __s2[3]); | 0 |
3945 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( k->cert->signature_type ))[3] - __s2[3]); | 0 |
3946 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3947 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3948 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3949 | k->cert->signature_typeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
3950 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3951 | != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3952 | return never executed: return -10; -10;never executed: return -10; | 0 |
3953 | | - |
3954 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshkey_to_blob(ca, &ca_blob, &ca_len)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
3955 | return never executed: return -19; -19;never executed: return -19; | 0 |
3956 | | - |
3957 | cert = k->cert->certblob; | - |
3958 | sshbuf_reset(cert); | - |
3959 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_cstring(cert, sshkey_ssh_name(k))) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
3960 | goto never executed: goto out; out;never executed: goto out; | 0 |
3961 | | - |
3962 | | - |
3963 | arc4random_buf(&nonce, sizeof(nonce)); | - |
3964 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_string(cert, nonce, sizeof(nonce))) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
3965 | goto never executed: goto out; out;never executed: goto out; | 0 |
3966 | | - |
3967 | | - |
3968 | switch (k->type) { | - |
3969 | | - |
3970 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
3971 | DSA_get0_pqg(k->dsa, &dsa_p, &dsa_q, &dsa_g); | - |
3972 | DSA_get0_key(k->dsa, &dsa_pub_key, | - |
3973 | ((void *)0) | - |
3974 | ); | - |
3975 | if ((TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, dsa_p)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
3976 | (TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, dsa_q)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
3977 | (TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, dsa_g)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
3978 | (TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, dsa_pub_key)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3979 | goto never executed: goto out; out;never executed: goto out; | 0 |
3980 | break; never executed: break; | 0 |
3981 | | - |
3982 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
3983 | if ((TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_cstring(cert,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3984 | sshkey_curve_nid_to_name(k->ecdsa_nid))) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
3985 | (TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_ec(cert,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3986 | EC_KEY_get0_public_key(k->ecdsa),TRUE | never evaluated | FALSE | never evaluated |
| 0 |
3987 | EC_KEY_get0_group(k->ecdsa))) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3988 | goto never executed: goto out; out;never executed: goto out; | 0 |
3989 | break; never executed: break; | 0 |
3990 | | - |
3991 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
3992 | RSA_get0_key(k->rsa, &rsa_n, &rsa_e, | - |
3993 | ((void *)0) | - |
3994 | ); | - |
3995 | if ((TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, rsa_e)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
3996 | (TRUE | never evaluated | FALSE | never evaluated |
ret = sshbuf_put_bignum2(cert, rsa_n)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
3997 | goto never executed: goto out; out;never executed: goto out; | 0 |
3998 | break; never executed: break; | 0 |
3999 | | - |
4000 | caseexecuted 1 time by 1 test: case KEY_ED25519_CERT: KEY_ED25519_CERT:executed 1 time by 1 test: case KEY_ED25519_CERT: | 1 |
4001 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_string(cert,TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4002 | k->ed25519_pk, 32U)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4003 | goto never executed: goto out; out;never executed: goto out; | 0 |
4004 | break;executed 1 time by 1 test: break; | 1 |
4005 | default never executed: default: :never executed: default: | 0 |
4006 | ret = -10; | - |
4007 | goto never executed: goto out; out;never executed: goto out; | 0 |
4008 | } | - |
4009 | | - |
4010 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_u64(cert, k->cert->serial)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4011 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_u32(cert, k->cert->type)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4012 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_cstring(cert, k->cert->key_id)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4013 | goto never executed: goto out; out;never executed: goto out; | 0 |
4014 | | - |
4015 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
principals = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4016 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4017 | ) { | - |
4018 | ret = -2; | - |
4019 | goto never executed: goto out; out;never executed: goto out; | 0 |
4020 | } | - |
4021 | for (i = 0; i < k->cert->nprincipalsTRUE | evaluated 4 times by 1 test | FALSE | evaluated 1 time by 1 test |
; i++) { | 1-4 |
4022 | if ((TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
ret = sshbuf_put_cstring(principals,TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
4023 | k->cert->principals[i])) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) | 0-4 |
4024 | goto never executed: goto out; out;never executed: goto out; | 0 |
4025 | }executed 4 times by 1 test: end of block | 4 |
4026 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_stringb(cert, principals)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4027 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_u64(cert, k->cert->valid_after)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4028 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_u64(cert, k->cert->valid_before)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4029 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_stringb(cert, k->cert->critical)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4030 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_stringb(cert, k->cert->extensions)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4031 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_string(cert, TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4032 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4033 | , 0)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4034 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_string(cert, ca_blob, ca_len)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4035 | goto never executed: goto out; out;never executed: goto out; | 0 |
4036 | | - |
4037 | | - |
4038 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = signer(ca, &sig_blob, &sig_len, sshbuf_ptr(cert),TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4039 | sshbuf_len(cert), alg, 0, signer_ctx)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4040 | goto never executed: goto out; out;never executed: goto out; | 0 |
4041 | | - |
4042 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = get_sigtype(sig_blob, sig_len, &sigtype)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4043 | goto never executed: goto out; out;never executed: goto out; | 0 |
4044 | if (alg != TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4045 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4046 | && | - |
4047 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4048 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4049 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4050 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4051 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4052 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4053 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4054 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4055 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4056 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4057 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4058 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4059 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4060 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4061 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4062 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4063 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4064 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4065 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4066 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4067 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4068 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4069 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4070 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4071 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4072 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4073 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4074 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4075 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4076 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4077 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4078 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4079 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4080 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4081 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4082 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4083 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4084 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4085 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4086 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4087 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4088 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4089 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4090 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4091 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4092 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4093 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( alg ))[3] - __s2[3]); | 0 |
4094 | algTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( alg ))[3] - __s2[3]); | 0 |
4095 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4096 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4097 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4098 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4099 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4100 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4101 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4102 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4103 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4104 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4105 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4106 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4107 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4108 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4109 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4110 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4111 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4112 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4113 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4114 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4115 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4116 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4117 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4118 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4119 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4120 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4121 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( sigtype ))[3] - __s2[3]); | 0 |
4122 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( sigtype ))[3] - __s2[3]); | 0 |
4123 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4124 | algTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4125 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4126 | sigtypeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4127 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4128 | != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4129 | ret = -58; | - |
4130 | goto never executed: goto out; out;never executed: goto out; | 0 |
4131 | } | - |
4132 | if (k->cert->signature_type == TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
4133 | ((void *)0)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
4134 | ) { | - |
4135 | k->cert->signature_type = sigtype; | - |
4136 | sigtype = | - |
4137 | ((void *)0) | - |
4138 | ; | - |
4139 | }executed 1 time by 1 test: end of block | 1 |
4140 | | - |
4141 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ret = sshbuf_put_string(cert, sig_blob, sig_len)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4142 | goto never executed: goto out; out;never executed: goto out; | 0 |
4143 | ret = 0; | - |
4144 | out:code before this statement executed 1 time by 1 test: out: | 1 |
4145 | if (ret != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4146 | sshbuf_reset(cert); never executed: sshbuf_reset(cert); | 0 |
4147 | free(sig_blob); | - |
4148 | free(ca_blob); | - |
4149 | free(sigtype); | - |
4150 | sshbuf_free(principals); | - |
4151 | returnexecuted 1 time by 1 test: return ret; ret;executed 1 time by 1 test: return ret; | 1 |
4152 | } | - |
4153 | | - |
4154 | static int | - |
4155 | default_key_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, | - |
4156 | const u_char *data, size_t datalen, | - |
4157 | const char *alg, u_int compat, void *ctx) | - |
4158 | { | - |
4159 | if (ctx != TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4160 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4161 | ) | - |
4162 | return never executed: return -10; -10;never executed: return -10; | 0 |
4163 | returnexecuted 1 time by 1 test: return sshkey_sign(key, sigp, lenp, data, datalen, alg, compat); sshkey_sign(key, sigp, lenp, data, datalen, alg, compat);executed 1 time by 1 test: return sshkey_sign(key, sigp, lenp, data, datalen, alg, compat); | 1 |
4164 | } | - |
4165 | | - |
4166 | int | - |
4167 | sshkey_certify(struct sshkey *k, struct sshkey *ca, const char *alg) | - |
4168 | { | - |
4169 | returnexecuted 1 time by 1 test: return sshkey_certify_custom(k, ca, alg, default_key_sign, ((void *)0) ); sshkey_certify_custom(k, ca, alg, default_key_sign, executed 1 time by 1 test: return sshkey_certify_custom(k, ca, alg, default_key_sign, ((void *)0) ); | 1 |
4170 | ((void *)0)executed 1 time by 1 test: return sshkey_certify_custom(k, ca, alg, default_key_sign, ((void *)0) ); | 1 |
4171 | );executed 1 time by 1 test: return sshkey_certify_custom(k, ca, alg, default_key_sign, ((void *)0) ); | 1 |
4172 | } | - |
4173 | | - |
4174 | int | - |
4175 | sshkey_cert_check_authority(const struct sshkey *k, | - |
4176 | int want_host, int require_principal, | - |
4177 | const char *name, const char **reason) | - |
4178 | { | - |
4179 | u_int i, principal_matches; | - |
4180 | time_t now = time( | - |
4181 | ((void *)0) | - |
4182 | ); | - |
4183 | | - |
4184 | if (reason != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4185 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4186 | ) | - |
4187 | * never executed: *reason = ((void *)0) ; reason = never executed: *reason = ((void *)0) ; | 0 |
4188 | ((void *)0) never executed: *reason = ((void *)0) ; | 0 |
4189 | ; never executed: *reason = ((void *)0) ; | 0 |
4190 | | - |
4191 | if (want_hostTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4192 | if (k->cert->type != 2TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4193 | *reason = "Certificate invalid: not a host certificate"; | - |
4194 | return never executed: return -25; -25;never executed: return -25; | 0 |
4195 | } | - |
4196 | } never executed: end of block else { | 0 |
4197 | if (k->cert->type != 1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4198 | *reason = "Certificate invalid: not a user certificate"; | - |
4199 | return never executed: return -25; -25;never executed: return -25; | 0 |
4200 | } | - |
4201 | } never executed: end of block | 0 |
4202 | if (now < 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4203 | | - |
4204 | *reason = "Certificate invalid: not yet valid"; | - |
4205 | return never executed: return -25; -25;never executed: return -25; | 0 |
4206 | } | - |
4207 | if ((TRUE | never evaluated | FALSE | never evaluated |
u_int64_t)now < k->cert->valid_afterTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4208 | *reason = "Certificate invalid: not yet valid"; | - |
4209 | return never executed: return -25; -25;never executed: return -25; | 0 |
4210 | } | - |
4211 | if ((TRUE | never evaluated | FALSE | never evaluated |
u_int64_t)now >= k->cert->valid_beforeTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4212 | *reason = "Certificate invalid: expired"; | - |
4213 | return never executed: return -25; -25;never executed: return -25; | 0 |
4214 | } | - |
4215 | if (k->cert->nprincipals == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4216 | if (require_principalTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4217 | *reason = "Certificate lacks principal list"; | - |
4218 | return never executed: return -25; -25;never executed: return -25; | 0 |
4219 | } | - |
4220 | } never executed: end of block else if (name != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4221 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4222 | ) { | - |
4223 | principal_matches = 0; | - |
4224 | for (i = 0; i < k->cert->nprincipalsTRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
4225 | if ( | - |
4226 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4227 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4228 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4229 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4230 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4231 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4232 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4233 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4234 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4235 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4236 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4237 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4238 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4239 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4240 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4241 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4242 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4243 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4244 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4245 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4246 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4247 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4248 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4249 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4250 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4251 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4252 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4253 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4254 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4255 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4256 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4257 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4258 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4259 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4260 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4261 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4262 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4263 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4264 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4265 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4266 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4267 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4268 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4269 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4270 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4271 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4272 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
4273 | nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
4274 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4275 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4276 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4277 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4278 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4279 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4280 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4281 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4282 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4283 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4284 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4285 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4286 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4287 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4288 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4289 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4290 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4291 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4292 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4293 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4294 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4295 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4296 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4297 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4298 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4299 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4300 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( k->cert->principals[i] ))[3] - __s2[3]); | 0 |
4301 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( k->cert->principals[i] ))[3] - __s2[3]); | 0 |
4302 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4303 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
4304 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4305 | k->cert->principals[i]TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4306 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4307 | == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4308 | principal_matches = 1; | - |
4309 | break; never executed: break; | 0 |
4310 | } | - |
4311 | } never executed: end of block | 0 |
4312 | if (!principal_matchesTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4313 | *reason = "Certificate invalid: name is not a listed " | - |
4314 | "principal"; | - |
4315 | return never executed: return -25; -25;never executed: return -25; | 0 |
4316 | } | - |
4317 | } never executed: end of block | 0 |
4318 | return never executed: return 0; 0;never executed: return 0; | 0 |
4319 | } | - |
4320 | | - |
4321 | size_t | - |
4322 | sshkey_format_cert_validity(const struct sshkey_cert *cert, char *s, size_t l) | - |
4323 | { | - |
4324 | char from[32], to[32], ret[64]; | - |
4325 | time_t tt; | - |
4326 | struct tm *tm; | - |
4327 | | - |
4328 | *from = *to = '\0'; | - |
4329 | if (cert->valid_after == 0TRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
4330 | cert->valid_before == 0xffffffffffffffffULLTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4331 | return never executed: return strlcpy(s, "forever", l); strlcpy(s, "forever", l);never executed: return strlcpy(s, "forever", l); | 0 |
4332 | | - |
4333 | if (cert->valid_after != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4334 | | - |
4335 | tt = cert->valid_after > 0x7fffffffTRUE | never evaluated | FALSE | never evaluated |
? | 0 |
4336 | 0x7fffffff : cert->valid_after; | - |
4337 | tm = localtime(&tt); | - |
4338 | strftime(from, sizeof(from), "%Y-%m-%dT%H:%M:%S", tm); | - |
4339 | } never executed: end of block | 0 |
4340 | if (cert->valid_before != 0xffffffffffffffffULLTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4341 | | - |
4342 | tt = cert->valid_before > 0x7fffffffTRUE | never evaluated | FALSE | never evaluated |
? | 0 |
4343 | 0x7fffffff : cert->valid_before; | - |
4344 | tm = localtime(&tt); | - |
4345 | strftime(to, sizeof(to), "%Y-%m-%dT%H:%M:%S", tm); | - |
4346 | } never executed: end of block | 0 |
4347 | | - |
4348 | if (cert->valid_after == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4349 | snprintf(ret, sizeof(ret), "before %s", to); never executed: snprintf(ret, sizeof(ret), "before %s", to); | 0 |
4350 | else if (cert->valid_before == 0xffffffffffffffffULLTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4351 | snprintf(ret, sizeof(ret), "after %s", from); never executed: snprintf(ret, sizeof(ret), "after %s", from); | 0 |
4352 | else | - |
4353 | snprintf(ret, sizeof(ret), "from %s to %s", from, to); never executed: snprintf(ret, sizeof(ret), "from %s to %s", from, to); | 0 |
4354 | | - |
4355 | return never executed: return strlcpy(s, ret, l); strlcpy(s, ret, l);never executed: return strlcpy(s, ret, l); | 0 |
4356 | } | - |
4357 | | - |
4358 | int | - |
4359 | sshkey_private_serialize_opt(const struct sshkey *key, struct sshbuf *b, | - |
4360 | enum sshkey_serialize_rep opts) | - |
4361 | { | - |
4362 | int r = -1; | - |
4363 | | - |
4364 | const BIGNUM *rsa_n, *rsa_e, *rsa_d, *rsa_iqmp, *rsa_p, *rsa_q; | - |
4365 | const BIGNUM *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key, *dsa_priv_key; | - |
4366 | | - |
4367 | | - |
4368 | if ((TRUE | never evaluated | FALSE | evaluated 11 times by 2 tests |
r = sshbuf_put_cstring(b, sshkey_ssh_name(key))) != 0TRUE | never evaluated | FALSE | evaluated 11 times by 2 tests |
) | 0-11 |
4369 | goto never executed: goto out; out;never executed: goto out; | 0 |
4370 | switch (key->type) { | - |
4371 | | - |
4372 | caseexecuted 4 times by 2 tests: case KEY_RSA: KEY_RSA:executed 4 times by 2 tests: case KEY_RSA: | 4 |
4373 | RSA_get0_key(key->rsa, &rsa_n, &rsa_e, &rsa_d); | - |
4374 | RSA_get0_factors(key->rsa, &rsa_p, &rsa_q); | - |
4375 | RSA_get0_crt_params(key->rsa, | - |
4376 | ((void *)0) | - |
4377 | , | - |
4378 | ((void *)0) | - |
4379 | , &rsa_iqmp); | - |
4380 | if ((TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_n)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
|| | 0-4 |
4381 | (TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_e)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
|| | 0-4 |
4382 | (TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_d)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
|| | 0-4 |
4383 | (TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
|| | 0-4 |
4384 | (TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_p)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
|| | 0-4 |
4385 | (TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
r = sshbuf_put_bignum2(b, rsa_q)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 2 tests |
) | 0-4 |
4386 | goto never executed: goto out; out;never executed: goto out; | 0 |
4387 | break;executed 4 times by 2 tests: break; | 4 |
4388 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
4389 | if (key->cert == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4390 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4391 | || sshbuf_len(key->cert->certblob) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4392 | r = -10; | - |
4393 | goto never executed: goto out; out;never executed: goto out; | 0 |
4394 | } | - |
4395 | RSA_get0_key(key->rsa, | - |
4396 | ((void *)0) | - |
4397 | , | - |
4398 | ((void *)0) | - |
4399 | , &rsa_d); | - |
4400 | RSA_get0_factors(key->rsa, &rsa_p, &rsa_q); | - |
4401 | RSA_get0_crt_params(key->rsa, | - |
4402 | ((void *)0) | - |
4403 | , | - |
4404 | ((void *)0) | - |
4405 | , &rsa_iqmp); | - |
4406 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_stringb(b, key->cert->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4407 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b, rsa_d)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4408 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4409 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b, rsa_p)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4410 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b, rsa_q)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4411 | goto never executed: goto out; out;never executed: goto out; | 0 |
4412 | break; never executed: break; | 0 |
4413 | caseexecuted 1 time by 1 test: case KEY_DSA: KEY_DSA:executed 1 time by 1 test: case KEY_DSA: | 1 |
4414 | DSA_get0_pqg(key->dsa, &dsa_p, &dsa_q, &dsa_g); | - |
4415 | DSA_get0_key(key->dsa, &dsa_pub_key, &dsa_priv_key); | - |
4416 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b, dsa_p)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4417 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b, dsa_q)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4418 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b, dsa_g)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4419 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b, dsa_pub_key)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4420 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b, dsa_priv_key)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4421 | goto never executed: goto out; out;never executed: goto out; | 0 |
4422 | break;executed 1 time by 1 test: break; | 1 |
4423 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
4424 | if (key->cert == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4425 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4426 | || sshbuf_len(key->cert->certblob) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4427 | r = -10; | - |
4428 | goto never executed: goto out; out;never executed: goto out; | 0 |
4429 | } | - |
4430 | DSA_get0_key(key->dsa, | - |
4431 | ((void *)0) | - |
4432 | , &dsa_priv_key); | - |
4433 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_stringb(b, key->cert->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4434 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b, dsa_priv_key)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4435 | goto never executed: goto out; out;never executed: goto out; | 0 |
4436 | break; never executed: break; | 0 |
4437 | | - |
4438 | caseexecuted 1 time by 1 test: case KEY_ECDSA: KEY_ECDSA:executed 1 time by 1 test: case KEY_ECDSA: | 1 |
4439 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_cstring(b,TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4440 | sshkey_curve_nid_to_name(key->ecdsa_nid))) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4441 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_eckey(b, key->ecdsa)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4442 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_put_bignum2(b,TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4443 | EC_KEY_get0_private_key(key->ecdsa))) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4444 | goto never executed: goto out; out;never executed: goto out; | 0 |
4445 | break;executed 1 time by 1 test: break; | 1 |
4446 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
4447 | if (key->cert == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4448 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4449 | || sshbuf_len(key->cert->certblob) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4450 | r = -10; | - |
4451 | goto never executed: goto out; out;never executed: goto out; | 0 |
4452 | } | - |
4453 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_stringb(b, key->cert->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4454 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_bignum2(b,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4455 | EC_KEY_get0_private_key(key->ecdsa))) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4456 | goto never executed: goto out; out;never executed: goto out; | 0 |
4457 | break; never executed: break; | 0 |
4458 | | - |
4459 | | - |
4460 | caseexecuted 5 times by 2 tests: case KEY_ED25519: KEY_ED25519:executed 5 times by 2 tests: case KEY_ED25519: | 5 |
4461 | if ((TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
r = sshbuf_put_string(b, key->ed25519_pk,TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
| 0-5 |
4462 | 32U)) != 0TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
|| | 0-5 |
4463 | (TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
r = sshbuf_put_string(b, key->ed25519_sk,TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
| 0-5 |
4464 | 64U)) != 0TRUE | never evaluated | FALSE | evaluated 5 times by 2 tests |
) | 0-5 |
4465 | goto never executed: goto out; out;never executed: goto out; | 0 |
4466 | break;executed 5 times by 2 tests: break; | 5 |
4467 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
4468 | if (key->cert == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4469 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4470 | || sshbuf_len(key->cert->certblob) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4471 | r = -10; | - |
4472 | goto never executed: goto out; out;never executed: goto out; | 0 |
4473 | } | - |
4474 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_stringb(b, key->cert->certblob)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4475 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_string(b, key->ed25519_pk,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4476 | 32U)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4477 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_string(b, key->ed25519_sk,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4478 | 64U)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4479 | goto never executed: goto out; out;never executed: goto out; | 0 |
4480 | break; never executed: break; | 0 |
4481 | default never executed: default: :never executed: default: | 0 |
4482 | r = -10; | - |
4483 | goto never executed: goto out; out;never executed: goto out; | 0 |
4484 | } | - |
4485 | | - |
4486 | r = 0; | - |
4487 | out:code before this statement executed 11 times by 2 tests: out: | 11 |
4488 | returnexecuted 11 times by 2 tests: return r; r;executed 11 times by 2 tests: return r; | 11 |
4489 | } | - |
4490 | | - |
4491 | int | - |
4492 | sshkey_private_serialize(const struct sshkey *key, struct sshbuf *b) | - |
4493 | { | - |
4494 | returnexecuted 4 times by 1 test: return sshkey_private_serialize_opt(key, b, SSHKEY_SERIALIZE_DEFAULT); sshkey_private_serialize_opt(key, b,executed 4 times by 1 test: return sshkey_private_serialize_opt(key, b, SSHKEY_SERIALIZE_DEFAULT); | 4 |
4495 | SSHKEY_SERIALIZE_DEFAULT);executed 4 times by 1 test: return sshkey_private_serialize_opt(key, b, SSHKEY_SERIALIZE_DEFAULT); | 4 |
4496 | } | - |
4497 | | - |
4498 | int | - |
4499 | sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) | - |
4500 | { | - |
4501 | char *tname = | - |
4502 | ((void *)0) | - |
4503 | , *curve = | - |
4504 | ((void *)0) | - |
4505 | , *xmss_name = | - |
4506 | ((void *)0) | - |
4507 | ; | - |
4508 | struct sshkey *k = | - |
4509 | ((void *)0) | - |
4510 | ; | - |
4511 | size_t pklen = 0, sklen = 0; | - |
4512 | int type, r = -1; | - |
4513 | u_char *ed25519_pk = | - |
4514 | ((void *)0) | - |
4515 | , *ed25519_sk = | - |
4516 | ((void *)0) | - |
4517 | ; | - |
4518 | u_char *xmss_pk = | - |
4519 | ((void *)0) | - |
4520 | , *xmss_sk = | - |
4521 | ((void *)0) | - |
4522 | ; | - |
4523 | | - |
4524 | BIGNUM *exponent = | - |
4525 | ((void *)0) | - |
4526 | ; | - |
4527 | BIGNUM *rsa_n = | - |
4528 | ((void *)0) | - |
4529 | , *rsa_e = | - |
4530 | ((void *)0) | - |
4531 | , *rsa_d = | - |
4532 | ((void *)0) | - |
4533 | ; | - |
4534 | BIGNUM *rsa_iqmp = | - |
4535 | ((void *)0) | - |
4536 | , *rsa_p = | - |
4537 | ((void *)0) | - |
4538 | , *rsa_q = | - |
4539 | ((void *)0) | - |
4540 | ; | - |
4541 | BIGNUM *dsa_p = | - |
4542 | ((void *)0) | - |
4543 | , *dsa_q = | - |
4544 | ((void *)0) | - |
4545 | , *dsa_g = | - |
4546 | ((void *)0) | - |
4547 | ; | - |
4548 | BIGNUM *dsa_pub_key = | - |
4549 | ((void *)0) | - |
4550 | , *dsa_priv_key = | - |
4551 | ((void *)0) | - |
4552 | ; | - |
4553 | | - |
4554 | | - |
4555 | if (kp != TRUE | evaluated 16680 times by 2 tests | FALSE | never evaluated |
| 0-16680 |
4556 | ((void *)0)TRUE | evaluated 16680 times by 2 tests | FALSE | never evaluated |
| 0-16680 |
4557 | ) | - |
4558 | *executed 16680 times by 2 tests: *kp = ((void *)0) ; kp = executed 16680 times by 2 tests: *kp = ((void *)0) ; | 16680 |
4559 | ((void *)0)executed 16680 times by 2 tests: *kp = ((void *)0) ; | 16680 |
4560 | ;executed 16680 times by 2 tests: *kp = ((void *)0) ; | 16680 |
4561 | if ((TRUE | evaluated 282 times by 1 test | FALSE | evaluated 16398 times by 2 tests |
r = sshbuf_get_cstring(buf, &tname, TRUE | evaluated 282 times by 1 test | FALSE | evaluated 16398 times by 2 tests |
| 282-16398 |
4562 | ((void *)0)TRUE | evaluated 282 times by 1 test | FALSE | evaluated 16398 times by 2 tests |
| 282-16398 |
4563 | )) != 0TRUE | evaluated 282 times by 1 test | FALSE | evaluated 16398 times by 2 tests |
) | 282-16398 |
4564 | gotoexecuted 282 times by 1 test: goto out; out;executed 282 times by 1 test: goto out; | 282 |
4565 | type = sshkey_type_from_name(tname); | - |
4566 | switch (type) { | - |
4567 | | - |
4568 | caseexecuted 1 time by 1 test: case KEY_DSA: KEY_DSA:executed 1 time by 1 test: case KEY_DSA: | 1 |
4569 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
k = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4570 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4571 | ) { | - |
4572 | r = -2; | - |
4573 | goto never executed: goto out; out;never executed: goto out; | 0 |
4574 | } | - |
4575 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
dsa_p = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4576 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4577 | || | - |
4578 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
dsa_q = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4579 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4580 | || | - |
4581 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
dsa_g = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4582 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4583 | || | - |
4584 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
dsa_pub_key = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4585 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4586 | || | - |
4587 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
dsa_priv_key = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4588 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4589 | ) { | - |
4590 | r = -2; | - |
4591 | goto never executed: goto out; out;never executed: goto out; | 0 |
4592 | } | - |
4593 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, dsa_p)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4594 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, dsa_q)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4595 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, dsa_g)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4596 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, dsa_pub_key)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4597 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, dsa_priv_key)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4598 | goto never executed: goto out; out;never executed: goto out; | 0 |
4599 | if (!DSA_set0_pqg(k->dsa, dsa_p, dsa_q, dsa_g)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) { | 0-1 |
4600 | r = -22; | - |
4601 | goto never executed: goto out; out;never executed: goto out; | 0 |
4602 | } | - |
4603 | dsa_p = dsa_q = dsa_g = | - |
4604 | ((void *)0) | - |
4605 | ; | - |
4606 | if (!DSA_set0_key(k->dsa, dsa_pub_key, dsa_priv_key)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) { | 0-1 |
4607 | r = -22; | - |
4608 | goto never executed: goto out; out;never executed: goto out; | 0 |
4609 | } | - |
4610 | dsa_pub_key = dsa_priv_key = | - |
4611 | ((void *)0) | - |
4612 | ; | - |
4613 | break;executed 1 time by 1 test: break; | 1 |
4614 | case never executed: case KEY_DSA_CERT: KEY_DSA_CERT:never executed: case KEY_DSA_CERT: | 0 |
4615 | if ((TRUE | never evaluated | FALSE | never evaluated |
dsa_priv_key = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4616 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4617 | ) { | - |
4618 | r = -2; | - |
4619 | goto never executed: goto out; out;never executed: goto out; | 0 |
4620 | } | - |
4621 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_froms(buf, &k)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4622 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, dsa_priv_key)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4623 | goto never executed: goto out; out;never executed: goto out; | 0 |
4624 | if (!DSA_set0_key(k->dsa, TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4625 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4626 | , dsa_priv_key)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4627 | r = -22; | - |
4628 | goto never executed: goto out; out;never executed: goto out; | 0 |
4629 | } | - |
4630 | dsa_priv_key = | - |
4631 | ((void *)0) | - |
4632 | ; | - |
4633 | break; never executed: break; | 0 |
4634 | | - |
4635 | caseexecuted 1 time by 1 test: case KEY_ECDSA: KEY_ECDSA:executed 1 time by 1 test: case KEY_ECDSA: | 1 |
4636 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
k = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4637 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4638 | ) { | - |
4639 | r = -2; | - |
4640 | goto never executed: goto out; out;never executed: goto out; | 0 |
4641 | } | - |
4642 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
k->ecdsa_nid = sshkey_ecdsa_nid_from_name(tname)) == -1TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) { | 0-1 |
4643 | r = -10; | - |
4644 | goto never executed: goto out; out;never executed: goto out; | 0 |
4645 | } | - |
4646 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_cstring(buf, &curve, TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4647 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4648 | )) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4649 | goto never executed: goto out; out;never executed: goto out; | 0 |
4650 | if (k->ecdsa_nid != sshkey_curve_name_to_nid(curve)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) { | 0-1 |
4651 | r = -15; | - |
4652 | goto never executed: goto out; out;never executed: goto out; | 0 |
4653 | } | - |
4654 | k->ecdsa = EC_KEY_new_by_curve_name(k->ecdsa_nid); | - |
4655 | if (k->ecdsa == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4656 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4657 | || (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
exponent = BN_new()) == TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4658 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4659 | ) { | - |
4660 | r = -22; | - |
4661 | goto never executed: goto out; out;never executed: goto out; | 0 |
4662 | } | - |
4663 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_eckey(buf, k->ecdsa)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4664 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshbuf_get_bignum2(buf, exponent))TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4665 | goto never executed: goto out; out;never executed: goto out; | 0 |
4666 | if (EC_KEY_set_private_key(k->ecdsa, exponent) != 1TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) { | 0-1 |
4667 | r = -22; | - |
4668 | goto never executed: goto out; out;never executed: goto out; | 0 |
4669 | } | - |
4670 | if ((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshkey_ec_validate_public(EC_KEY_get0_group(k->ecdsa),TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
4671 | EC_KEY_get0_public_key(k->ecdsa))) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| | 0-1 |
4672 | (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
r = sshkey_ec_validate_private(k->ecdsa)) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
4673 | goto never executed: goto out; out;never executed: goto out; | 0 |
4674 | break;executed 1 time by 1 test: break; | 1 |
4675 | case never executed: case KEY_ECDSA_CERT: KEY_ECDSA_CERT:never executed: case KEY_ECDSA_CERT: | 0 |
4676 | if ((TRUE | never evaluated | FALSE | never evaluated |
exponent = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4677 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4678 | ) { | - |
4679 | r = -22; | - |
4680 | goto never executed: goto out; out;never executed: goto out; | 0 |
4681 | } | - |
4682 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_froms(buf, &k)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4683 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, exponent)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4684 | goto never executed: goto out; out;never executed: goto out; | 0 |
4685 | if (EC_KEY_set_private_key(k->ecdsa, exponent) != 1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4686 | r = -22; | - |
4687 | goto never executed: goto out; out;never executed: goto out; | 0 |
4688 | } | - |
4689 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_ec_validate_public(EC_KEY_get0_group(k->ecdsa),TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4690 | EC_KEY_get0_public_key(k->ecdsa))) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4691 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_ec_validate_private(k->ecdsa)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4692 | goto never executed: goto out; out;never executed: goto out; | 0 |
4693 | break; never executed: break; | 0 |
4694 | | - |
4695 | caseexecuted 3 times by 2 tests: case KEY_RSA: KEY_RSA:executed 3 times by 2 tests: case KEY_RSA: | 3 |
4696 | if ((TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
k = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4697 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4698 | ) { | - |
4699 | r = -2; | - |
4700 | goto never executed: goto out; out;never executed: goto out; | 0 |
4701 | } | - |
4702 | if ((TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_n = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4703 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4704 | || | - |
4705 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_e = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4706 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4707 | || | - |
4708 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_d = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4709 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4710 | || | - |
4711 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_iqmp = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4712 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4713 | || | - |
4714 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_p = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4715 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4716 | || | - |
4717 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
rsa_q = BN_new()) == TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4718 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4719 | ) { | - |
4720 | r = -2; | - |
4721 | goto never executed: goto out; out;never executed: goto out; | 0 |
4722 | } | - |
4723 | if ((TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_n)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
|| | 0-3 |
4724 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_e)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
|| | 0-3 |
4725 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_d)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
|| | 0-3 |
4726 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
|| | 0-3 |
4727 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_p)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
|| | 0-3 |
4728 | (TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = sshbuf_get_bignum2(buf, rsa_q)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) | 0-3 |
4729 | goto never executed: goto out; out;never executed: goto out; | 0 |
4730 | if (!RSA_set0_key(k->rsa, rsa_n, rsa_e, rsa_d)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) { | 0-3 |
4731 | r = -22; | - |
4732 | goto never executed: goto out; out;never executed: goto out; | 0 |
4733 | } | - |
4734 | rsa_n = rsa_e = rsa_d = | - |
4735 | ((void *)0) | - |
4736 | ; | - |
4737 | if (!RSA_set0_factors(k->rsa, rsa_p, rsa_q)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) { | 0-3 |
4738 | r = -22; | - |
4739 | goto never executed: goto out; out;never executed: goto out; | 0 |
4740 | } | - |
4741 | rsa_p = rsa_q = | - |
4742 | ((void *)0) | - |
4743 | ; | - |
4744 | if ((TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = check_rsa_length(k->rsa)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) | 0-3 |
4745 | goto never executed: goto out; out;never executed: goto out; | 0 |
4746 | if ((TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
r = ssh_rsa_complete_crt_parameters(k, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) | 0-3 |
4747 | goto never executed: goto out; out;never executed: goto out; | 0 |
4748 | break;executed 3 times by 2 tests: break; | 3 |
4749 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
4750 | if ((TRUE | never evaluated | FALSE | never evaluated |
rsa_d = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4751 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4752 | || | - |
4753 | (TRUE | never evaluated | FALSE | never evaluated |
rsa_iqmp = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4754 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4755 | || | - |
4756 | (TRUE | never evaluated | FALSE | never evaluated |
rsa_p = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4757 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4758 | || | - |
4759 | (TRUE | never evaluated | FALSE | never evaluated |
rsa_q = BN_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4760 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4761 | ) { | - |
4762 | r = -2; | - |
4763 | goto never executed: goto out; out;never executed: goto out; | 0 |
4764 | } | - |
4765 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_froms(buf, &k)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4766 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, rsa_d)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4767 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4768 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, rsa_p)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4769 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_bignum2(buf, rsa_q)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4770 | goto never executed: goto out; out;never executed: goto out; | 0 |
4771 | if (!RSA_set0_key(k->rsa, TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4772 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4773 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4774 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
4775 | , rsa_d)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4776 | r = -22; | - |
4777 | goto never executed: goto out; out;never executed: goto out; | 0 |
4778 | } | - |
4779 | rsa_d = | - |
4780 | ((void *)0) | - |
4781 | ; | - |
4782 | if (!RSA_set0_factors(k->rsa, rsa_p, rsa_q)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4783 | r = -22; | - |
4784 | goto never executed: goto out; out;never executed: goto out; | 0 |
4785 | } | - |
4786 | rsa_p = rsa_q = | - |
4787 | ((void *)0) | - |
4788 | ; | - |
4789 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = check_rsa_length(k->rsa)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4790 | goto never executed: goto out; out;never executed: goto out; | 0 |
4791 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = ssh_rsa_complete_crt_parameters(k, rsa_iqmp)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4792 | goto never executed: goto out; out;never executed: goto out; | 0 |
4793 | break; never executed: break; | 0 |
4794 | | - |
4795 | caseexecuted 15416 times by 2 tests: case KEY_ED25519: KEY_ED25519:executed 15416 times by 2 tests: case KEY_ED25519: | 15416 |
4796 | if ((TRUE | never evaluated | FALSE | evaluated 15416 times by 2 tests |
k = sshkey_new(type)) == TRUE | never evaluated | FALSE | evaluated 15416 times by 2 tests |
| 0-15416 |
4797 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 15416 times by 2 tests |
| 0-15416 |
4798 | ) { | - |
4799 | r = -2; | - |
4800 | goto never executed: goto out; out;never executed: goto out; | 0 |
4801 | } | - |
4802 | if ((TRUE | evaluated 261 times by 1 test | FALSE | evaluated 15155 times by 2 tests |
r = sshbuf_get_string(buf, &ed25519_pk, &pklen)) != 0TRUE | evaluated 261 times by 1 test | FALSE | evaluated 15155 times by 2 tests |
|| | 261-15155 |
4803 | (TRUE | evaluated 374 times by 1 test | FALSE | evaluated 14781 times by 2 tests |
r = sshbuf_get_string(buf, &ed25519_sk, &sklen)) != 0TRUE | evaluated 374 times by 1 test | FALSE | evaluated 14781 times by 2 tests |
) | 374-14781 |
4804 | gotoexecuted 635 times by 1 test: goto out; out;executed 635 times by 1 test: goto out; | 635 |
4805 | if (pklen != 32UTRUE | never evaluated | FALSE | evaluated 14781 times by 2 tests |
|| sklen != 64UTRUE | evaluated 65 times by 1 test | FALSE | evaluated 14716 times by 2 tests |
) { | 0-14781 |
4806 | r = -4; | - |
4807 | gotoexecuted 65 times by 1 test: goto out; out;executed 65 times by 1 test: goto out; | 65 |
4808 | } | - |
4809 | k->ed25519_pk = ed25519_pk; | - |
4810 | k->ed25519_sk = ed25519_sk; | - |
4811 | ed25519_pk = ed25519_sk = | - |
4812 | ((void *)0) | - |
4813 | ; | - |
4814 | break;executed 14716 times by 2 tests: break; | 14716 |
4815 | case never executed: case KEY_ED25519_CERT: KEY_ED25519_CERT:never executed: case KEY_ED25519_CERT: | 0 |
4816 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshkey_froms(buf, &k)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4817 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_string(buf, &ed25519_pk, &pklen)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
4818 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_get_string(buf, &ed25519_sk, &sklen)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
4819 | goto never executed: goto out; out;never executed: goto out; | 0 |
4820 | if (pklen != 32UTRUE | never evaluated | FALSE | never evaluated |
|| sklen != 64UTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
4821 | r = -4; | - |
4822 | goto never executed: goto out; out;never executed: goto out; | 0 |
4823 | } | - |
4824 | k->ed25519_pk = ed25519_pk; | - |
4825 | k->ed25519_sk = ed25519_sk; | - |
4826 | ed25519_pk = ed25519_sk = | - |
4827 | ((void *)0) | - |
4828 | ; | - |
4829 | break; never executed: break; | 0 |
4830 | defaultexecuted 977 times by 1 test: default: :executed 977 times by 1 test: default: | 977 |
4831 | r = -14; | - |
4832 | gotoexecuted 977 times by 1 test: goto out; out;executed 977 times by 1 test: goto out; | 977 |
4833 | } | - |
4834 | | - |
4835 | | - |
4836 | switch (k->type) { | - |
4837 | caseexecuted 3 times by 2 tests: case KEY_RSA: KEY_RSA:executed 3 times by 2 tests: case KEY_RSA: | 3 |
4838 | case never executed: case KEY_RSA_CERT: KEY_RSA_CERT:never executed: case KEY_RSA_CERT: | 0 |
4839 | if (RSA_blinding_on(k->rsa, TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4840 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
| 0-3 |
4841 | ) != 1TRUE | never evaluated | FALSE | evaluated 3 times by 2 tests |
) { | 0-3 |
4842 | r = -22; | - |
4843 | goto never executed: goto out; out;never executed: goto out; | 0 |
4844 | } | - |
4845 | break;executed 3 times by 2 tests: break; | 3 |
4846 | } | - |
4847 | | - |
4848 | | - |
4849 | r = 0; | - |
4850 | if (kp != TRUE | evaluated 14721 times by 2 tests | FALSE | never evaluated |
| 0-14721 |
4851 | ((void *)0)TRUE | evaluated 14721 times by 2 tests | FALSE | never evaluated |
| 0-14721 |
4852 | ) { | - |
4853 | *kp = k; | - |
4854 | k = | - |
4855 | ((void *)0) | - |
4856 | ; | - |
4857 | }executed 14721 times by 2 tests: end of block | 14721 |
4858 | out:code before this statement executed 14721 times by 2 tests: out: | 14721 |
4859 | free(tname); | - |
4860 | free(curve); | - |
4861 | | - |
4862 | BN_clear_free(exponent); | - |
4863 | BN_clear_free(dsa_p); | - |
4864 | BN_clear_free(dsa_q); | - |
4865 | BN_clear_free(dsa_g); | - |
4866 | BN_clear_free(dsa_pub_key); | - |
4867 | BN_clear_free(dsa_priv_key); | - |
4868 | BN_clear_free(rsa_n); | - |
4869 | BN_clear_free(rsa_e); | - |
4870 | BN_clear_free(rsa_d); | - |
4871 | BN_clear_free(rsa_p); | - |
4872 | BN_clear_free(rsa_q); | - |
4873 | BN_clear_free(rsa_iqmp); | - |
4874 | | - |
4875 | sshkey_free(k); | - |
4876 | freezero(ed25519_pk, pklen); | - |
4877 | freezero(ed25519_sk, sklen); | - |
4878 | free(xmss_name); | - |
4879 | freezero(xmss_pk, pklen); | - |
4880 | freezero(xmss_sk, sklen); | - |
4881 | returnexecuted 16680 times by 2 tests: return r; r;executed 16680 times by 2 tests: return r; | 16680 |
4882 | } | - |
4883 | | - |
4884 | | - |
4885 | int | - |
4886 | sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public) | - |
4887 | { | - |
4888 | BN_CTX *bnctx; | - |
4889 | EC_POINT *nq = | - |
4890 | ((void *)0) | - |
4891 | ; | - |
4892 | BIGNUM *order, *x, *y, *tmp; | - |
4893 | int ret = -20; | - |
4894 | if ((TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
bnctx = BN_CTX_new()) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4895 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4896 | ) | - |
4897 | return never executed: return -2; -2;never executed: return -2; | 0 |
4898 | BN_CTX_start(bnctx); | - |
4899 | | - |
4900 | | - |
4901 | | - |
4902 | | - |
4903 | | - |
4904 | if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4905 | TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4906 | 406TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4907 | ) | - |
4908 | goto never executed: goto out; out;never executed: goto out; | 0 |
4909 | | - |
4910 | | - |
4911 | if (EC_POINT_is_at_infinity(group, public)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) | 0-10956 |
4912 | goto never executed: goto out; out;never executed: goto out; | 0 |
4913 | | - |
4914 | if ((TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
x = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4915 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4916 | || | - |
4917 | (TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
y = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4918 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4919 | || | - |
4920 | (TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
order = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4921 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4922 | || | - |
4923 | (TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
tmp = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4924 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4925 | ) { | - |
4926 | ret = -2; | - |
4927 | goto never executed: goto out; out;never executed: goto out; | 0 |
4928 | } | - |
4929 | | - |
4930 | | - |
4931 | if (EC_GROUP_get_order(group, order, bnctx) != 1TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 0-10956 |
4932 | EC_POINT_get_affine_coordinates_GFp(group, public,TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4933 | x, y, bnctx) != 1TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-10956 |
4934 | ret = -22; | - |
4935 | goto never executed: goto out; out;never executed: goto out; | 0 |
4936 | } | - |
4937 | if (BN_num_bits(x) <= BN_num_bits(order) / 2TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| | 0-10956 |
4938 | BN_num_bits(y) <= BN_num_bits(order) / 2TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) | 0-10956 |
4939 | goto never executed: goto out; out;never executed: goto out; | 0 |
4940 | | - |
4941 | | - |
4942 | if ((TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
nq = EC_POINT_new(group)) == TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4943 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4944 | ) { | - |
4945 | ret = -2; | - |
4946 | goto never executed: goto out; out;never executed: goto out; | 0 |
4947 | } | - |
4948 | if (EC_POINT_mul(group, nq, TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4949 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
| 0-10956 |
4950 | , public, order, bnctx) != 1TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-10956 |
4951 | ret = -22; | - |
4952 | goto never executed: goto out; out;never executed: goto out; | 0 |
4953 | } | - |
4954 | if (EC_POINT_is_at_infinity(group, nq) != 1TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) | 0-10956 |
4955 | goto never executed: goto out; out;never executed: goto out; | 0 |
4956 | | - |
4957 | | - |
4958 | if (!BN_sub(tmp, order, BN_value_one())TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) { | 0-10956 |
4959 | ret = -22; | - |
4960 | goto never executed: goto out; out;never executed: goto out; | 0 |
4961 | } | - |
4962 | if (BN_cmp(x, tmp) >= 0TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
|| BN_cmp(y, tmp) >= 0TRUE | never evaluated | FALSE | evaluated 10956 times by 4 testsEvaluated by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
|
) | 0-10956 |
4963 | goto never executed: goto out; out;never executed: goto out; | 0 |
4964 | ret = 0; | - |
4965 | out:code before this statement executed 10956 times by 4 tests: out: Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 10956 |
4966 | BN_CTX_free(bnctx); | - |
4967 | EC_POINT_free(nq); | - |
4968 | returnexecuted 10956 times by 4 tests: return ret; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
ret;executed 10956 times by 4 tests: return ret; Executed by:- ssh-keygen
- test_hostkeys
- test_kex
- test_sshkey
| 10956 |
4969 | } | - |
4970 | | - |
4971 | int | - |
4972 | sshkey_ec_validate_private(const EC_KEY *key) | - |
4973 | { | - |
4974 | BN_CTX *bnctx; | - |
4975 | BIGNUM *order, *tmp; | - |
4976 | int ret = -20; | - |
4977 | | - |
4978 | if ((TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
bnctx = BN_CTX_new()) == TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4979 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4980 | ) | - |
4981 | return never executed: return -2; -2;never executed: return -2; | 0 |
4982 | BN_CTX_start(bnctx); | - |
4983 | | - |
4984 | if ((TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
order = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4985 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4986 | || | - |
4987 | (TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
tmp = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4988 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
4989 | ) { | - |
4990 | ret = -2; | - |
4991 | goto never executed: goto out; out;never executed: goto out; | 0 |
4992 | } | - |
4993 | | - |
4994 | | - |
4995 | if (EC_GROUP_get_order(EC_KEY_get0_group(key), order, bnctx) != 1TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
) { | 0-5939 |
4996 | ret = -22; | - |
4997 | goto never executed: goto out; out;never executed: goto out; | 0 |
4998 | } | - |
4999 | if (BN_num_bits(EC_KEY_get0_private_key(key)) <=TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
| 0-5939 |
5000 | BN_num_bits(order) / 2TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
) | 0-5939 |
5001 | goto never executed: goto out; out;never executed: goto out; | 0 |
5002 | | - |
5003 | | - |
5004 | if (!BN_sub(tmp, order, BN_value_one())TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
) { | 0-5939 |
5005 | ret = -22; | - |
5006 | goto never executed: goto out; out;never executed: goto out; | 0 |
5007 | } | - |
5008 | if (BN_cmp(EC_KEY_get0_private_key(key), tmp) >= 0TRUE | never evaluated | FALSE | evaluated 5939 times by 1 test |
) | 0-5939 |
5009 | goto never executed: goto out; out;never executed: goto out; | 0 |
5010 | ret = 0; | - |
5011 | out:code before this statement executed 5939 times by 1 test: out: | 5939 |
5012 | BN_CTX_free(bnctx); | - |
5013 | returnexecuted 5939 times by 1 test: return ret; ret;executed 5939 times by 1 test: return ret; | 5939 |
5014 | } | - |
5015 | | - |
5016 | void | - |
5017 | sshkey_dump_ec_point(const EC_GROUP *group, const EC_POINT *point) | - |
5018 | { | - |
5019 | BIGNUM *x, *y; | - |
5020 | BN_CTX *bnctx; | - |
5021 | | - |
5022 | if (point == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5023 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5024 | ) { | - |
5025 | fputs("point=(NULL)\n", | - |
5026 | stderr | - |
5027 | ); | - |
5028 | return; never executed: return; | 0 |
5029 | } | - |
5030 | if ((TRUE | never evaluated | FALSE | never evaluated |
bnctx = BN_CTX_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5031 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5032 | ) { | - |
5033 | fprintf( | - |
5034 | stderr | - |
5035 | , "%s: BN_CTX_new failed\n", __func__); | - |
5036 | return; never executed: return; | 0 |
5037 | } | - |
5038 | BN_CTX_start(bnctx); | - |
5039 | if ((TRUE | never evaluated | FALSE | never evaluated |
x = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5040 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5041 | || | - |
5042 | (TRUE | never evaluated | FALSE | never evaluated |
y = BN_CTX_get(bnctx)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5043 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5044 | ) { | - |
5045 | fprintf( | - |
5046 | stderr | - |
5047 | , "%s: BN_CTX_get failed\n", __func__); | - |
5048 | return; never executed: return; | 0 |
5049 | } | - |
5050 | if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5051 | TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5052 | 406TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5053 | ) { | - |
5054 | fprintf( | - |
5055 | stderr | - |
5056 | , "%s: group is not a prime field\n", __func__); | - |
5057 | return; never executed: return; | 0 |
5058 | } | - |
5059 | if (EC_POINT_get_affine_coordinates_GFp(group, point, x, y,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5060 | bnctx) != 1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
5061 | fprintf( | - |
5062 | stderr | - |
5063 | , "%s: EC_POINT_get_affine_coordinates_GFp\n", | - |
5064 | __func__); | - |
5065 | return; never executed: return; | 0 |
5066 | } | - |
5067 | fputs("x=", | - |
5068 | stderr | - |
5069 | ); | - |
5070 | BN_print_fp( | - |
5071 | stderr | - |
5072 | , x); | - |
5073 | fputs("\ny=", | - |
5074 | stderr | - |
5075 | ); | - |
5076 | BN_print_fp( | - |
5077 | stderr | - |
5078 | , y); | - |
5079 | fputs("\n", | - |
5080 | stderr | - |
5081 | ); | - |
5082 | BN_CTX_free(bnctx); | - |
5083 | } never executed: end of block | 0 |
5084 | | - |
5085 | void | - |
5086 | sshkey_dump_ec_key(const EC_KEY *key) | - |
5087 | { | - |
5088 | const BIGNUM *exponent; | - |
5089 | | - |
5090 | sshkey_dump_ec_point(EC_KEY_get0_group(key), | - |
5091 | EC_KEY_get0_public_key(key)); | - |
5092 | fputs("exponent=", | - |
5093 | stderr | - |
5094 | ); | - |
5095 | if ((TRUE | never evaluated | FALSE | never evaluated |
exponent = EC_KEY_get0_private_key(key)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5096 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5097 | ) | - |
5098 | fputs("(NULL)", never executed: fputs("(NULL)", stderr ); | 0 |
5099 | stderr never executed: fputs("(NULL)", stderr ); | 0 |
5100 | ); never executed: fputs("(NULL)", stderr ); | 0 |
5101 | else | - |
5102 | BN_print_fp( never executed: BN_print_fp( stderr , EC_KEY_get0_private_key(key)); | 0 |
5103 | stderr never executed: BN_print_fp( stderr , EC_KEY_get0_private_key(key)); | 0 |
5104 | , EC_KEY_get0_private_key(key)); never executed: BN_print_fp( stderr , EC_KEY_get0_private_key(key)); | 0 |
5105 | fputs("\n", | - |
5106 | stderr | - |
5107 | ); | - |
5108 | } never executed: end of block | 0 |
5109 | | - |
5110 | | - |
5111 | static int | - |
5112 | sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob, | - |
5113 | const char *passphrase, const char *comment, const char *ciphername, | - |
5114 | int rounds) | - |
5115 | { | - |
5116 | u_char *cp, *key = | - |
5117 | ((void *)0) | - |
5118 | , *pubkeyblob = | - |
5119 | ((void *)0) | - |
5120 | ; | - |
5121 | u_char salt[16]; | - |
5122 | char *b64 = | - |
5123 | ((void *)0) | - |
5124 | ; | - |
5125 | size_t i, pubkeylen, keylen, ivlen, blocksize, authlen; | - |
5126 | u_int check; | - |
5127 | int r = -1; | - |
5128 | struct sshcipher_ctx *ciphercontext = | - |
5129 | ((void *)0) | - |
5130 | ; | - |
5131 | const struct sshcipher *cipher; | - |
5132 | const char *kdfname = "bcrypt"; | - |
5133 | struct sshbuf *encoded = | - |
5134 | ((void *)0) | - |
5135 | , *encrypted = | - |
5136 | ((void *)0) | - |
5137 | , *kdf = | - |
5138 | ((void *)0) | - |
5139 | ; | - |
5140 | | - |
5141 | if (rounds <= 0TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
) | 0-7 |
5142 | rounds = 16;executed 7 times by 1 test: rounds = 16; | 7 |
5143 | if (passphrase == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5144 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5145 | || !strlen(passphrase)TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
) { | 0-7 |
5146 | ciphername = "none"; | - |
5147 | kdfname = "none"; | - |
5148 | }executed 7 times by 1 test: end of block else if (ciphername == TRUE | never evaluated | FALSE | never evaluated |
| 0-7 |
5149 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5150 | ) | - |
5151 | ciphername = "aes256-ctr"; never executed: ciphername = "aes256-ctr"; | 0 |
5152 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
cipher = cipher_by_name(ciphername)) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5153 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5154 | ) { | - |
5155 | r = -10; | - |
5156 | goto never executed: goto out; out;never executed: goto out; | 0 |
5157 | } | - |
5158 | | - |
5159 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
kdf = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5160 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5161 | || | - |
5162 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
encoded = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5163 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5164 | || | - |
5165 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
encrypted = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5166 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5167 | ) { | - |
5168 | r = -2; | - |
5169 | goto never executed: goto out; out;never executed: goto out; | 0 |
5170 | } | - |
5171 | blocksize = cipher_blocksize(cipher); | - |
5172 | keylen = cipher_keylen(cipher); | - |
5173 | ivlen = cipher_ivlen(cipher); | - |
5174 | authlen = cipher_authlen(cipher); | - |
5175 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
key = calloc(1, keylen + ivlen)) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5176 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5177 | ) { | - |
5178 | r = -2; | - |
5179 | goto never executed: goto out; out;never executed: goto out; | 0 |
5180 | } | - |
5181 | if ( | - |
5182 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5183 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5184 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5185 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5186 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5187 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5188 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5189 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5190 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5191 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5192 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5193 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5194 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5195 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5196 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5197 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5198 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5199 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5200 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5201 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5202 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5203 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5204 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5205 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5206 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5207 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5208 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5209 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5210 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5211 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5212 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5213 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5214 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5215 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5216 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5217 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5218 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5219 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5220 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5221 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5222 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5223 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5224 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5225 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5226 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5227 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5228 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5229 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-7 |
5230 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5231 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5232 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5233 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5234 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5235 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5236 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5237 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5238 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5239 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5240 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5241 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5242 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5243 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5244 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5245 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5246 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5247 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5248 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5249 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5250 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5251 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5252 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5253 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5254 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5255 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5256 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5257 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); | 0-7 |
5258 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5259 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5260 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5261 | "bcrypt"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5262 | )))); }) TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5263 | == 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) { | 0-7 |
5264 | arc4random_buf(salt, 16); | - |
5265 | if (bcrypt_pbkdf(passphrase, strlen(passphrase),TRUE | never evaluated | FALSE | never evaluated |
| 0 |
5266 | salt, 16, key, keylen + ivlen, rounds) < 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
5267 | r = -10; | - |
5268 | goto never executed: goto out; out;never executed: goto out; | 0 |
5269 | } | - |
5270 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_string(kdf, salt, 16)) != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
5271 | (TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put_u32(kdf, rounds)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
5272 | goto never executed: goto out; out;never executed: goto out; | 0 |
5273 | } never executed: end of block else if ( | 0 |
5274 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5275 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5276 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5277 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5278 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5279 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5280 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5281 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5282 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5283 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5284 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5285 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5286 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5287 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5288 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5289 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5290 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5291 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5292 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5293 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5294 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5295 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5296 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5297 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5298 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5299 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5300 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5301 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5302 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5303 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5304 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5305 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5306 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5307 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5308 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5309 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5310 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5311 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5312 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5313 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5314 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5315 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5316 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5317 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5318 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5319 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5320 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5321 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-7 |
5322 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5323 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5324 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5325 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5326 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5327 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5328 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5329 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5330 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5331 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5332 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5333 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5334 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5335 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5336 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5337 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5338 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5339 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5340 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5341 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5342 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5343 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5344 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5345 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5346 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5347 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5348 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5349 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0-7 |
5350 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5351 | kdfnameTRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5352 | , TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5353 | "none"TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5354 | )))); }) TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5355 | != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) { | 0-7 |
5356 | | - |
5357 | r = -42; | - |
5358 | goto never executed: goto out; out;never executed: goto out; | 0 |
5359 | } | - |
5360 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = cipher_init(&ciphercontext, cipher, key, keylen,TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5361 | key + keylen, ivlen, 1)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5362 | goto never executed: goto out; out;never executed: goto out; | 0 |
5363 | | - |
5364 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put(encoded, "openssh-key-v1", sizeof("openssh-key-v1"))) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5365 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_cstring(encoded, ciphername)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5366 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_cstring(encoded, kdfname)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5367 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_stringb(encoded, kdf)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5368 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_u32(encoded, 1)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5369 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshkey_to_blob(prv, &pubkeyblob, &pubkeylen)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5370 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_string(encoded, pubkeyblob, pubkeylen)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5371 | goto never executed: goto out; out;never executed: goto out; | 0 |
5372 | | - |
5373 | | - |
5374 | | - |
5375 | | - |
5376 | check = arc4random(); | - |
5377 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_u32(encrypted, check)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5378 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_u32(encrypted, check)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5379 | goto never executed: goto out; out;never executed: goto out; | 0 |
5380 | | - |
5381 | | - |
5382 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshkey_private_serialize_opt(prv, encrypted,TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5383 | SSHKEY_SERIALIZE_FULL)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
|| | 0-7 |
5384 | (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_cstring(encrypted, comment)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5385 | goto never executed: goto out; out;never executed: goto out; | 0 |
5386 | | - |
5387 | | - |
5388 | i = 0; | - |
5389 | while (sshbuf_len(encrypted) % blocksizeTRUE | evaluated 21 times by 1 test | FALSE | evaluated 7 times by 1 test |
) { | 7-21 |
5390 | if ((TRUE | never evaluated | FALSE | evaluated 21 times by 1 test |
r = sshbuf_put_u8(encrypted, ++i & 0xff)) != 0TRUE | never evaluated | FALSE | evaluated 21 times by 1 test |
) | 0-21 |
5391 | goto never executed: goto out; out;never executed: goto out; | 0 |
5392 | }executed 21 times by 1 test: end of block | 21 |
5393 | | - |
5394 | | - |
5395 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_u32(encoded, sshbuf_len(encrypted))) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5396 | goto never executed: goto out; out;never executed: goto out; | 0 |
5397 | | - |
5398 | | - |
5399 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_reserve(encoded,TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5400 | sshbuf_len(encrypted) + authlen, &cp)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5401 | goto never executed: goto out; out;never executed: goto out; | 0 |
5402 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = cipher_crypt(ciphercontext, 0, cp,TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5403 | sshbuf_ptr(encrypted), sshbuf_len(encrypted), 0, authlen)) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5404 | goto never executed: goto out; out;never executed: goto out; | 0 |
5405 | | - |
5406 | | - |
5407 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
b64 = sshbuf_dtob64(encoded)) == TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5408 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
5409 | ) { | - |
5410 | r = -2; | - |
5411 | goto never executed: goto out; out;never executed: goto out; | 0 |
5412 | } | - |
5413 | | - |
5414 | sshbuf_reset(blob); | - |
5415 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put(blob, "-----BEGIN OPENSSH PRIVATE KEY-----\n", (sizeof("-----BEGIN OPENSSH PRIVATE KEY-----\n") - 1))) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5416 | goto never executed: goto out; out;never executed: goto out; | 0 |
5417 | for (i = 0; i < strlen(b64)TRUE | evaluated 6248 times by 1 test | FALSE | evaluated 7 times by 1 test |
; i++) { | 7-6248 |
5418 | if ((TRUE | never evaluated | FALSE | evaluated 6248 times by 1 test |
r = sshbuf_put_u8(blob, b64[i])) != 0TRUE | never evaluated | FALSE | evaluated 6248 times by 1 test |
) | 0-6248 |
5419 | goto never executed: goto out; out;never executed: goto out; | 0 |
5420 | | - |
5421 | if (i % 70 == 69TRUE | evaluated 84 times by 1 test | FALSE | evaluated 6164 times by 1 test |
&& (TRUE | never evaluated | FALSE | evaluated 84 times by 1 test |
r = sshbuf_put_u8(blob, '\n')) != 0TRUE | never evaluated | FALSE | evaluated 84 times by 1 test |
) | 0-6164 |
5422 | goto never executed: goto out; out;never executed: goto out; | 0 |
5423 | }executed 6248 times by 1 test: end of block | 6248 |
5424 | if (i % 70 != 69TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put_u8(blob, '\n')) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5425 | goto never executed: goto out; out;never executed: goto out; | 0 |
5426 | if ((TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
r = sshbuf_put(blob, "-----END OPENSSH PRIVATE KEY-----\n", (sizeof("-----END OPENSSH PRIVATE KEY-----\n") - 1))) != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
5427 | goto never executed: goto out; out;never executed: goto out; | 0 |
5428 | | - |
5429 | | - |
5430 | r = 0; | - |
5431 | | - |
5432 | out:code before this statement executed 7 times by 1 test: out: | 7 |
5433 | sshbuf_free(kdf); | - |
5434 | sshbuf_free(encoded); | - |
5435 | sshbuf_free(encrypted); | - |
5436 | cipher_free(ciphercontext); | - |
5437 | explicit_bzero(salt, sizeof(salt)); | - |
5438 | if (key != TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5439 | ((void *)0)TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5440 | ) { | - |
5441 | explicit_bzero(key, keylen + ivlen); | - |
5442 | free(key); | - |
5443 | }executed 7 times by 1 test: end of block | 7 |
5444 | if (pubkeyblob != TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5445 | ((void *)0)TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5446 | ) { | - |
5447 | explicit_bzero(pubkeyblob, pubkeylen); | - |
5448 | free(pubkeyblob); | - |
5449 | }executed 7 times by 1 test: end of block | 7 |
5450 | if (b64 != TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5451 | ((void *)0)TRUE | evaluated 7 times by 1 test | FALSE | never evaluated |
| 0-7 |
5452 | ) { | - |
5453 | explicit_bzero(b64, strlen(b64)); | - |
5454 | free(b64); | - |
5455 | }executed 7 times by 1 test: end of block | 7 |
5456 | returnexecuted 7 times by 1 test: return r; r;executed 7 times by 1 test: return r; | 7 |
5457 | } | - |
5458 | | - |
5459 | static int | - |
5460 | sshkey_parse_private2(struct sshbuf *blob, int type, const char *passphrase, | - |
5461 | struct sshkey **keyp, char **commentp) | - |
5462 | { | - |
5463 | char *comment = | - |
5464 | ((void *)0) | - |
5465 | , *ciphername = | - |
5466 | ((void *)0) | - |
5467 | , *kdfname = | - |
5468 | ((void *)0) | - |
5469 | ; | - |
5470 | const struct sshcipher *cipher = | - |
5471 | ((void *)0) | - |
5472 | ; | - |
5473 | const u_char *cp; | - |
5474 | int r = -1; | - |
5475 | size_t encoded_len; | - |
5476 | size_t i, keylen = 0, ivlen = 0, authlen = 0, slen = 0; | - |
5477 | struct sshbuf *encoded = | - |
5478 | ((void *)0) | - |
5479 | , *decoded = | - |
5480 | ((void *)0) | - |
5481 | ; | - |
5482 | struct sshbuf *kdf = | - |
5483 | ((void *)0) | - |
5484 | , *decrypted = | - |
5485 | ((void *)0) | - |
5486 | ; | - |
5487 | struct sshcipher_ctx *ciphercontext = | - |
5488 | ((void *)0) | - |
5489 | ; | - |
5490 | struct sshkey *k = | - |
5491 | ((void *)0) | - |
5492 | ; | - |
5493 | u_char *key = | - |
5494 | ((void *)0) | - |
5495 | , *salt = | - |
5496 | ((void *)0) | - |
5497 | , *dp, pad, last; | - |
5498 | u_int blocksize, rounds, nkeys, encrypted_len, check1, check2; | - |
5499 | | - |
5500 | if (keyp != TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
5501 | ((void *)0)TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
5502 | ) | - |
5503 | *executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
keyp = executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
5504 | ((void *)0)executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
5505 | ;executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
5506 | if (commentp != TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5507 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5508 | ) | - |
5509 | * never executed: *commentp = ((void *)0) ; commentp = never executed: *commentp = ((void *)0) ; | 0 |
5510 | ((void *)0) never executed: *commentp = ((void *)0) ; | 0 |
5511 | ; never executed: *commentp = ((void *)0) ; | 0 |
5512 | | - |
5513 | if ((TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
encoded = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5514 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5515 | || | - |
5516 | (TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
decoded = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5517 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5518 | || | - |
5519 | (TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
decrypted = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5520 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
5521 | ) { | - |
5522 | r = -2; | - |
5523 | goto never executed: goto out; out;never executed: goto out; | 0 |
5524 | } | - |
5525 | | - |
5526 | | - |
5527 | cp = sshbuf_ptr(blob); | - |
5528 | encoded_len = sshbuf_len(blob); | - |
5529 | if (encoded_len < ((sizeof("-----BEGIN OPENSSH PRIVATE KEY-----\n") - 1) + (sizeof("-----END OPENSSH PRIVATE KEY-----\n") - 1))TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
|| | 0-254950 |
5530 | memcmp(cp, "-----BEGIN OPENSSH PRIVATE KEY-----\n", (sizeof("-----BEGIN OPENSSH PRIVATE KEY-----\n") - 1)) != 0TRUE | evaluated 230915 times by 2 tests | FALSE | evaluated 24035 times by 2 tests |
) { | 24035-230915 |
5531 | r = -4; | - |
5532 | gotoexecuted 230915 times by 2 tests: goto out; out;executed 230915 times by 2 tests: goto out; | 230915 |
5533 | } | - |
5534 | cp += (sizeof("-----BEGIN OPENSSH PRIVATE KEY-----\n") - 1); | - |
5535 | encoded_len -= (sizeof("-----BEGIN OPENSSH PRIVATE KEY-----\n") - 1); | - |
5536 | | - |
5537 | | - |
5538 | while (encoded_len > 0TRUE | evaluated 8276088 times by 2 tests | FALSE | evaluated 2219 times by 1 test |
) { | 2219-8276088 |
5539 | if (*TRUE | evaluated 8154010 times by 2 tests | FALSE | evaluated 122078 times by 2 tests |
cp != '\n'TRUE | evaluated 8154010 times by 2 tests | FALSE | evaluated 122078 times by 2 tests |
&& *TRUE | evaluated 8154010 times by 2 tests | FALSE | never evaluated |
cp != '\r'TRUE | evaluated 8154010 times by 2 tests | FALSE | never evaluated |
) { | 0-8154010 |
5540 | if ((TRUE | never evaluated | FALSE | evaluated 8154010 times by 2 tests |
r = sshbuf_put_u8(encoded, *cp)) != 0TRUE | never evaluated | FALSE | evaluated 8154010 times by 2 tests |
) | 0-8154010 |
5541 | goto never executed: goto out; out;never executed: goto out; | 0 |
5542 | }executed 8154010 times by 2 tests: end of block | 8154010 |
5543 | last = *cp; | - |
5544 | encoded_len--; | - |
5545 | cp++; | - |
5546 | if (last == '\n'TRUE | evaluated 122078 times by 2 tests | FALSE | evaluated 8154010 times by 2 tests |
) { | 122078-8154010 |
5547 | if (encoded_len >= (sizeof("-----END OPENSSH PRIVATE KEY-----\n") - 1)TRUE | evaluated 119922 times by 2 tests | FALSE | evaluated 2156 times by 1 test |
&& | 2156-119922 |
5548 | memcmp(cp, "-----END OPENSSH PRIVATE KEY-----\n", (sizeof("-----END OPENSSH PRIVATE KEY-----\n") - 1)) == 0TRUE | evaluated 21816 times by 2 tests | FALSE | evaluated 98106 times by 2 tests |
) { | 21816-98106 |
5549 | | - |
5550 | if ((TRUE | never evaluated | FALSE | evaluated 21816 times by 2 tests |
r = sshbuf_put_u8(encoded, 0)) != 0TRUE | never evaluated | FALSE | evaluated 21816 times by 2 tests |
) | 0-21816 |
5551 | goto never executed: goto out; out;never executed: goto out; | 0 |
5552 | break;executed 21816 times by 2 tests: break; | 21816 |
5553 | } | - |
5554 | }executed 100262 times by 2 tests: end of block | 100262 |
5555 | }executed 8254272 times by 2 tests: end of block | 8254272 |
5556 | if (encoded_len == 0TRUE | evaluated 2219 times by 1 test | FALSE | evaluated 21816 times by 2 tests |
) { | 2219-21816 |
5557 | r = -4; | - |
5558 | gotoexecuted 2219 times by 1 test: goto out; out;executed 2219 times by 1 test: goto out; | 2219 |
5559 | } | - |
5560 | | - |
5561 | | - |
5562 | if ((TRUE | evaluated 428 times by 1 test | FALSE | evaluated 21388 times by 2 tests |
r = sshbuf_b64tod(decoded, (char *)sshbuf_ptr(encoded))) != 0TRUE | evaluated 428 times by 1 test | FALSE | evaluated 21388 times by 2 tests |
) | 428-21388 |
5563 | gotoexecuted 428 times by 1 test: goto out; out;executed 428 times by 1 test: goto out; | 428 |
5564 | | - |
5565 | | - |
5566 | if (sshbuf_len(decoded) < sizeof("openssh-key-v1")TRUE | never evaluated | FALSE | evaluated 21388 times by 2 tests |
|| | 0-21388 |
5567 | memcmp(sshbuf_ptr(decoded), "openssh-key-v1", sizeof("openssh-key-v1"))TRUE | evaluated 1260 times by 1 test | FALSE | evaluated 20128 times by 2 tests |
) { | 1260-20128 |
5568 | r = -4; | - |
5569 | gotoexecuted 1260 times by 1 test: goto out; out;executed 1260 times by 1 test: goto out; | 1260 |
5570 | } | - |
5571 | | - |
5572 | if ((TRUE | never evaluated | FALSE | evaluated 20128 times by 2 tests |
r = sshbuf_consume(decoded, sizeof("openssh-key-v1"))) != 0TRUE | never evaluated | FALSE | evaluated 20128 times by 2 tests |
|| | 0-20128 |
5573 | (TRUE | evaluated 346 times by 1 test | FALSE | evaluated 19782 times by 2 tests |
r = sshbuf_get_cstring(decoded, &ciphername, TRUE | evaluated 346 times by 1 test | FALSE | evaluated 19782 times by 2 tests |
| 346-19782 |
5574 | ((void *)0)TRUE | evaluated 346 times by 1 test | FALSE | evaluated 19782 times by 2 tests |
| 346-19782 |
5575 | )) != 0TRUE | evaluated 346 times by 1 test | FALSE | evaluated 19782 times by 2 tests |
|| | 346-19782 |
5576 | (TRUE | evaluated 375 times by 1 test | FALSE | evaluated 19407 times by 2 tests |
r = sshbuf_get_cstring(decoded, &kdfname, TRUE | evaluated 375 times by 1 test | FALSE | evaluated 19407 times by 2 tests |
| 375-19407 |
5577 | ((void *)0)TRUE | evaluated 375 times by 1 test | FALSE | evaluated 19407 times by 2 tests |
| 375-19407 |
5578 | )) != 0TRUE | evaluated 375 times by 1 test | FALSE | evaluated 19407 times by 2 tests |
|| | 375-19407 |
5579 | (TRUE | evaluated 303 times by 1 test | FALSE | evaluated 19104 times by 2 tests |
r = sshbuf_froms(decoded, &kdf)) != 0TRUE | evaluated 303 times by 1 test | FALSE | evaluated 19104 times by 2 tests |
|| | 303-19104 |
5580 | (TRUE | never evaluated | FALSE | evaluated 19104 times by 2 tests |
r = sshbuf_get_u32(decoded, &nkeys)) != 0TRUE | never evaluated | FALSE | evaluated 19104 times by 2 tests |
|| | 0-19104 |
5581 | (TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
r = sshbuf_get_string_direct(decoded, TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
| 334-18770 |
5582 | ((void *)0)TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
| 334-18770 |
5583 | , TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
| 334-18770 |
5584 | ((void *)0)TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
| 334-18770 |
5585 | )) != 0TRUE | evaluated 334 times by 1 test | FALSE | evaluated 18770 times by 2 tests |
|| | 334-18770 |
5586 | (TRUE | evaluated 1 time by 1 test | FALSE | evaluated 18769 times by 2 tests |
r = sshbuf_get_u32(decoded, &encrypted_len)) != 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 18769 times by 2 tests |
) | 1-18769 |
5587 | gotoexecuted 1359 times by 1 test: goto out; out;executed 1359 times by 1 test: goto out; | 1359 |
5588 | | - |
5589 | if ((TRUE | evaluated 282 times by 1 test | FALSE | evaluated 18487 times by 2 tests |
cipher = cipher_by_name(ciphername)) == TRUE | evaluated 282 times by 1 test | FALSE | evaluated 18487 times by 2 tests |
| 282-18487 |
5590 | ((void *)0)TRUE | evaluated 282 times by 1 test | FALSE | evaluated 18487 times by 2 tests |
| 282-18487 |
5591 | ) { | - |
5592 | r = -42; | - |
5593 | gotoexecuted 282 times by 1 test: goto out; out;executed 282 times by 1 test: goto out; | 282 |
5594 | } | - |
5595 | if ((passphrase == TRUE | never evaluated | FALSE | evaluated 18487 times by 2 tests |
| 0-18487 |
5596 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18487 times by 2 tests |
| 0-18487 |
5597 | || strlen(passphrase) == 0TRUE | evaluated 18483 times by 2 tests | FALSE | evaluated 4 times by 1 test |
) && | 4-18483 |
5598 | | - |
5599 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5600 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5601 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5602 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5603 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5604 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5605 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5606 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5607 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5608 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5609 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5610 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5611 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5612 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5613 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5614 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5615 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5616 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5617 | , TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5618 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5619 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5620 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5621 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5622 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5623 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5624 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5625 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5626 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5627 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5628 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5629 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5630 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5631 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5632 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5633 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5634 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5635 | , TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5636 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5637 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5638 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5639 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5640 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5641 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5642 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5643 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5644 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5645 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5646 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); | 0-18483 |
5647 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5648 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5649 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5650 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5651 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5652 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5653 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5654 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5655 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5656 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5657 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5658 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5659 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5660 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5661 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5662 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5663 | , TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5664 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5665 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5666 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5667 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5668 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5669 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5670 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5671 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5672 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5673 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5674 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0-18483 |
5675 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5676 | ciphernameTRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5677 | , TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5678 | "none"TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5679 | )))); }) TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
| 0-18483 |
5680 | != 0TRUE | never evaluated | FALSE | evaluated 18483 times by 2 tests |
) { | 0-18483 |
5681 | | - |
5682 | r = -43; | - |
5683 | goto never executed: goto out; out;never executed: goto out; | 0 |
5684 | } | - |
5685 | if ( | - |
5686 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5687 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5688 | ) && __builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5689 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5690 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5691 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5692 | ), __s2_len = __builtin_strlen (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5693 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5694 | ), (!((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5695 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5696 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5697 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5698 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5699 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5700 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5701 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5702 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5703 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5704 | , TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5705 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5706 | ) : (__builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5707 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5708 | ) && ((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5709 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5710 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5711 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5712 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5713 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5714 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5715 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5716 | ) && ((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5717 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5718 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5719 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5720 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5721 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5722 | , TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5723 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5724 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5725 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5726 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5727 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5728 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5729 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5730 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5731 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5732 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5733 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-18165 |
5734 | ))[3] - __s2[3]);TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5735 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5736 | ) && ((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5737 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5738 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5739 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5740 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5741 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5742 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5743 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5744 | ) && ((size_t)(const void *)((TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5745 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5746 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5747 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5748 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5749 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5750 | , TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5751 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5752 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5753 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5754 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5755 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5756 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5757 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5758 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5759 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5760 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5761 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0-18165 |
5762 | ))[3] - __s2[3]);TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5763 | kdfnameTRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5764 | , TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5765 | "none"TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5766 | )))); }) TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
| 322-18165 |
5767 | != 0TRUE | evaluated 322 times by 1 test | FALSE | evaluated 18165 times by 2 tests |
&& | 322-18165 |
5768 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5769 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5770 | ) && __builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5771 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5772 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5773 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5774 | ), __s2_len = __builtin_strlen (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5775 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5776 | ), (!((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5777 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5778 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5779 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5780 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5781 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5782 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5783 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5784 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5785 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5786 | , TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5787 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5788 | ) : (__builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5789 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5790 | ) && ((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5791 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5792 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5793 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5794 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5795 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5796 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5797 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5798 | ) && ((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5799 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5800 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5801 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5802 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5803 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5804 | , TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5805 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5806 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5807 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5808 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5809 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5810 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5811 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5812 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5813 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5814 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5815 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-318 |
5816 | ))[3] - __s2[3]);TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5817 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5818 | ) && ((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5819 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5820 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5821 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5822 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5823 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5824 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5825 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5826 | ) && ((size_t)(const void *)((TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5827 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5828 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5829 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5830 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5831 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5832 | , TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5833 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5834 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5835 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5836 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5837 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5838 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5839 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5840 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5841 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5842 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5843 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); | 0-318 |
5844 | ))[3] - __s2[3]);TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 0-318 |
5845 | kdfnameTRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5846 | , TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5847 | "bcrypt"TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5848 | )))); }) TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 4-318 |
5849 | != 0TRUE | evaluated 318 times by 1 test | FALSE | evaluated 4 times by 1 test |
) { | 4-318 |
5850 | r = -42; | - |
5851 | gotoexecuted 318 times by 1 test: goto out; out;executed 318 times by 1 test: goto out; | 318 |
5852 | } | - |
5853 | if (!TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5854 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5855 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5856 | ) && __builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5857 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5858 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5859 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5860 | ), __s2_len = __builtin_strlen (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5861 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5862 | ), (!((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5863 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5864 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5865 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5866 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5867 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5868 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5869 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5870 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5871 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5872 | , TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5873 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5874 | ) : (__builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5875 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5876 | ) && ((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5877 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5878 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5879 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5880 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5881 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5882 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5883 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5884 | ) && ((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5885 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5886 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5887 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5888 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5889 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5890 | , TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5891 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5892 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5893 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5894 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5895 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5896 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5897 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5898 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5899 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5900 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5901 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-18165 |
5902 | ))[3] - __s2[3]);TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5903 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5904 | ) && ((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5905 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5906 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5907 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5908 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5909 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5910 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5911 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5912 | ) && ((size_t)(const void *)((TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5913 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5914 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5915 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5916 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5917 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5918 | , TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5919 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5920 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5921 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5922 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5923 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5924 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5925 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5926 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5927 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5928 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5929 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0-18165 |
5930 | ))[3] - __s2[3]);TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 0-18165 |
5931 | kdfnameTRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5932 | , TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5933 | "none"TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5934 | )))); })TRUE | evaluated 18165 times by 2 tests | FALSE | evaluated 4 times by 1 test |
| 4-18165 |
5935 | && | - |
5936 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5937 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5938 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5939 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5940 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5941 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5942 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5943 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5944 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5945 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5946 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5947 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5948 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5949 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5950 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5951 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5952 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5953 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5954 | , TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5955 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5956 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5957 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5958 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5959 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5960 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5961 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5962 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5963 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5964 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5965 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5966 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5967 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5968 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5969 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5970 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5971 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5972 | , TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5973 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5974 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5975 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5976 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5977 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5978 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5979 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5980 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5981 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5982 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5983 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); | 0-18165 |
5984 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ciphername ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5985 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5986 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5987 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5988 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5989 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5990 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5991 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5992 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5993 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5994 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5995 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5996 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5997 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5998 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
5999 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6000 | , TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6001 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6002 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6003 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6004 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6005 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6006 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6007 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6008 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6009 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6010 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6011 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0-18165 |
6012 | ))[3] - __s2[3]);TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6013 | ciphernameTRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6014 | , TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6015 | "none"TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6016 | )))); }) TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
| 0-18165 |
6017 | != 0TRUE | never evaluated | FALSE | evaluated 18165 times by 2 tests |
) { | 0-18165 |
6018 | r = -4; | - |
6019 | goto never executed: goto out; out;never executed: goto out; | 0 |
6020 | } | - |
6021 | if (nkeys != 1TRUE | evaluated 322 times by 1 test | FALSE | evaluated 17847 times by 2 tests |
) { | 322-17847 |
6022 | | - |
6023 | r = -4; | - |
6024 | gotoexecuted 322 times by 1 test: goto out; out;executed 322 times by 1 test: goto out; | 322 |
6025 | } | - |
6026 | | - |
6027 | | - |
6028 | blocksize = cipher_blocksize(cipher); | - |
6029 | if (encrypted_len < blocksizeTRUE | never evaluated | FALSE | evaluated 17847 times by 2 tests |
|| (TRUE | evaluated 96 times by 1 test | FALSE | evaluated 17751 times by 2 tests |
encrypted_len % blocksize) != 0TRUE | evaluated 96 times by 1 test | FALSE | evaluated 17751 times by 2 tests |
) { | 0-17847 |
6030 | r = -4; | - |
6031 | gotoexecuted 96 times by 1 test: goto out; out;executed 96 times by 1 test: goto out; | 96 |
6032 | } | - |
6033 | | - |
6034 | | - |
6035 | keylen = cipher_keylen(cipher); | - |
6036 | ivlen = cipher_ivlen(cipher); | - |
6037 | authlen = cipher_authlen(cipher); | - |
6038 | if ((TRUE | never evaluated | FALSE | evaluated 17751 times by 2 tests |
key = calloc(1, keylen + ivlen)) == TRUE | never evaluated | FALSE | evaluated 17751 times by 2 tests |
| 0-17751 |
6039 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 17751 times by 2 tests |
| 0-17751 |
6040 | ) { | - |
6041 | r = -2; | - |
6042 | goto never executed: goto out; out;never executed: goto out; | 0 |
6043 | } | - |
6044 | if ( | - |
6045 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6046 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6047 | ) && __builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6048 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6049 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6050 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6051 | ), __s2_len = __builtin_strlen (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6052 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6053 | ), (!((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6054 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6055 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6056 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6057 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6058 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6059 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6060 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6061 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6062 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6063 | , TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6064 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6065 | ) : (__builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6066 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6067 | ) && ((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6068 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6069 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6070 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6071 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6072 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6073 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6074 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6075 | ) && ((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6076 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6077 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6078 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6079 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6080 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6081 | , TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6082 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6083 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6084 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6085 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6086 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6087 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6088 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6089 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6090 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6091 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6092 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); | 0-17747 |
6093 | ))[3] - __s2[3]);TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( kdfname ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6094 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6095 | ) && ((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6096 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6097 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6098 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6099 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6100 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6101 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6102 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6103 | ) && ((size_t)(const void *)((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6104 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6105 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6106 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6107 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6108 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6109 | , TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6110 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6111 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6112 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6113 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6114 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6115 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6116 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6117 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6118 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6119 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6120 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); | 0-17747 |
6121 | ))[3] - __s2[3]);TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "bcrypt" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 0-17747 |
6122 | kdfnameTRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6123 | , TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6124 | "bcrypt"TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6125 | )))); }) TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
| 4-17747 |
6126 | == 0TRUE | evaluated 4 times by 1 test | FALSE | evaluated 17747 times by 2 tests |
) { | 4-17747 |
6127 | if ((TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
r = sshbuf_get_string(kdf, &salt, &slen)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
|| | 0-4 |
6128 | (TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
r = sshbuf_get_u32(kdf, &rounds)) != 0TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) | 0-4 |
6129 | goto never executed: goto out; out;never executed: goto out; | 0 |
6130 | if (bcrypt_pbkdf(passphrase, strlen(passphrase), salt, slen,TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
6131 | key, keylen + ivlen, rounds) < 0TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) { | 0-4 |
6132 | r = -4; | - |
6133 | goto never executed: goto out; out;never executed: goto out; | 0 |
6134 | } | - |
6135 | }executed 4 times by 1 test: end of block | 4 |
6136 | | - |
6137 | | - |
6138 | if (sshbuf_len(decoded) < encrypted_len + authlenTRUE | evaluated 360 times by 1 test | FALSE | evaluated 17391 times by 2 tests |
) { | 360-17391 |
6139 | r = -4; | - |
6140 | gotoexecuted 360 times by 1 test: goto out; out;executed 360 times by 1 test: goto out; | 360 |
6141 | } | - |
6142 | | - |
6143 | | - |
6144 | if ((TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
r = sshbuf_reserve(decrypted, encrypted_len, &dp)) != 0TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
|| | 0-17391 |
6145 | (TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
r = cipher_init(&ciphercontext, cipher, key, keylen,TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
| 0-17391 |
6146 | key + keylen, ivlen, 0)) != 0TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
) | 0-17391 |
6147 | goto never executed: goto out; out;never executed: goto out; | 0 |
6148 | if ((TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
r = cipher_crypt(ciphercontext, 0, dp, sshbuf_ptr(decoded),TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
| 0-17391 |
6149 | encrypted_len, 0, authlen)) != 0TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
) { | 0-17391 |
6150 | | - |
6151 | if (r == -30TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
6152 | r = -43; never executed: r = -43; | 0 |
6153 | goto never executed: goto out; out;never executed: goto out; | 0 |
6154 | } | - |
6155 | if ((TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
r = sshbuf_consume(decoded, encrypted_len + authlen)) != 0TRUE | never evaluated | FALSE | evaluated 17391 times by 2 tests |
) | 0-17391 |
6156 | goto never executed: goto out; out;never executed: goto out; | 0 |
6157 | | - |
6158 | if (sshbuf_len(decoded) != 0TRUE | evaluated 30 times by 1 test | FALSE | evaluated 17361 times by 2 tests |
) { | 30-17361 |
6159 | r = -4; | - |
6160 | gotoexecuted 30 times by 1 test: goto out; out;executed 30 times by 1 test: goto out; | 30 |
6161 | } | - |
6162 | | - |
6163 | | - |
6164 | if ((TRUE | never evaluated | FALSE | evaluated 17361 times by 2 tests |
r = sshbuf_get_u32(decrypted, &check1)) != 0TRUE | never evaluated | FALSE | evaluated 17361 times by 2 tests |
|| | 0-17361 |
6165 | (TRUE | never evaluated | FALSE | evaluated 17361 times by 2 tests |
r = sshbuf_get_u32(decrypted, &check2)) != 0TRUE | never evaluated | FALSE | evaluated 17361 times by 2 tests |
) | 0-17361 |
6166 | goto never executed: goto out; out;never executed: goto out; | 0 |
6167 | if (check1 != check2TRUE | evaluated 681 times by 1 test | FALSE | evaluated 16680 times by 2 tests |
) { | 681-16680 |
6168 | r = -43; | - |
6169 | gotoexecuted 681 times by 1 test: goto out; out;executed 681 times by 1 test: goto out; | 681 |
6170 | } | - |
6171 | | - |
6172 | | - |
6173 | if ((TRUE | evaluated 1959 times by 1 test | FALSE | evaluated 14721 times by 2 tests |
r = sshkey_private_deserialize(decrypted, &k)) != 0TRUE | evaluated 1959 times by 1 test | FALSE | evaluated 14721 times by 2 tests |
|| | 1959-14721 |
6174 | (TRUE | evaluated 320 times by 1 test | FALSE | evaluated 14401 times by 2 tests |
r = sshbuf_get_cstring(decrypted, &comment, TRUE | evaluated 320 times by 1 test | FALSE | evaluated 14401 times by 2 tests |
| 320-14401 |
6175 | ((void *)0)TRUE | evaluated 320 times by 1 test | FALSE | evaluated 14401 times by 2 tests |
| 320-14401 |
6176 | )) != 0TRUE | evaluated 320 times by 1 test | FALSE | evaluated 14401 times by 2 tests |
) | 320-14401 |
6177 | gotoexecuted 2279 times by 1 test: goto out; out;executed 2279 times by 1 test: goto out; | 2279 |
6178 | | - |
6179 | | - |
6180 | i = 0; | - |
6181 | while (sshbuf_len(decrypted)TRUE | evaluated 28668 times by 2 tests | FALSE | evaluated 14172 times by 2 tests |
) { | 14172-28668 |
6182 | if ((TRUE | never evaluated | FALSE | evaluated 28668 times by 2 tests |
r = sshbuf_get_u8(decrypted, &pad)) != 0TRUE | never evaluated | FALSE | evaluated 28668 times by 2 tests |
) | 0-28668 |
6183 | goto never executed: goto out; out;never executed: goto out; | 0 |
6184 | if (pad != (++i & 0xff)TRUE | evaluated 229 times by 1 test | FALSE | evaluated 28439 times by 2 tests |
) { | 229-28439 |
6185 | r = -4; | - |
6186 | gotoexecuted 229 times by 1 test: goto out; out;executed 229 times by 1 test: goto out; | 229 |
6187 | } | - |
6188 | }executed 28439 times by 2 tests: end of block | 28439 |
6189 | | - |
6190 | | - |
6191 | | - |
6192 | | - |
6193 | r = 0; | - |
6194 | if (keyp != TRUE | evaluated 14172 times by 2 tests | FALSE | never evaluated |
| 0-14172 |
6195 | ((void *)0)TRUE | evaluated 14172 times by 2 tests | FALSE | never evaluated |
| 0-14172 |
6196 | ) { | - |
6197 | *keyp = k; | - |
6198 | k = | - |
6199 | ((void *)0) | - |
6200 | ; | - |
6201 | }executed 14172 times by 2 tests: end of block | 14172 |
6202 | if (commentp != TRUE | never evaluated | FALSE | evaluated 14172 times by 2 tests |
| 0-14172 |
6203 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 14172 times by 2 tests |
| 0-14172 |
6204 | ) { | - |
6205 | *commentp = comment; | - |
6206 | comment = | - |
6207 | ((void *)0) | - |
6208 | ; | - |
6209 | } never executed: end of block | 0 |
6210 | out:code before this statement executed 14172 times by 2 tests: out: | 14172 |
6211 | pad = 0; | - |
6212 | cipher_free(ciphercontext); | - |
6213 | free(ciphername); | - |
6214 | free(kdfname); | - |
6215 | free(comment); | - |
6216 | if (salt != TRUE | evaluated 4 times by 1 test | FALSE | evaluated 254946 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 4-254946 |
6217 | ((void *)0)TRUE | evaluated 4 times by 1 test | FALSE | evaluated 254946 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 4-254946 |
6218 | ) { | - |
6219 | explicit_bzero(salt, slen); | - |
6220 | free(salt); | - |
6221 | }executed 4 times by 1 test: end of block | 4 |
6222 | if (key != TRUE | evaluated 17751 times by 2 tests | FALSE | evaluated 237199 times by 2 tests |
| 17751-237199 |
6223 | ((void *)0)TRUE | evaluated 17751 times by 2 tests | FALSE | evaluated 237199 times by 2 tests |
| 17751-237199 |
6224 | ) { | - |
6225 | explicit_bzero(key, keylen + ivlen); | - |
6226 | free(key); | - |
6227 | }executed 17751 times by 2 tests: end of block | 17751 |
6228 | sshbuf_free(encoded); | - |
6229 | sshbuf_free(decoded); | - |
6230 | sshbuf_free(kdf); | - |
6231 | sshbuf_free(decrypted); | - |
6232 | sshkey_free(k); | - |
6233 | returnexecuted 254950 times by 3 tests: return r; Executed by:- ssh-keygen
- sshd
- test_sshkey
r;executed 254950 times by 3 tests: return r; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6234 | } | - |
6235 | | - |
6236 | | - |
6237 | | - |
6238 | | - |
6239 | static int | - |
6240 | sshkey_private_pem_to_blob(struct sshkey *key, struct sshbuf *blob, | - |
6241 | const char *_passphrase, const char *comment) | - |
6242 | { | - |
6243 | int success, r; | - |
6244 | int blen, len = strlen(_passphrase); | - |
6245 | u_char *passphrase = (TRUE | never evaluated | FALSE | never evaluated |
len > 0)TRUE | never evaluated | FALSE | never evaluated |
? (u_char *)_passphrase : | 0 |
6246 | ((void *)0) | - |
6247 | ; | - |
6248 | const EVP_CIPHER *cipher = (TRUE | never evaluated | FALSE | never evaluated |
len > 0)TRUE | never evaluated | FALSE | never evaluated |
? EVP_aes_128_cbc() : | 0 |
6249 | ((void *)0) | - |
6250 | ; | - |
6251 | char *bptr; | - |
6252 | BIO *bio = | - |
6253 | ((void *)0) | - |
6254 | ; | - |
6255 | | - |
6256 | if (len > 0TRUE | never evaluated | FALSE | never evaluated |
&& len <= 4TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
6257 | return never executed: return -40; -40;never executed: return -40; | 0 |
6258 | if ((TRUE | never evaluated | FALSE | never evaluated |
bio = BIO_new(BIO_s_mem())) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6259 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6260 | ) | - |
6261 | return never executed: return -2; -2;never executed: return -2; | 0 |
6262 | | - |
6263 | switch (key->type) { | - |
6264 | case never executed: case KEY_DSA: KEY_DSA:never executed: case KEY_DSA: | 0 |
6265 | success = PEM_write_bio_DSAPrivateKey(bio, key->dsa, | - |
6266 | cipher, passphrase, len, | - |
6267 | ((void *)0) | - |
6268 | , | - |
6269 | ((void *)0) | - |
6270 | ); | - |
6271 | break; never executed: break; | 0 |
6272 | | - |
6273 | case never executed: case KEY_ECDSA: KEY_ECDSA:never executed: case KEY_ECDSA: | 0 |
6274 | success = PEM_write_bio_ECPrivateKey(bio, key->ecdsa, | - |
6275 | cipher, passphrase, len, | - |
6276 | ((void *)0) | - |
6277 | , | - |
6278 | ((void *)0) | - |
6279 | ); | - |
6280 | break; never executed: break; | 0 |
6281 | | - |
6282 | case never executed: case KEY_RSA: KEY_RSA:never executed: case KEY_RSA: | 0 |
6283 | success = PEM_write_bio_RSAPrivateKey(bio, key->rsa, | - |
6284 | cipher, passphrase, len, | - |
6285 | ((void *)0) | - |
6286 | , | - |
6287 | ((void *)0) | - |
6288 | ); | - |
6289 | break; never executed: break; | 0 |
6290 | default never executed: default: :never executed: default: | 0 |
6291 | success = 0; | - |
6292 | break; never executed: break; | 0 |
6293 | } | - |
6294 | if (success == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
6295 | r = -22; | - |
6296 | goto never executed: goto out; out;never executed: goto out; | 0 |
6297 | } | - |
6298 | if ((TRUE | never evaluated | FALSE | never evaluated |
blen = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6299 | BIO_ctrl(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6300 | bioTRUE | never evaluated | FALSE | never evaluated |
| 0 |
6301 | ,3,0,(char *)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6302 | &bptrTRUE | never evaluated | FALSE | never evaluated |
| 0 |
6303 | )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
6304 | ) <= 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
6305 | r = -1; | - |
6306 | goto never executed: goto out; out;never executed: goto out; | 0 |
6307 | } | - |
6308 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_put(blob, bptr, blen)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
6309 | goto never executed: goto out; out;never executed: goto out; | 0 |
6310 | r = 0; | - |
6311 | out: code before this statement never executed: out: | 0 |
6312 | BIO_free(bio); | - |
6313 | return never executed: return r; r;never executed: return r; | 0 |
6314 | } | - |
6315 | | - |
6316 | | - |
6317 | | - |
6318 | int | - |
6319 | sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob, | - |
6320 | const char *passphrase, const char *comment, | - |
6321 | int force_new_format, const char *new_format_cipher, int new_format_rounds) | - |
6322 | { | - |
6323 | switch (key->type) { | - |
6324 | | - |
6325 | caseexecuted 1 time by 1 test: case KEY_DSA: KEY_DSA:executed 1 time by 1 test: case KEY_DSA: | 1 |
6326 | caseexecuted 1 time by 1 test: case KEY_ECDSA: KEY_ECDSA:executed 1 time by 1 test: case KEY_ECDSA: | 1 |
6327 | caseexecuted 2 times by 1 test: case KEY_RSA: KEY_RSA:executed 2 times by 1 test: case KEY_RSA: | 2 |
6328 | if (force_new_formatTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
) { | 0-4 |
6329 | returnexecuted 4 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); sshkey_private_to_blob2(key, blob, passphrase,executed 4 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); | 4 |
6330 | comment, new_format_cipher, new_format_rounds);executed 4 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); | 4 |
6331 | } | - |
6332 | return never executed: return sshkey_private_pem_to_blob(key, blob, passphrase, comment); sshkey_private_pem_to_blob(key, blob,never executed: return sshkey_private_pem_to_blob(key, blob, passphrase, comment); | 0 |
6333 | passphrase, comment); never executed: return sshkey_private_pem_to_blob(key, blob, passphrase, comment); | 0 |
6334 | | - |
6335 | caseexecuted 3 times by 1 test: case KEY_ED25519: KEY_ED25519:executed 3 times by 1 test: case KEY_ED25519: | 3 |
6336 | | - |
6337 | | - |
6338 | | - |
6339 | returnexecuted 3 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); sshkey_private_to_blob2(key, blob, passphrase,executed 3 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); | 3 |
6340 | comment, new_format_cipher, new_format_rounds);executed 3 times by 1 test: return sshkey_private_to_blob2(key, blob, passphrase, comment, new_format_cipher, new_format_rounds); | 3 |
6341 | default never executed: default: :never executed: default: | 0 |
6342 | return never executed: return -14; -14;never executed: return -14; | 0 |
6343 | } | - |
6344 | } | - |
6345 | | - |
6346 | | - |
6347 | | - |
6348 | static int | - |
6349 | translate_libcrypto_error(unsigned long pem_err) | - |
6350 | { | - |
6351 | int pem_reason = | - |
6352 | (int)(( | - |
6353 | pem_err | - |
6354 | )&0xfffL) | - |
6355 | ; | - |
6356 | | - |
6357 | switch ( | - |
6358 | (int)((((unsigned long) | - |
6359 | pem_err | - |
6360 | )>>24L)&0xffL) | - |
6361 | ) { | - |
6362 | caseexecuted 99618 times by 1 test: case 9 : executed 99618 times by 1 test: case 9 : | 99618 |
6363 | 9executed 99618 times by 1 test: case 9 : | 99618 |
6364 | :executed 99618 times by 1 test: case 9 : | 99618 |
6365 | switch (pem_reason) { | - |
6366 | case never executed: case 104 : never executed: case 104 : | 0 |
6367 | 104 never executed: case 104 : | 0 |
6368 | : never executed: case 104 : | 0 |
6369 | case never executed: case 109 : never executed: case 109 : | 0 |
6370 | 109 never executed: case 109 : | 0 |
6371 | : never executed: case 109 : | 0 |
6372 | case never executed: case 101 : never executed: case 101 : | 0 |
6373 | 101 never executed: case 101 : | 0 |
6374 | : never executed: case 101 : | 0 |
6375 | return never executed: return -43; -43;never executed: return -43; | 0 |
6376 | defaultexecuted 99618 times by 1 test: default: :executed 99618 times by 1 test: default: | 99618 |
6377 | returnexecuted 99618 times by 1 test: return -4; -4;executed 99618 times by 1 test: return -4; | 99618 |
6378 | } | - |
6379 | case never executed: case 6 : never executed: case 6 : | 0 |
6380 | 6 never executed: case 6 : | 0 |
6381 | : never executed: case 6 : | 0 |
6382 | switch (pem_reason) { | - |
6383 | case never executed: case 100 : never executed: case 100 : | 0 |
6384 | 100 never executed: case 100 : | 0 |
6385 | : never executed: case 100 : | 0 |
6386 | return never executed: return -43; -43;never executed: return -43; | 0 |
6387 | | - |
6388 | case never executed: case 112 : never executed: case 112 : | 0 |
6389 | 112 never executed: case 112 : | 0 |
6390 | : never executed: case 112 : | 0 |
6391 | | - |
6392 | case never executed: case 114 : never executed: case 114 : | 0 |
6393 | 114 never executed: case 114 : | 0 |
6394 | : never executed: case 114 : | 0 |
6395 | | - |
6396 | case never executed: case 145 : never executed: case 145 : | 0 |
6397 | 145 never executed: case 145 : | 0 |
6398 | : never executed: case 145 : | 0 |
6399 | | - |
6400 | return never executed: return -4; -4;never executed: return -4; | 0 |
6401 | default never executed: default: :never executed: default: | 0 |
6402 | return never executed: return -22; -22;never executed: return -22; | 0 |
6403 | } | - |
6404 | caseexecuted 10612 times by 1 test: case 13 : executed 10612 times by 1 test: case 13 : | 10612 |
6405 | 13executed 10612 times by 1 test: case 13 : | 10612 |
6406 | :executed 10612 times by 1 test: case 13 : | 10612 |
6407 | returnexecuted 10612 times by 1 test: return -4; -4;executed 10612 times by 1 test: return -4; | 10612 |
6408 | } | - |
6409 | returnexecuted 12218 times by 1 test: return -22; -22;executed 12218 times by 1 test: return -22; | 12218 |
6410 | } | - |
6411 | | - |
6412 | static void | - |
6413 | clear_libcrypto_errors(void) | - |
6414 | { | - |
6415 | while (ERR_get_error() != 0TRUE | evaluated 215165 times by 1 test | FALSE | evaluated 240097 times by 2 tests |
) | 215165-240097 |
6416 | ;executed 215165 times by 1 test: ; | 215165 |
6417 | }executed 240097 times by 2 tests: end of block | 240097 |
6418 | | - |
6419 | | - |
6420 | | - |
6421 | | - |
6422 | | - |
6423 | static int | - |
6424 | convert_libcrypto_error(void) | - |
6425 | { | - |
6426 | | - |
6427 | | - |
6428 | | - |
6429 | | - |
6430 | if (translate_libcrypto_error(ERR_peek_error()) ==TRUE | never evaluated | FALSE | evaluated 61224 times by 1 test |
| 0-61224 |
6431 | -43TRUE | never evaluated | FALSE | evaluated 61224 times by 1 test |
) | 0-61224 |
6432 | return never executed: return -43; -43;never executed: return -43; | 0 |
6433 | returnexecuted 61224 times by 1 test: return translate_libcrypto_error(ERR_peek_last_error()); translate_libcrypto_error(ERR_peek_last_error());executed 61224 times by 1 test: return translate_libcrypto_error(ERR_peek_last_error()); | 61224 |
6434 | } | - |
6435 | | - |
6436 | static int | - |
6437 | sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type, | - |
6438 | const char *passphrase, struct sshkey **keyp) | - |
6439 | { | - |
6440 | EVP_PKEY *pk = | - |
6441 | ((void *)0) | - |
6442 | ; | - |
6443 | struct sshkey *prv = | - |
6444 | ((void *)0) | - |
6445 | ; | - |
6446 | BIO *bio = | - |
6447 | ((void *)0) | - |
6448 | ; | - |
6449 | int r; | - |
6450 | | - |
6451 | if (keyp != TRUE | evaluated 240097 times by 2 tests | FALSE | never evaluated |
| 0-240097 |
6452 | ((void *)0)TRUE | evaluated 240097 times by 2 tests | FALSE | never evaluated |
| 0-240097 |
6453 | ) | - |
6454 | *executed 240097 times by 2 tests: *keyp = ((void *)0) ; keyp = executed 240097 times by 2 tests: *keyp = ((void *)0) ; | 240097 |
6455 | ((void *)0)executed 240097 times by 2 tests: *keyp = ((void *)0) ; | 240097 |
6456 | ;executed 240097 times by 2 tests: *keyp = ((void *)0) ; | 240097 |
6457 | | - |
6458 | if ((TRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
bio = BIO_new(BIO_s_mem())) == TRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
| 0-240097 |
6459 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
| 0-240097 |
6460 | || sshbuf_len(blob) > 0x7fffffffTRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
) | 0-240097 |
6461 | return never executed: return -2; -2;never executed: return -2; | 0 |
6462 | if (BIO_write(bio, sshbuf_ptr(blob), sshbuf_len(blob)) !=TRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
| 0-240097 |
6463 | (int)sshbuf_len(blob)TRUE | never evaluated | FALSE | evaluated 240097 times by 2 tests |
) { | 0-240097 |
6464 | r = -2; | - |
6465 | goto never executed: goto out; out;never executed: goto out; | 0 |
6466 | } | - |
6467 | | - |
6468 | clear_libcrypto_errors(); | - |
6469 | if ((TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
pk = PEM_read_bio_PrivateKey(bio, TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6470 | ((void *)0)TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6471 | , TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6472 | ((void *)0)TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6473 | ,TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6474 | (char *)passphrase)) == TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6475 | ((void *)0)TRUE | evaluated 61224 times by 1 test | FALSE | evaluated 178873 times by 2 tests |
| 61224-178873 |
6476 | ) { | - |
6477 | r = convert_libcrypto_error(); | - |
6478 | gotoexecuted 61224 times by 1 test: goto out; out;executed 61224 times by 1 test: goto out; | 61224 |
6479 | } | - |
6480 | if (EVP_PKEY_base_id(pk) == TRUE | evaluated 99538 times by 2 tests | FALSE | evaluated 79335 times by 2 tests |
| 79335-99538 |
6481 | 6TRUE | evaluated 99538 times by 2 tests | FALSE | evaluated 79335 times by 2 tests |
| 79335-99538 |
6482 | && | - |
6483 | (type == KEY_UNSPECTRUE | evaluated 99538 times by 2 tests | FALSE | never evaluated |
|| type == KEY_RSATRUE | never evaluated | FALSE | never evaluated |
)) { | 0-99538 |
6484 | if ((TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
prv = sshkey_new(KEY_UNSPEC)) == TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
| 0-99538 |
6485 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
| 0-99538 |
6486 | ) { | - |
6487 | r = -2; | - |
6488 | goto never executed: goto out; out;never executed: goto out; | 0 |
6489 | } | - |
6490 | prv->rsa = EVP_PKEY_get1_RSA(pk); | - |
6491 | prv->type = KEY_RSA; | - |
6492 | | - |
6493 | | - |
6494 | | - |
6495 | if (RSA_blinding_on(prv->rsa, TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
| 0-99538 |
6496 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
| 0-99538 |
6497 | ) != 1TRUE | never evaluated | FALSE | evaluated 99538 times by 2 tests |
) { | 0-99538 |
6498 | r = -22; | - |
6499 | goto never executed: goto out; out;never executed: goto out; | 0 |
6500 | } | - |
6501 | if ((TRUE | evaluated 4 times by 1 test | FALSE | evaluated 99534 times by 2 tests |
r = check_rsa_length(prv->rsa)) != 0TRUE | evaluated 4 times by 1 test | FALSE | evaluated 99534 times by 2 tests |
) | 4-99534 |
6502 | gotoexecuted 4 times by 1 test: goto out; out;executed 4 times by 1 test: goto out; | 4 |
6503 | }executed 99534 times by 2 tests: end of block else if (EVP_PKEY_base_id(pk) == TRUE | evaluated 73397 times by 2 tests | FALSE | evaluated 5938 times by 1 test |
| 5938-99534 |
6504 | 116TRUE | evaluated 73397 times by 2 tests | FALSE | evaluated 5938 times by 1 test |
| 5938-73397 |
6505 | && | - |
6506 | (type == KEY_UNSPECTRUE | evaluated 73397 times by 2 tests | FALSE | never evaluated |
|| type == KEY_DSATRUE | never evaluated | FALSE | never evaluated |
)) { | 0-73397 |
6507 | if ((TRUE | never evaluated | FALSE | evaluated 73397 times by 2 tests |
prv = sshkey_new(KEY_UNSPEC)) == TRUE | never evaluated | FALSE | evaluated 73397 times by 2 tests |
| 0-73397 |
6508 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 73397 times by 2 tests |
| 0-73397 |
6509 | ) { | - |
6510 | r = -2; | - |
6511 | goto never executed: goto out; out;never executed: goto out; | 0 |
6512 | } | - |
6513 | prv->dsa = EVP_PKEY_get1_DSA(pk); | - |
6514 | prv->type = KEY_DSA; | - |
6515 | | - |
6516 | | - |
6517 | | - |
6518 | | - |
6519 | }executed 73397 times by 2 tests: end of block else if (EVP_PKEY_base_id(pk) == TRUE | evaluated 5938 times by 1 test | FALSE | never evaluated |
| 0-73397 |
6520 | 408TRUE | evaluated 5938 times by 1 test | FALSE | never evaluated |
| 0-5938 |
6521 | && | - |
6522 | (type == KEY_UNSPECTRUE | evaluated 5938 times by 1 test | FALSE | never evaluated |
|| type == KEY_ECDSATRUE | never evaluated | FALSE | never evaluated |
)) { | 0-5938 |
6523 | if ((TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
prv = sshkey_new(KEY_UNSPEC)) == TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
| 0-5938 |
6524 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
| 0-5938 |
6525 | ) { | - |
6526 | r = -2; | - |
6527 | goto never executed: goto out; out;never executed: goto out; | 0 |
6528 | } | - |
6529 | prv->ecdsa = EVP_PKEY_get1_EC_KEY(pk); | - |
6530 | prv->type = KEY_ECDSA; | - |
6531 | prv->ecdsa_nid = sshkey_ecdsa_key_to_nid(prv->ecdsa); | - |
6532 | if (prv->ecdsa_nid == -1TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
|| | 0-5938 |
6533 | sshkey_curve_nid_to_name(prv->ecdsa_nid) == TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
| 0-5938 |
6534 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
| 0-5938 |
6535 | || | - |
6536 | sshkey_ec_validate_public(EC_KEY_get0_group(prv->ecdsa),TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
| 0-5938 |
6537 | EC_KEY_get0_public_key(prv->ecdsa)) != 0TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
|| | 0-5938 |
6538 | sshkey_ec_validate_private(prv->ecdsa) != 0TRUE | never evaluated | FALSE | evaluated 5938 times by 1 test |
) { | 0-5938 |
6539 | r = -4; | - |
6540 | goto never executed: goto out; out;never executed: goto out; | 0 |
6541 | } | - |
6542 | | - |
6543 | | - |
6544 | | - |
6545 | | - |
6546 | | - |
6547 | }executed 5938 times by 1 test: end of block else { | 5938 |
6548 | r = -4; | - |
6549 | goto never executed: goto out; out;never executed: goto out; | 0 |
6550 | } | - |
6551 | r = 0; | - |
6552 | if (keyp != TRUE | evaluated 178869 times by 2 tests | FALSE | never evaluated |
| 0-178869 |
6553 | ((void *)0)TRUE | evaluated 178869 times by 2 tests | FALSE | never evaluated |
| 0-178869 |
6554 | ) { | - |
6555 | *keyp = prv; | - |
6556 | prv = | - |
6557 | ((void *)0) | - |
6558 | ; | - |
6559 | }executed 178869 times by 2 tests: end of block | 178869 |
6560 | out:code before this statement executed 178869 times by 2 tests: out: | 178869 |
6561 | BIO_free(bio); | - |
6562 | EVP_PKEY_free(pk); | - |
6563 | sshkey_free(prv); | - |
6564 | returnexecuted 240097 times by 2 tests: return r; r;executed 240097 times by 2 tests: return r; | 240097 |
6565 | } | - |
6566 | | - |
6567 | | - |
6568 | int | - |
6569 | sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, | - |
6570 | const char *passphrase, struct sshkey **keyp, char **commentp) | - |
6571 | { | - |
6572 | int r = -1; | - |
6573 | | - |
6574 | if (keyp != TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
6575 | ((void *)0)TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
6576 | ) | - |
6577 | *executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
keyp = executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6578 | ((void *)0)executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6579 | ;executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6580 | if (commentp != TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
6581 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
6582 | ) | - |
6583 | * never executed: *commentp = ((void *)0) ; commentp = never executed: *commentp = ((void *)0) ; | 0 |
6584 | ((void *)0) never executed: *commentp = ((void *)0) ; | 0 |
6585 | ; never executed: *commentp = ((void *)0) ; | 0 |
6586 | | - |
6587 | switch (type) { | - |
6588 | | - |
6589 | case never executed: case KEY_DSA: KEY_DSA:never executed: case KEY_DSA: | 0 |
6590 | case never executed: case KEY_ECDSA: KEY_ECDSA:never executed: case KEY_ECDSA: | 0 |
6591 | case never executed: case KEY_RSA: KEY_RSA:never executed: case KEY_RSA: | 0 |
6592 | return never executed: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); sshkey_parse_private_pem_fileblob(blob, type,never executed: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); | 0 |
6593 | passphrase, keyp); never executed: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); | 0 |
6594 | | - |
6595 | case never executed: case KEY_ED25519: KEY_ED25519:never executed: case KEY_ED25519: | 0 |
6596 | | - |
6597 | | - |
6598 | | - |
6599 | return never executed: return sshkey_parse_private2(blob, type, passphrase, keyp, commentp); sshkey_parse_private2(blob, type, passphrase,never executed: return sshkey_parse_private2(blob, type, passphrase, keyp, commentp); | 0 |
6600 | keyp, commentp); never executed: return sshkey_parse_private2(blob, type, passphrase, keyp, commentp); | 0 |
6601 | caseexecuted 254950 times by 3 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_sshkey
KEY_UNSPEC:executed 254950 times by 3 tests: case KEY_UNSPEC: Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6602 | r = sshkey_parse_private2(blob, type, passphrase, keyp, | - |
6603 | commentp); | - |
6604 | | - |
6605 | if (r == 0TRUE | evaluated 14172 times by 2 tests | FALSE | evaluated 240778 times by 2 tests |
|| r == -43TRUE | evaluated 681 times by 1 test | FALSE | evaluated 240097 times by 2 tests |
) | 681-240778 |
6606 | returnexecuted 14853 times by 2 tests: return r; r;executed 14853 times by 2 tests: return r; | 14853 |
6607 | | - |
6608 | returnexecuted 240097 times by 2 tests: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); sshkey_parse_private_pem_fileblob(blob, type,executed 240097 times by 2 tests: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); | 240097 |
6609 | passphrase, keyp);executed 240097 times by 2 tests: return sshkey_parse_private_pem_fileblob(blob, type, passphrase, keyp); | 240097 |
6610 | | - |
6611 | | - |
6612 | | - |
6613 | default never executed: default: :never executed: default: | 0 |
6614 | return never executed: return -14; -14;never executed: return -14; | 0 |
6615 | } | - |
6616 | } | - |
6617 | | - |
6618 | int | - |
6619 | sshkey_parse_private_fileblob(struct sshbuf *buffer, const char *passphrase, | - |
6620 | struct sshkey **keyp, char **commentp) | - |
6621 | { | - |
6622 | if (keyp != TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
6623 | ((void *)0)TRUE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
| FALSE | never evaluated |
| 0-254950 |
6624 | ) | - |
6625 | *executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
keyp = executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6626 | ((void *)0)executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6627 | ;executed 254950 times by 3 tests: *keyp = ((void *)0) ; Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6628 | if (commentp != TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
6629 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 254950 times by 3 testsEvaluated by:- ssh-keygen
- sshd
- test_sshkey
|
| 0-254950 |
6630 | ) | - |
6631 | * never executed: *commentp = ((void *)0) ; commentp = never executed: *commentp = ((void *)0) ; | 0 |
6632 | ((void *)0) never executed: *commentp = ((void *)0) ; | 0 |
6633 | ; never executed: *commentp = ((void *)0) ; | 0 |
6634 | | - |
6635 | returnexecuted 254950 times by 3 tests: return sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC, passphrase, keyp, commentp); Executed by:- ssh-keygen
- sshd
- test_sshkey
sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC,executed 254950 times by 3 tests: return sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC, passphrase, keyp, commentp); Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6636 | passphrase, keyp, commentp);executed 254950 times by 3 tests: return sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC, passphrase, keyp, commentp); Executed by:- ssh-keygen
- sshd
- test_sshkey
| 254950 |
6637 | } | - |
6638 | int | - |
6639 | sshkey_private_serialize_maxsign(const struct sshkey *k, struct sshbuf *b, | - |
6640 | u_int32_t maxsign, sshkey_printfn *pr) | - |
6641 | { | - |
6642 | return never executed: return sshkey_private_serialize_opt(k, b, SSHKEY_SERIALIZE_DEFAULT); sshkey_private_serialize_opt(k, b, SSHKEY_SERIALIZE_DEFAULT);never executed: return sshkey_private_serialize_opt(k, b, SSHKEY_SERIALIZE_DEFAULT); | 0 |
6643 | } | - |
6644 | | - |
6645 | u_int32_t | - |
6646 | sshkey_signatures_left(const struct sshkey *k) | - |
6647 | { | - |
6648 | return never executed: return 0; 0;never executed: return 0; | 0 |
6649 | } | - |
6650 | | - |
6651 | int | - |
6652 | sshkey_enable_maxsign(struct sshkey *k, u_int32_t maxsign) | - |
6653 | { | - |
6654 | return never executed: return -10; -10;never executed: return -10; | 0 |
6655 | } | - |
6656 | | - |
6657 | int | - |
6658 | sshkey_set_filename(struct sshkey *k, const char *filename) | - |
6659 | { | - |
6660 | if (k == TRUE | never evaluated | FALSE | evaluated 6 times by 2 tests |
| 0-6 |
6661 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 6 times by 2 tests |
| 0-6 |
6662 | ) | - |
6663 | return never executed: return -10; -10;never executed: return -10; | 0 |
6664 | returnexecuted 6 times by 2 tests: return 0; 0;executed 6 times by 2 tests: return 0; | 6 |
6665 | } | - |
| | |