diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.118 2015/01/28 22:36:00 djm Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.119 2015/02/03 00:34:14 halex Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -232,8 +232,8 @@ add_file(int agent_fd, const char *filename, int key_only) | |||
232 | if (private == NULL) { | 232 | if (private == NULL) { |
233 | /* clear passphrase since it did not work */ | 233 | /* clear passphrase since it did not work */ |
234 | clear_pass(); | 234 | clear_pass(); |
235 | snprintf(msg, sizeof msg, "Enter passphrase for %.200s: ", | 235 | snprintf(msg, sizeof msg, "Enter passphrase for %.200s%s: ", |
236 | comment); | 236 | comment, confirm ? " (will confirm each use)" : ""); |
237 | for (;;) { | 237 | for (;;) { |
238 | pass = read_passphrase(msg, RP_ALLOW_STDIN); | 238 | pass = read_passphrase(msg, RP_ALLOW_STDIN); |
239 | if (strcmp(pass, "") == 0) | 239 | if (strcmp(pass, "") == 0) |
@@ -253,7 +253,8 @@ add_file(int agent_fd, const char *filename, int key_only) | |||
253 | } | 253 | } |
254 | clear_pass(); | 254 | clear_pass(); |
255 | snprintf(msg, sizeof msg, | 255 | snprintf(msg, sizeof msg, |
256 | "Bad passphrase, try again for %.200s: ", comment); | 256 | "Bad passphrase, try again for %.200s%s: ", comment, |
257 | confirm ? " (will confirm each use)" : ""); | ||
257 | } | 258 | } |
258 | } | 259 | } |
259 | sshbuf_free(keyblob); | 260 | sshbuf_free(keyblob); |