diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.150 2020/01/17 20:13:47 naddy Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.151 2020/01/25 23:02:13 djm 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 |
@@ -224,9 +224,7 @@ add_file(int agent_fd, const char *filename, int key_only, int qflag, | |||
224 | return -1; | 224 | return -1; |
225 | } | 225 | } |
226 | } | 226 | } |
227 | if ((keyblob = sshbuf_new()) == NULL) | 227 | if ((r = sshbuf_load_fd(fd, &keyblob)) != 0) { |
228 | fatal("%s: sshbuf_new failed", __func__); | ||
229 | if ((r = sshkey_load_file(fd, keyblob)) != 0) { | ||
230 | fprintf(stderr, "Error loading key \"%s\": %s\n", | 228 | fprintf(stderr, "Error loading key \"%s\": %s\n", |
231 | filename, ssh_err(r)); | 229 | filename, ssh_err(r)); |
232 | sshbuf_free(keyblob); | 230 | sshbuf_free(keyblob); |