summaryrefslogtreecommitdiff
path: root/ssh-vulnkey.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-08-25 08:57:15 +0000
committerColin Watson <cjwatson@debian.org>2008-08-25 08:57:15 +0000
commit6216f45a23ed7252c60a19480bd2f9644998360e (patch)
treee386a9251d0fbf005edd23b71a37fe1653df0a6f /ssh-vulnkey.c
parente7183d9c2232da37b109dfe27ab25551bbe36ff2 (diff)
only display "No blacklisted keys!" if there were any keys at all
Diffstat (limited to 'ssh-vulnkey.c')
-rw-r--r--ssh-vulnkey.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssh-vulnkey.c b/ssh-vulnkey.c
index b91f42925..4a5780488 100644
--- a/ssh-vulnkey.c
+++ b/ssh-vulnkey.c
@@ -64,6 +64,7 @@ static char *default_files[] = {
64 64
65static int verbosity = 0; 65static int verbosity = 0;
66 66
67static int some_keys = 0;
67static int some_unknown = 0; 68static int some_unknown = 0;
68static int some_compromised = 0; 69static int some_compromised = 0;
69 70
@@ -104,6 +105,8 @@ do_key(const char *filename, u_long linenum,
104 int blacklist_status; 105 int blacklist_status;
105 int ret = 1; 106 int ret = 1;
106 107
108 some_keys = 1;
109
107 public = key_demote(key); 110 public = key_demote(key);
108 if (public->type == KEY_RSA1) 111 if (public->type == KEY_RSA1)
109 public->type = KEY_RSA; 112 public->type = KEY_RSA;
@@ -375,7 +378,7 @@ main(int argc, char **argv)
375 if (some_unknown || some_compromised) { 378 if (some_unknown || some_compromised) {
376 printf("#\n"); 379 printf("#\n");
377 printf("# See the ssh-vulnkey(1) manual page for further advice.\n"); 380 printf("# See the ssh-vulnkey(1) manual page for further advice.\n");
378 } else if (verbosity > 0) { 381 } else if (some_keys && verbosity > 0) {
379 printf("#\n"); 382 printf("#\n");
380 printf("# No blacklisted keys!\n"); 383 printf("# No blacklisted keys!\n");
381 } 384 }