diff options
author | 2014-06-27 18:50:39 +0000 | |
---|---|---|
committer | 2014-06-27 18:50:39 +0000 | |
commit | 4a9acc050bbf6c1c16f9ce46ab30e3f74280e511 (patch) | |
tree | 27d00225f72e89de86569801e99ad18d17ccf063 /usr.bin/ssh/ssh-add.c | |
parent | extra evil spaces snuck in over the last while (diff) | |
download | wireguard-openbsd-4a9acc050bbf6c1c16f9ce46ab30e3f74280e511.tar.xz wireguard-openbsd-4a9acc050bbf6c1c16f9ce46ab30e3f74280e511.zip |
fix loading of private keys
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 7b2b06be758..ece9d2b20f8 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.110 2014/06/24 01:13:21 djm Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.111 2014/06/27 18:50:39 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -196,14 +196,14 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) close(fd); /* At first, try empty passphrase */ - if ((r = sshkey_parse_private_fileblob(&keyblob, filename, "", + if ((r = sshkey_parse_private_fileblob(&keyblob, "", filename, &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) - fatal("Cannot parse %s: %s", filename, ssh_err(r)); + fatal("Cannot parse %s: %s", filename, ssh_err(r)); if (comment == NULL) comment = xstrdup(filename); /* try last */ if (private == NULL && pass != NULL) { - if ((r = sshkey_parse_private_fileblob(&keyblob, filename, pass, + if ((r = sshkey_parse_private_fileblob(&keyblob, pass, filename, &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) fatal("Cannot parse %s: %s", filename, ssh_err(r)); @@ -222,7 +222,7 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) return -1; } if ((r = sshkey_parse_private_fileblob(&keyblob, - filename, pass, &private, &comment)) != 0 && + pass, filename, &private, NULL)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) fatal("Cannot parse %s: %s", filename, ssh_err(r)); |