diff options
author | tim@openbsd.org <tim@openbsd.org> | 2015-09-13 14:39:16 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-09-16 17:52:09 +1000 |
commit | 3c019a936b43f3e2773f3edbde7c114d73caaa4c (patch) | |
tree | 2f65012ad783bb594c668d37d5137a1f1ac56768 /ssh-add.c | |
parent | 2681cdb6e0de7c1af549dac37a9531af202b4434 (diff) | |
download | openssh-git-3c019a936b43f3e2773f3edbde7c114d73caaa4c.tar.gz |
upstream commit
- Fix error message: passphrase needs to be at least 5
characters, not 4. - Remove unused function argument. - Remove two
unnecessary variables.
OK djm@
Upstream-ID: 13010c05bfa8b523da1c0dc19e81dd180662bc30
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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 @@ -218,17 +218,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; @@ -244,7 +243,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, |