diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1496,10 +1496,6 @@ main(int ac, char **av) | |||
1496 | 1496 | ||
1497 | for (i = 0; i < options.num_host_key_files; i++) { | 1497 | for (i = 0; i < options.num_host_key_files; i++) { |
1498 | key = key_load_private(options.host_key_files[i], "", NULL); | 1498 | key = key_load_private(options.host_key_files[i], "", NULL); |
1499 | if (key && reject_blacklisted_key(key, 1) == 1) { | ||
1500 | sensitive_data.host_keys[i] = NULL; | ||
1501 | continue; | ||
1502 | } | ||
1503 | sensitive_data.host_keys[i] = key; | 1499 | sensitive_data.host_keys[i] = key; |
1504 | if (key == NULL) { | 1500 | if (key == NULL) { |
1505 | error("Could not load host key: %s", | 1501 | error("Could not load host key: %s", |
@@ -1507,6 +1503,11 @@ main(int ac, char **av) | |||
1507 | sensitive_data.host_keys[i] = NULL; | 1503 | sensitive_data.host_keys[i] = NULL; |
1508 | continue; | 1504 | continue; |
1509 | } | 1505 | } |
1506 | if (reject_blacklisted_key(key, 1) == 1) { | ||
1507 | key_free(key); | ||
1508 | sensitive_data.host_keys[i] = NULL; | ||
1509 | continue; | ||
1510 | } | ||
1510 | switch (key->type) { | 1511 | switch (key->type) { |
1511 | case KEY_RSA1: | 1512 | case KEY_RSA1: |
1512 | sensitive_data.ssh1_host_key = key; | 1513 | sensitive_data.ssh1_host_key = key; |