|
Lines 186-196
proto_spec(const char *spec)
Link Here
|
| 186 |
char * |
186 |
char * |
| 187 |
compat_cipher_proposal(char *cipher_prop) |
187 |
compat_cipher_proposal(char *cipher_prop) |
| 188 |
{ |
188 |
{ |
|
|
189 |
char *np = NULL; |
| 190 |
|
| 189 |
if (!(datafellows & SSH_BUG_BIGENDIANAES)) |
191 |
if (!(datafellows & SSH_BUG_BIGENDIANAES)) |
| 190 |
return cipher_prop; |
192 |
return cipher_prop; |
| 191 |
debug2("%s: original cipher proposal: %s", __func__, cipher_prop); |
193 |
debug2("%s: original cipher proposal: %s", __func__, cipher_prop); |
| 192 |
if ((cipher_prop = match_filter_blacklist(cipher_prop, "aes*")) == NULL) |
194 |
np = match_filter_blacklist(cipher_prop, "aes*"); |
|
|
195 |
if (np == NULL) |
| 193 |
fatal("match_filter_blacklist failed"); |
196 |
fatal("match_filter_blacklist failed"); |
|
|
197 |
free(cipher_prop); |
| 198 |
cipher_prop = np; |
| 194 |
debug2("%s: compat cipher proposal: %s", __func__, cipher_prop); |
199 |
debug2("%s: compat cipher proposal: %s", __func__, cipher_prop); |
| 195 |
if (*cipher_prop == '\0') |
200 |
if (*cipher_prop == '\0') |
| 196 |
fatal("No supported ciphers found"); |
201 |
fatal("No supported ciphers found"); |
|
Lines 200-210
compat_cipher_proposal(char *cipher_prop)
Link Here
|
| 200 |
char * |
205 |
char * |
| 201 |
compat_pkalg_proposal(char *pkalg_prop) |
206 |
compat_pkalg_proposal(char *pkalg_prop) |
| 202 |
{ |
207 |
{ |
|
|
208 |
char *np = NULL; |
| 209 |
|
| 203 |
if (!(datafellows & SSH_BUG_RSASIGMD5)) |
210 |
if (!(datafellows & SSH_BUG_RSASIGMD5)) |
| 204 |
return pkalg_prop; |
211 |
return pkalg_prop; |
| 205 |
debug2("%s: original public key proposal: %s", __func__, pkalg_prop); |
212 |
debug2("%s: original public key proposal: %s", __func__, pkalg_prop); |
| 206 |
if ((pkalg_prop = match_filter_blacklist(pkalg_prop, "ssh-rsa")) == NULL) |
213 |
np = match_filter_blacklist(pkalg_prop, "ssh-rsa"); |
|
|
214 |
if (np == NULL) |
| 207 |
fatal("match_filter_blacklist failed"); |
215 |
fatal("match_filter_blacklist failed"); |
|
|
216 |
free(pkalg_prop); |
| 217 |
pkalg_prop = np; |
| 208 |
debug2("%s: compat public key proposal: %s", __func__, pkalg_prop); |
218 |
debug2("%s: compat public key proposal: %s", __func__, pkalg_prop); |
| 209 |
if (*pkalg_prop == '\0') |
219 |
if (*pkalg_prop == '\0') |
| 210 |
fatal("No supported PK algorithms found"); |
220 |
fatal("No supported PK algorithms found"); |
|
Lines 217-231
compat_kex_proposal(char *p)
Link Here
|
| 217 |
if ((datafellows & (SSH_BUG_CURVE25519PAD|SSH_OLD_DHGEX)) == 0) |
227 |
if ((datafellows & (SSH_BUG_CURVE25519PAD|SSH_OLD_DHGEX)) == 0) |
| 218 |
return p; |
228 |
return p; |
| 219 |
debug2("%s: original KEX proposal: %s", __func__, p); |
229 |
debug2("%s: original KEX proposal: %s", __func__, p); |
| 220 |
if ((datafellows & SSH_BUG_CURVE25519PAD) != 0) |
230 |
if ((datafellows & SSH_BUG_CURVE25519PAD) != 0) { |
| 221 |
if ((p = match_filter_blacklist(p, |
231 |
char *np = match_filter_blacklist(p, |
| 222 |
"curve25519-sha256@libssh.org")) == NULL) |
232 |
"curve25519-sha256@libssh.org"); |
|
|
233 |
if (np == NULL) |
| 223 |
fatal("match_filter_blacklist failed"); |
234 |
fatal("match_filter_blacklist failed"); |
|
|
235 |
free(p); |
| 236 |
p = np; |
| 237 |
} |
| 224 |
if ((datafellows & SSH_OLD_DHGEX) != 0) { |
238 |
if ((datafellows & SSH_OLD_DHGEX) != 0) { |
| 225 |
if ((p = match_filter_blacklist(p, |
239 |
char *np = match_filter_blacklist(p, |
| 226 |
"diffie-hellman-group-exchange-sha256," |
240 |
"diffie-hellman-group-exchange-sha256," |
| 227 |
"diffie-hellman-group-exchange-sha1")) == NULL) |
241 |
"diffie-hellman-group-exchange-sha1"); |
|
|
242 |
if (np == NULL) |
| 228 |
fatal("match_filter_blacklist failed"); |
243 |
fatal("match_filter_blacklist failed"); |
|
|
244 |
free(p); |
| 245 |
p = np; |
| 229 |
} |
246 |
} |
| 230 |
debug2("%s: compat KEX proposal: %s", __func__, p); |
247 |
debug2("%s: compat KEX proposal: %s", __func__, p); |
| 231 |
if (*p == '\0') |
248 |
if (*p == '\0') |
| 232 |
- |
|
|
| 233 |
-- |
| 234 |
auth-options.c | 1 + |
249 |
auth-options.c | 1 + |
| 235 |
1 file changed, 1 insertion(+) |
250 |
1 file changed, 1 insertion(+) |