Ticket #153 (closed enhancement)

Opened 9 years ago

Last modified 8 years ago

A way to get hostkey is needed

Reported by: anonymous Owned by: bagder
Priority: normal Milestone:
Component: Version:
Keywords: Cc: bagder, alamaison
Blocked By: Blocks:


Exceprpt from Debian bug #467305.

Client applications may need to obtain server hostkey "as is", in addition to SHA1/MD5 hash returned by libssh2_hostkey_hash.

Change History

comment:1 Changed 9 years ago by alamaison

We really need this to compare the key with the contents of a known_hosts file.
I see that _LIBSSH2_SESSION has a server_hostkey field but it is private and can't be accessed via the API. Also there is no information on what format this is in.

comment:2 Changed 9 years ago by bagder

We'll welcome patches to introduce the necessary APIs.

comment:3 Changed 9 years ago by alamaison

I've been intending to work on a patch but haven't had any time.

The best hope so far seems to be a patch discussed in this thread: http://sourceforge.net/mailarchive/message.php?msg_id=Pine.LNX.4.64.0711290912170.7609%40yvahk3.pbagnpgbe.fr
I'm not sure what happened with this. It wasn't committed.

comment:4 Changed 9 years ago by bagder

does that patch work fine for you?

It wasn't committed because people haven't pushed for it.

comment:5 Changed 9 years ago by alamaison

I'm afraid I haven't even had time to try it out - very busy time of year :|

Has anyone else given it a go?

comment:6 Changed 8 years ago by bagder

This is not a bug, so I move it to feature-requests

comment:7 Changed 8 years ago by bagder

libssh2_session_hostkey() has been added!

Note: See TracTickets for help on using tickets.