cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: patch for ssh user known_hosts

From: Johnny Luong <johnny.luong_at_compfazed.com>
Date: Tue, 23 Oct 2007 19:52:30 -0700

> On Mon, 22 Oct 2007, Johnny Luong wrote:
>
> > I've attached a patch to curl to use the known_hosts file to determine
> > whether to proceed with the ssh connection or not in my spare time. There
> > are parts of it which aren't done, e.g: hostname matching, but it does work
> > with the general case, e.g: exact domain or ip.
>
> Cool!
>
> Don't you think this code is better put within the libssh2 library rather than
> in libcurl's code? I would assume other libssh2 users may like it as well!
>
> A minor nit I noticed is the use of //-comments. Both libcurl and libssh2
> strive for C89 compliance...

Hmmm, my compiler doesn't complain to me about it by default. :) I've
converted the // comment to the typical C one and attached another patch.

When I originally looked at the problem, I sort of viewed it as something
thats not strictly related to the actual ssh connection and because
of that, it didn't make sense to me to go and try to integrate it into the
libssh2 codebase. Maybe some of the libssh2 developers can offer some of
their thoughts on where it should go and for the time being, have it
available for general use -- if theres some consensus on that, I'd be
willing to spend some time porting it over into the libssh2 library.

Received on 2007-10-24