diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -641,7 +641,7 @@ main(int ac, char **av) | |||
641 | tty_flag = 0; | 641 | tty_flag = 0; |
642 | /* Do not allocate a tty if stdin is not a tty. */ | 642 | /* Do not allocate a tty if stdin is not a tty. */ |
643 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 643 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
644 | if (tty_flag) | 644 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
645 | logit("Pseudo-terminal will not be allocated because " | 645 | logit("Pseudo-terminal will not be allocated because " |
646 | "stdin is not a terminal."); | 646 | "stdin is not a terminal."); |
647 | tty_flag = 0; | 647 | tty_flag = 0; |
@@ -1448,7 +1448,7 @@ ssh_session2(void) | |||
1448 | static void | 1448 | static void |
1449 | load_public_identity_files(void) | 1449 | load_public_identity_files(void) |
1450 | { | 1450 | { |
1451 | char *filename, *cp, thishost[NI_MAXHOST]; | 1451 | char *filename, *cp, thishost[NI_MAXHOST], *fp; |
1452 | char *pwdir = NULL, *pwname = NULL; | 1452 | char *pwdir = NULL, *pwname = NULL; |
1453 | int i = 0; | 1453 | int i = 0; |
1454 | Key *public; | 1454 | Key *public; |
@@ -1505,6 +1505,22 @@ load_public_identity_files(void) | |||
1505 | public = key_load_public(filename, NULL); | 1505 | public = key_load_public(filename, NULL); |
1506 | debug("identity file %s type %d", filename, | 1506 | debug("identity file %s type %d", filename, |
1507 | public ? public->type : -1); | 1507 | public ? public->type : -1); |
1508 | if (public && blacklisted_key(public, &fp) == 1) { | ||
1509 | if (options.use_blacklisted_keys) | ||
1510 | logit("Public key %s blacklisted (see " | ||
1511 | "ssh-vulnkey(1)); continuing anyway", fp); | ||
1512 | else | ||
1513 | logit("Public key %s blacklisted (see " | ||
1514 | "ssh-vulnkey(1)); refusing to send it", | ||
1515 | fp); | ||
1516 | xfree(fp); | ||
1517 | if (!options.use_blacklisted_keys) { | ||
1518 | key_free(public); | ||
1519 | xfree(filename); | ||
1520 | filename = NULL; | ||
1521 | public = NULL; | ||
1522 | } | ||
1523 | } | ||
1508 | xfree(options.identity_files[i]); | 1524 | xfree(options.identity_files[i]); |
1509 | identity_files[n_ids] = filename; | 1525 | identity_files[n_ids] = filename; |
1510 | identity_keys[n_ids] = public; | 1526 | identity_keys[n_ids] = public; |