diff options
Diffstat (limited to 'ssh-vulnkey.c')
-rw-r--r-- | ssh-vulnkey.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ssh-vulnkey.c b/ssh-vulnkey.c index 3c7985448..f78615478 100644 --- a/ssh-vulnkey.c +++ b/ssh-vulnkey.c | |||
@@ -90,26 +90,25 @@ do_key(const char *filename, u_long linenum, | |||
90 | const Key *key, const char *comment) | 90 | const Key *key, const char *comment) |
91 | { | 91 | { |
92 | Key *public; | 92 | Key *public; |
93 | char *blacklist_file; | ||
94 | struct stat st; | 93 | struct stat st; |
94 | int blacklist_status; | ||
95 | int ret = 1; | 95 | int ret = 1; |
96 | 96 | ||
97 | public = key_demote(key); | 97 | public = key_demote(key); |
98 | if (public->type == KEY_RSA1) | 98 | if (public->type == KEY_RSA1) |
99 | public->type = KEY_RSA; | 99 | public->type = KEY_RSA; |
100 | 100 | ||
101 | blacklist_file = blacklist_filename(public); | 101 | blacklist_status = blacklisted_key(public); |
102 | if (stat(blacklist_file, &st) < 0) | 102 | if (blacklist_status == -1) |
103 | describe_key(filename, linenum, | 103 | describe_key(filename, linenum, |
104 | "Unknown (no blacklist information)", key, comment); | 104 | "Unknown (no blacklist information)", key, comment); |
105 | else if (blacklisted_key(public)) { | 105 | else if (blacklist_status == 1) { |
106 | describe_key(filename, linenum, | 106 | describe_key(filename, linenum, |
107 | "COMPROMISED", key, comment); | 107 | "COMPROMISED", key, comment); |
108 | ret = 0; | 108 | ret = 0; |
109 | } else | 109 | } else |
110 | describe_key(filename, linenum, | 110 | describe_key(filename, linenum, |
111 | "Not blacklisted", key, comment); | 111 | "Not blacklisted", key, comment); |
112 | xfree(blacklist_file); | ||
113 | 112 | ||
114 | key_free(public); | 113 | key_free(public); |
115 | 114 | ||