Subject: Re: known hosts API, updated

Re: known hosts API, updated

From: Ben Kibbey <bjk_at_luxsci.net>
Date: Thu, 4 Jun 2009 21:37:49 -0400

On Fri, May 29, 2009 at 10:22:00AM +0200, Daniel Stenberg wrote:
> Hey again,
>
> Thanks to all the feedback from yday, I've now remodeled the file-based parts
> of the API somewhat and the changes are:
>
> Two new functions:
>
> libssh2_knownhost_readline()
>
> - tells libssh2 to read a given line, as it if it was from a known hosts
> file. You pass it a pointer to a line and a line length basically.
>
> libssh2_knownhost_writeline()
>
> - converts a known host pointer to an output line, suitable for writing to
> a known hosts file. It converts a single known host to a single output
> line.
>
> The two file-based input/output functions are now named:
>
> libssh2_knownhost_readfile() and libssh2_knownhost_writefile()
>
> The other five functions (init, free, add, get, check) haven't been changed.
>
> All of this is pushed to the git repo.

What about generating a new known_hosts entry based on the current
connection? something like libssh2_knownhosts_current() which can be
processed before host validation?

I'm thinking about new hosts that aren't found in a known_hosts file.

-- 
Ben Kibbey (bjk) @ FreeNode/OFTC/Jabber
KeyID: 0xF2B33BEF
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-06-05