diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ssh-add.c | 10 |
2 files changed, 8 insertions, 5 deletions
@@ -62,6 +62,9 @@ | |||
62 | [channels.c channels.h clientloop.c ssh.c] | 62 | [channels.c channels.h clientloop.c ssh.c] |
63 | fix remote fwding with same listen port but different listen address | 63 | fix remote fwding with same listen port but different listen address |
64 | with gerhard@, ok djm@ | 64 | with gerhard@, ok djm@ |
65 | - markus@cvs.openbsd.org 2014/06/27 18:50:39 | ||
66 | [ssh-add.c] | ||
67 | fix loading of private keys | ||
65 | 68 | ||
66 | 20140618 | 69 | 20140618 |
67 | - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare | 70 | - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.110 2014/06/24 01:13:21 djm Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.111 2014/06/27 18:50:39 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * 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) | |||
202 | close(fd); | 202 | close(fd); |
203 | 203 | ||
204 | /* At first, try empty passphrase */ | 204 | /* At first, try empty passphrase */ |
205 | if ((r = sshkey_parse_private_fileblob(&keyblob, filename, "", | 205 | if ((r = sshkey_parse_private_fileblob(&keyblob, "", filename, |
206 | &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) | 206 | &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) |
207 | fatal("Cannot parse %s: %s", filename, ssh_err(r)); | 207 | fatal("Cannot parse %s: %s", filename, ssh_err(r)); |
208 | if (comment == NULL) | 208 | if (comment == NULL) |
209 | comment = xstrdup(filename); | 209 | comment = xstrdup(filename); |
210 | /* try last */ | 210 | /* try last */ |
211 | if (private == NULL && pass != NULL) { | 211 | if (private == NULL && pass != NULL) { |
212 | if ((r = sshkey_parse_private_fileblob(&keyblob, filename, pass, | 212 | if ((r = sshkey_parse_private_fileblob(&keyblob, pass, filename, |
213 | &private, &comment)) != 0 && | 213 | &private, &comment)) != 0 && |
214 | r != SSH_ERR_KEY_WRONG_PASSPHRASE) | 214 | r != SSH_ERR_KEY_WRONG_PASSPHRASE) |
215 | fatal("Cannot parse %s: %s", filename, ssh_err(r)); | 215 | fatal("Cannot parse %s: %s", filename, ssh_err(r)); |
@@ -228,7 +228,7 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |||
228 | return -1; | 228 | return -1; |
229 | } | 229 | } |
230 | if ((r = sshkey_parse_private_fileblob(&keyblob, | 230 | if ((r = sshkey_parse_private_fileblob(&keyblob, |
231 | filename, pass, &private, &comment)) != 0 && | 231 | pass, filename, &private, NULL)) != 0 && |
232 | r != SSH_ERR_KEY_WRONG_PASSPHRASE) | 232 | r != SSH_ERR_KEY_WRONG_PASSPHRASE) |
233 | fatal("Cannot parse %s: %s", | 233 | fatal("Cannot parse %s: %s", |
234 | filename, ssh_err(r)); | 234 | filename, ssh_err(r)); |