diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -167,7 +167,7 @@ static int | |||
167 | add_file(AuthenticationConnection *ac, const char *filename, int key_only) | 167 | add_file(AuthenticationConnection *ac, const char *filename, int key_only) |
168 | { | 168 | { |
169 | Key *private, *cert; | 169 | Key *private, *cert; |
170 | char *comment = NULL; | 170 | char *comment = NULL, *fp; |
171 | char msg[1024], *certpath = NULL; | 171 | char msg[1024], *certpath = NULL; |
172 | int fd, perms_ok, ret = -1; | 172 | int fd, perms_ok, ret = -1; |
173 | Buffer keyblob; | 173 | Buffer keyblob; |
@@ -243,6 +243,14 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |||
243 | } else { | 243 | } else { |
244 | fprintf(stderr, "Could not add identity: %s\n", filename); | 244 | fprintf(stderr, "Could not add identity: %s\n", filename); |
245 | } | 245 | } |
246 | if (blacklisted_key(private, &fp) == 1) { | ||
247 | fprintf(stderr, "Public key %s blacklisted (see " | ||
248 | "ssh-vulnkey(1)); refusing to add it\n", fp); | ||
249 | free(fp); | ||
250 | key_free(private); | ||
251 | free(comment); | ||
252 | return -1; | ||
253 | } | ||
246 | 254 | ||
247 | /* Skip trying to load the cert if requested */ | 255 | /* Skip trying to load the cert if requested */ |
248 | if (key_only) | 256 | if (key_only) |