summaryrefslogtreecommitdiffstats
path: root/ssh-add.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-02 07:30:00 +0200
committerDamien Miller <djm@mindrot.org>2014-07-02 07:30:00 +0200
commitec3d0e24a1e46873d80507f5cd8ee6d0d03ac5dc (patch)
tree5eb95fa447f34ca06e3426e5f7bd6d3134583189 /ssh-add.c
parent - markus@cvs.openbsd.org 2014/06/27 16:41:56 (diff)
downloadopenssh-ec3d0e24a1e46873d80507f5cd8ee6d0d03ac5dc.tar.xz
openssh-ec3d0e24a1e46873d80507f5cd8ee6d0d03ac5dc.zip
- markus@cvs.openbsd.org 2014/06/27 18:50:39
[ssh-add.c] fix loading of private keys
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 46b91cbde..07558ae52 100644
--- a/ssh-add.c
+++ b/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
@@ -202,14 +202,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));
@@ -228,7 +228,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));