diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-01-26 00:02:13 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-01-26 00:18:42 +0100 |
commit | 99aa8035554ddb976348d2a9253ab3653019728d (patch) | |
tree | 195dc658a883d04305334be9658ba7b9eba55e94 /ssh-add.c | |
parent | upstream: add a comment describing the ranges of channel IDs that (diff) | |
download | openssh-99aa8035554ddb976348d2a9253ab3653019728d.tar.xz openssh-99aa8035554ddb976348d2a9253ab3653019728d.zip |
upstream: factor out reading/writing sshbufs to dedicated
functions; feedback and ok markus@
OpenBSD-Commit-ID: dc09e5f1950b7acc91b8fdf8015347782d2ecd3d
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.150 2020/01/17 20:13:47 naddy Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.151 2020/01/25 23:02:13 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * 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, return -1; } } - if ((keyblob = sshbuf_new()) == NULL) - fatal("%s: sshbuf_new failed", __func__); - if ((r = sshkey_load_file(fd, keyblob)) != 0) { + if ((r = sshbuf_load_fd(fd, &keyblob)) != 0) { fprintf(stderr, "Error loading key \"%s\": %s\n", filename, ssh_err(r)); sshbuf_free(keyblob); |