summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index add61cc5f..2d428967c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1466,6 +1466,21 @@ main(int ac, char **av)
1466 1466
1467 for (i = 0; i < options.num_host_key_files; i++) { 1467 for (i = 0; i < options.num_host_key_files; i++) {
1468 key = key_load_private(options.host_key_files[i], "", NULL); 1468 key = key_load_private(options.host_key_files[i], "", NULL);
1469 if (key && blacklisted_key(key)) {
1470 char *fp;
1471 fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
1472 if (options.permit_blacklisted_keys)
1473 error("Host key %s blacklisted (see "
1474 "ssh-vulnkey(1)); continuing anyway", fp);
1475 else
1476 error("Host key %s blacklisted (see "
1477 "ssh-vulnkey(1))", fp);
1478 xfree(fp);
1479 if (!options.permit_blacklisted_keys) {
1480 sensitive_data.host_keys[i] = NULL;
1481 continue;
1482 }
1483 }
1469 sensitive_data.host_keys[i] = key; 1484 sensitive_data.host_keys[i] = key;
1470 if (key == NULL) { 1485 if (key == NULL) {
1471 error("Could not load host key: %s", 1486 error("Could not load host key: %s",