Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | int | - |
9 | ssh_ed25519_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, | - |
10 | const u_char *data, size_t datalen, u_int compat) | - |
11 | { | - |
12 | u_char *sig = | - |
13 | ((void *)0) | - |
14 | ; | - |
15 | size_t slen = 0, len; | - |
16 | unsigned long long smlen; | - |
17 | int r, ret; | - |
18 | struct sshbuf *b = | - |
19 | ((void *)0) | - |
20 | ; | - |
21 | | - |
22 | if (lenp != TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
23 | ((void *)0)TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
24 | ) | - |
25 | *executed 65 times by 2 tests: *lenp = 0; lenp = 0;executed 65 times by 2 tests: *lenp = 0; | 65 |
26 | if (sigp != TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
27 | ((void *)0)TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
28 | ) | - |
29 | *executed 65 times by 2 tests: *sigp = ((void *)0) ; sigp = executed 65 times by 2 tests: *sigp = ((void *)0) ; | 65 |
30 | ((void *)0)executed 65 times by 2 tests: *sigp = ((void *)0) ; | 65 |
31 | ;executed 65 times by 2 tests: *sigp = ((void *)0) ; | 65 |
32 | | - |
33 | if (key == TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
34 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
35 | || | - |
36 | sshkey_type_plain(key->type) != KEY_ED25519TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
|| | 0-65 |
37 | key->ed25519_sk == TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
38 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
39 | || | - |
40 | datalen >= 0x7fffffff - 64UTRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
) | 0-65 |
41 | return never executed: return -10; -10;never executed: return -10; | 0 |
42 | smlen = slen = datalen + 64U; | - |
43 | if ((TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
sig = malloc(slen)) == TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
44 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
45 | ) | - |
46 | return never executed: return -2; -2;never executed: return -2; | 0 |
47 | | - |
48 | if ((TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
ret = crypto_sign_ed25519(sig, &smlen, data, datalen,TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
49 | key->ed25519_sk)) != 0TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
|| smlen <= datalenTRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
) { | 0-65 |
50 | r = -10; | - |
51 | goto never executed: goto out; out;never executed: goto out; | 0 |
52 | } | - |
53 | | - |
54 | if ((TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
b = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
55 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
56 | ) { | - |
57 | r = -2; | - |
58 | goto never executed: goto out; out;never executed: goto out; | 0 |
59 | } | - |
60 | if ((TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
r = sshbuf_put_cstring(b, "ssh-ed25519")) != 0TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
|| | 0-65 |
61 | (TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
r = sshbuf_put_string(b, sig, smlen - datalen)) != 0TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
) | 0-65 |
62 | goto never executed: goto out; out;never executed: goto out; | 0 |
63 | len = sshbuf_len(b); | - |
64 | if (sigp != TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
65 | ((void *)0)TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
66 | ) { | - |
67 | if ((*TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
sigp = malloc(len)) == TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
68 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 65 times by 2 tests |
| 0-65 |
69 | ) { | - |
70 | r = -2; | - |
71 | goto never executed: goto out; out;never executed: goto out; | 0 |
72 | } | - |
73 | memcpy(*sigp, sshbuf_ptr(b), len); | - |
74 | }executed 65 times by 2 tests: end of block | 65 |
75 | if (lenp != TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
76 | ((void *)0)TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
77 | ) | - |
78 | *executed 65 times by 2 tests: *lenp = len; lenp = len;executed 65 times by 2 tests: *lenp = len; | 65 |
79 | | - |
80 | r = 0; | - |
81 | out:code before this statement executed 65 times by 2 tests: out: | 65 |
82 | sshbuf_free(b); | - |
83 | if (sig != TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
84 | ((void *)0)TRUE | evaluated 65 times by 2 tests | FALSE | never evaluated |
| 0-65 |
85 | ) { | - |
86 | explicit_bzero(sig, slen); | - |
87 | free(sig); | - |
88 | }executed 65 times by 2 tests: end of block | 65 |
89 | | - |
90 | returnexecuted 65 times by 2 tests: return r; r;executed 65 times by 2 tests: return r; | 65 |
91 | } | - |
92 | | - |
93 | int | - |
94 | ssh_ed25519_verify(const struct sshkey *key, | - |
95 | const u_char *signature, size_t signaturelen, | - |
96 | const u_char *data, size_t datalen, u_int compat) | - |
97 | { | - |
98 | struct sshbuf *b = | - |
99 | ((void *)0) | - |
100 | ; | - |
101 | char *ktype = | - |
102 | ((void *)0) | - |
103 | ; | - |
104 | const u_char *sigblob; | - |
105 | u_char *sm = | - |
106 | ((void *)0) | - |
107 | , *m = | - |
108 | ((void *)0) | - |
109 | ; | - |
110 | size_t len; | - |
111 | unsigned long long smlen = 0, mlen = 0; | - |
112 | int r, ret; | - |
113 | | - |
114 | if (key == TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
115 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
116 | || | - |
117 | sshkey_type_plain(key->type) != KEY_ED25519TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
|| | 0-18033 |
118 | key->ed25519_pk == TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
119 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
120 | || | - |
121 | datalen >= 0x7fffffff - 64UTRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
|| | 0-18033 |
122 | signature == TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
123 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
124 | || signaturelen == 0TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
) | 0-18033 |
125 | return never executed: return -10; -10;never executed: return -10; | 0 |
126 | | - |
127 | if ((TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
b = sshbuf_from(signature, signaturelen)) == TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
128 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 18033 times by 2 tests |
| 0-18033 |
129 | ) | - |
130 | return never executed: return -2; -2;never executed: return -2; | 0 |
131 | if ((TRUE | evaluated 871 times by 1 test | FALSE | evaluated 17162 times by 2 tests |
r = sshbuf_get_cstring(b, &ktype, TRUE | evaluated 871 times by 1 test | FALSE | evaluated 17162 times by 2 tests |
| 871-17162 |
132 | ((void *)0)TRUE | evaluated 871 times by 1 test | FALSE | evaluated 17162 times by 2 tests |
| 871-17162 |
133 | )) != 0TRUE | evaluated 871 times by 1 test | FALSE | evaluated 17162 times by 2 tests |
|| | 871-17162 |
134 | (TRUE | evaluated 845 times by 1 test | FALSE | evaluated 16317 times by 2 tests |
r = sshbuf_get_string_direct(b, &sigblob, &len)) != 0TRUE | evaluated 845 times by 1 test | FALSE | evaluated 16317 times by 2 tests |
) | 845-16317 |
135 | gotoexecuted 1716 times by 1 test: goto out; out;executed 1716 times by 1 test: goto out; | 1716 |
136 | if ( | - |
137 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
138 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
139 | ) && __builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
140 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
141 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
142 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
143 | ), __s2_len = __builtin_strlen (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
144 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
145 | ), (!((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
146 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
147 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
148 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
149 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
150 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
151 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
152 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
153 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
154 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
155 | , TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
156 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
157 | ) : (__builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
158 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
159 | ) && ((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
160 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
161 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
162 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
163 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
164 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
165 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
166 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
167 | ) && ((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
168 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
169 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
170 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
171 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
172 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
173 | , TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
174 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
175 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
176 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
177 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
178 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
179 | ))[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 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
180 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
181 | ))[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 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
182 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
183 | ))[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 *) ( "ssh-ed25519" ))[3] - __s2[3]); TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
184 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "ssh-ed25519" ))[3] - __s2[3]); | 0-14403 |
185 | ))[3] - __s2[3]);TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( "ssh-ed25519" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
186 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
187 | ) && ((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
188 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
189 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
190 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
191 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
192 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
193 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
194 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
195 | ) && ((size_t)(const void *)((TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
196 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
197 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
198 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
199 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
200 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
201 | , TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
202 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
203 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
204 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
205 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
206 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
207 | ))[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 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
208 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
209 | ))[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 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
210 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
211 | ))[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 *) ( ktype ))[3] - __s2[3]); TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
212 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ktype ))[3] - __s2[3]); | 0-14403 |
213 | ))[3] - __s2[3]);TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
never executed: __result = (((const unsigned char *) (const char *) ( ktype ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 0-14403 |
214 | "ssh-ed25519"TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
215 | , TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
216 | ktypeTRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
217 | )))); }) TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
| 1914-14403 |
218 | != 0TRUE | evaluated 1914 times by 1 test | FALSE | evaluated 14403 times by 2 tests |
) { | 1914-14403 |
219 | r = -13; | - |
220 | gotoexecuted 1914 times by 1 test: goto out; out;executed 1914 times by 1 test: goto out; | 1914 |
221 | } | - |
222 | if (sshbuf_len(b) != 0TRUE | evaluated 4 times by 1 test | FALSE | evaluated 14399 times by 2 tests |
) { | 4-14399 |
223 | r = -23; | - |
224 | gotoexecuted 4 times by 1 test: goto out; out;executed 4 times by 1 test: goto out; | 4 |
225 | } | - |
226 | if (len > 64UTRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
) { | 0-14399 |
227 | r = -4; | - |
228 | goto never executed: goto out; out;never executed: goto out; | 0 |
229 | } | - |
230 | if (datalen >= TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
231 | (18446744073709551615UL) TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
232 | - lenTRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
) { | 0-14399 |
233 | r = -10; | - |
234 | goto never executed: goto out; out;never executed: goto out; | 0 |
235 | } | - |
236 | smlen = len + datalen; | - |
237 | mlen = smlen; | - |
238 | if ((TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
sm = malloc(smlen)) == TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
239 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
240 | || (TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
m = malloc(mlen)) == TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
241 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 14399 times by 2 tests |
| 0-14399 |
242 | ) { | - |
243 | r = -2; | - |
244 | goto never executed: goto out; out;never executed: goto out; | 0 |
245 | } | - |
246 | memcpy(sm, sigblob, len); | - |
247 | memcpy(sm+len, data, datalen); | - |
248 | if ((TRUE | evaluated 14324 times by 1 test | FALSE | evaluated 75 times by 2 tests |
ret = crypto_sign_ed25519_open(m, &mlen, sm, smlen,TRUE | evaluated 14324 times by 1 test | FALSE | evaluated 75 times by 2 tests |
| 75-14324 |
249 | key->ed25519_pk)) != 0TRUE | evaluated 14324 times by 1 test | FALSE | evaluated 75 times by 2 tests |
) { | 75-14324 |
250 | debug2("%s: crypto_sign_ed25519_open failed: %d", | - |
251 | __func__, ret); | - |
252 | }executed 14324 times by 1 test: end of block | 14324 |
253 | if (ret != 0TRUE | evaluated 14324 times by 1 test | FALSE | evaluated 75 times by 2 tests |
|| mlen != datalenTRUE | never evaluated | FALSE | evaluated 75 times by 2 tests |
) { | 0-14324 |
254 | r = -21; | - |
255 | gotoexecuted 14324 times by 1 test: goto out; out;executed 14324 times by 1 test: goto out; | 14324 |
256 | } | - |
257 | | - |
258 | | - |
259 | r = 0; | - |
260 | out:code before this statement executed 75 times by 2 tests: out: | 75 |
261 | if (sm != TRUE | evaluated 14399 times by 2 tests | FALSE | evaluated 3634 times by 1 test |
| 3634-14399 |
262 | ((void *)0)TRUE | evaluated 14399 times by 2 tests | FALSE | evaluated 3634 times by 1 test |
| 3634-14399 |
263 | ) { | - |
264 | explicit_bzero(sm, smlen); | - |
265 | free(sm); | - |
266 | }executed 14399 times by 2 tests: end of block | 14399 |
267 | if (m != TRUE | evaluated 14399 times by 2 tests | FALSE | evaluated 3634 times by 1 test |
| 3634-14399 |
268 | ((void *)0)TRUE | evaluated 14399 times by 2 tests | FALSE | evaluated 3634 times by 1 test |
| 3634-14399 |
269 | ) { | - |
270 | explicit_bzero(m, smlen); | - |
271 | free(m); | - |
272 | }executed 14399 times by 2 tests: end of block | 14399 |
273 | sshbuf_free(b); | - |
274 | free(ktype); | - |
275 | returnexecuted 18033 times by 2 tests: return r; r;executed 18033 times by 2 tests: return r; | 18033 |
276 | } | - |
| | |