Twas brillig at 13:38:44 04.05.2009 UTC+02 when daniel_at_haxx.se did gyre and gimble:
DS> In my initial take I'll focus on OpenSSH complience, but I figure
DS> it could be useful to see what it takes to support putty's file
DS> format too. Anyone knows any details?
Erm... What?
LIBSSH2_API const char *
libssh2_hostkey_hash(LIBSSH2_SESSION * session, int hash_type)
{
switch (hash_type) {
#if LIBSSH2_MD5
case LIBSSH2_HOSTKEY_HASH_MD5:
return (char *) session->server_hostkey_md5;
break;
#endif /* LIBSSH2_MD5 */
case LIBSSH2_HOSTKEY_HASH_SHA1:
return (char *) session->server_hostkey_sha1;
break;
default:
return NULL;
}
}
You just need a function returning
session->{server_hostkey,server_hostkey_len} as a const char* / int
correspondingly.
--
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel