diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -59,6 +59,7 @@ | |||
59 | #include "servconf.h" | 59 | #include "servconf.h" |
60 | #include "key.h" | 60 | #include "key.h" |
61 | #include "hostfile.h" | 61 | #include "hostfile.h" |
62 | #include "authfile.h" | ||
62 | #include "auth.h" | 63 | #include "auth.h" |
63 | #include "auth-options.h" | 64 | #include "auth-options.h" |
64 | #include "canohost.h" | 65 | #include "canohost.h" |
@@ -593,10 +594,34 @@ getpwnamallow(const char *user) | |||
593 | 594 | ||
594 | /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */ | 595 | /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */ |
595 | int | 596 | int |
596 | auth_key_is_revoked(Key *key) | 597 | auth_key_is_revoked(Key *key, int hostkey) |
597 | { | 598 | { |
598 | char *key_fp; | 599 | char *key_fp; |
599 | 600 | ||
601 | if (blacklisted_key(key, &key_fp) == 1) { | ||
602 | if (options.permit_blacklisted_keys) { | ||
603 | if (hostkey) | ||
604 | error("Host key %s blacklisted (see " | ||
605 | "ssh-vulnkey(1)); continuing anyway", | ||
606 | key_fp); | ||
607 | else | ||
608 | logit("Public key %s from %s blacklisted (see " | ||
609 | "ssh-vulnkey(1)); continuing anyway", | ||
610 | key_fp, get_remote_ipaddr()); | ||
611 | xfree(key_fp); | ||
612 | } else { | ||
613 | if (hostkey) | ||
614 | error("Host key %s blacklisted (see " | ||
615 | "ssh-vulnkey(1))", key_fp); | ||
616 | else | ||
617 | logit("Public key %s from %s blacklisted (see " | ||
618 | "ssh-vulnkey(1))", | ||
619 | key_fp, get_remote_ipaddr()); | ||
620 | xfree(key_fp); | ||
621 | return 1; | ||
622 | } | ||
623 | } | ||
624 | |||
600 | if (options.revoked_keys_file == NULL) | 625 | if (options.revoked_keys_file == NULL) |
601 | return 0; | 626 | return 0; |
602 | 627 | ||