*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-add.c,v 1.67 2003/06/11 11:18:38 djm Exp $");
+RCSID("$OpenBSD: ssh-add.c,v 1.70 2004/05/08 00:21:31 djm Exp $");
#include <openssl/evp.h>
#include "authfd.h"
#include "authfile.h"
#include "pathnames.h"
-#include "readpass.h"
#include "misc.h"
-#ifdef HAVE___PROGNAME
-extern char *__progname;
-#else
-char *__progname;
-#endif
-
/* argv0 */
extern char *__progname;
if (private != NULL)
break;
clear_pass();
- strlcpy(msg, "Bad passphrase, try again: ", sizeof msg);
+ snprintf(msg, sizeof msg,
+ "Bad passphrase, try again for %.200s: ", comment);
}
}
- if (ssh_add_identity_constrained(ac, private, comment, lifetime,
- confirm)) {
+ if (ssh_add_identity_constrained(ac, private, comment, lifetime,
+ confirm)) {
fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);
ret = 0;
if (lifetime != 0)
fprintf(stderr,
"Lifetime set to %d seconds\n", lifetime);
- if (confirm != 0)
+ if (confirm != 0)
fprintf(stderr,
"The user has to confirm each use of the key\n");
} else if (ssh_add_identity(ac, private, comment)) {
char *sc_reader_id = NULL;
int i, ch, deleting = 0, ret = 0;
- __progname = get_progname(argv[0]);
+ __progname = ssh_get_progname(argv[0]);
init_rng();
seed_rng();