summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-add.c
diff options
context:
space:
mode:
authortim <tim@cvs.openbsd.org>2015-09-13 14:39:17 +0000
committertim <tim@cvs.openbsd.org>2015-09-13 14:39:17 +0000
commit9302bbc1850f046a0f8c54b654a30388f5a71b18 (patch)
tree3e30be3636b7c9412cfcd76c433f67eb1c80db3b /usr.bin/ssh/ssh-add.c
parent1be5bcdf804d236b28ea4c79faa34dd4f5a76f72 (diff)
- Fix error message: passphrase needs to be at least 5 characters, not 4.
- Remove unused function argument. - Remove two unnecessary variables. OK djm@
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r--usr.bin/ssh/ssh-add.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index 078341e6041..bfbcd6c3180 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.124 2015/09/13 13:48:19 tim Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.125 2015/09/13 14:39:16 tim Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -210,17 +210,16 @@ add_file(int agent_fd, const char *filename, int key_only)
close(fd);
/* At first, try empty passphrase */
- if ((r = sshkey_parse_private_fileblob(keyblob, "", filename,
- &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
+ if ((r = sshkey_parse_private_fileblob(keyblob, "", &private,
+ &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
fprintf(stderr, "Error loading key \"%s\": %s\n",
filename, ssh_err(r));
goto fail_load;
}
/* try last */
if (private == NULL && pass != NULL) {
- if ((r = sshkey_parse_private_fileblob(keyblob, pass, filename,
- &private, &comment)) != 0 &&
- r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
+ if ((r = sshkey_parse_private_fileblob(keyblob, pass, &private,
+ &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
fprintf(stderr, "Error loading key \"%s\": %s\n",
filename, ssh_err(r));
goto fail_load;
@@ -236,7 +235,7 @@ add_file(int agent_fd, const char *filename, int key_only)
if (strcmp(pass, "") == 0)
goto fail_load;
if ((r = sshkey_parse_private_fileblob(keyblob, pass,
- filename, &private, &comment)) == 0)
+ &private, &comment)) == 0)
break;
else if (r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
fprintf(stderr,