www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: [libssh2] #276: do not fail when keys of unknown type are read from known_hosts file

Re: [libssh2] #276: do not fail when keys of unknown type are read from known_hosts file

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Sun, 27 Oct 2013 09:57:11 -0000

#276: do not fail when keys of unknown type are read from known_hosts file
---------------------+--------------------
  Reporter: salva | Owner: salva
      Type: defect | Status: closed
  Priority: normal | Milestone: 1.4.3
 Component: misc | Version: 1.4.2
Resolution: fixed | Keywords:
Blocked By: | Blocks:
---------------------+--------------------
Changes (by salva):

 * owner: => salva
 * status: new => closed
 * resolution: => fixed

Comment:

 In [changeset:"85c6627c861e970ba0bab10ec8b44b6523d6a5fd/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="85c6627c861e970ba0bab10ec8b44b6523d6a5fd"
 knownhosts: handle unknown key types

 Store but don't use keys of unsupported types on the known_hosts file.

 Currently, when libssh2 parses a known_host file containing keys of some
 type it doesn't natively support, it stops reading the file and returns
 an error.

 That means, that the known_host file can not be safely shared with other
 software supporting other key types (i.e. OpenSSH).

 This patch adds support for handling keys of unknown type. It can read
 and write them, even if they are never going to be matched.

 At the source level the patch does the following things:

 - add a new unknown key type LIBSSH2_KNOWNHOST_KEY_UNKNOWN

 - add a new slot (key_type_name) on the known_host struct that is
 used to store the key type in ascii form when it is not supported

 - parse correctly known_hosts entries with unknown key types and
 populate the key_type_name slot

 - print correctly known_hosts entries of unknown type

 - when checking a host key ignore keys that do not match the key

 Fixes #276
 }}}

-- 
Ticket URL: <https://trac.libssh2.org/ticket/276#comment:5>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-10-27

the libssh2 team