Subject: Re: libssh2 general question

Re: libssh2 general question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Oct 2010 14:15:20 +0200 (CEST)

On Thu, 7 Oct 2010, Alan Ong wrote:

> I am currently using libssh2 to create a SFTP client that uses ssh2
> protocol, SHA-1, and aest128-ctr. Based on my research, libssh2 chooses the
> "best" mutually supported algorithm
> (http://comments.gmane.org/gmane.network.ssh.libssh2.devel/4028) for cipher,
> so does that mean that if the SFTP server uses aes128-ctr cipher, then
> libssh2 automatically chooses aes-128-ctr as default cipher?

Yeps!

> Another question, how do i set libssh2 to use hmac-sha1? I have browse the
> API document, and I have not found a function that could set the mac hashing
> to hmac-sha1.

It selects hmac the same way. It is a negotiation where libssh2 will prefer
the one it considers best.

If you switch on tracing during the session handshake you'll get to see (and
learn) all those details!

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-10-07