diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-10-16 08:58:31 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-10-16 08:58:31 +0200 |
commit | 16b876d07f2381638547e848cd32be9ea022aa2f (patch) | |
tree | a490db5f9d57a205b083d01b3ddd11bd850fa72e /examples/knownhosts.c | |
parent | a80caec19bf0f82de3cbb85f378c925663ffa648 (diff) | |
download | libssh-16b876d07f2381638547e848cd32be9ea022aa2f.tar.gz libssh-16b876d07f2381638547e848cd32be9ea022aa2f.tar.xz libssh-16b876d07f2381638547e848cd32be9ea022aa2f.zip |
examples: Use ssh_session_update_known_hosts() for updating known_hosts
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples/knownhosts.c')
-rw-r--r-- | examples/knownhosts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/knownhosts.c b/examples/knownhosts.c index b7833d35..0726bfa8 100644 --- a/examples/knownhosts.c +++ b/examples/knownhosts.c @@ -94,7 +94,8 @@ int verify_knownhost(ssh_session session) return -1; } if(strncasecmp(buf,"yes",3)==0){ - if (ssh_write_knownhost(session) < 0) { + rc = ssh_session_update_known_hosts(session); + if (rc != SSH_OK) { ssh_clean_pubkey_hash(&hash); fprintf(stderr, "error %s\n", strerror(errno)); return -1; |