[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ssh_userauth_publickey() vs. ssh_userauth_pubkey()


On Tuesday 12 January 2016 19:11:28 Younes Serraj wrote:
> Hi!
> 
> Reading libssh's source code to understand how to implement my own
> ssh_is_server_known() for various reasons, I found the following
> information that I don't understand :
> 
> ---
> function: ssh_userauth_publickey
> 
> @return SSH_AUTH_SUCCESS: The public key is accepted, you want now to use
> ssh_userauth_pubkey().
> ---
> 
> It's the "you want now to use ssh_userauth_pubkey()" part that I don't get.
> 
> When I read the source code of ssh_userauth_pubkey(), I find that:
> 1) it's in a legacy.c file (my guess is that I shouldn't use it in a new
> project)
> 2) it looks like an old API, it's a wrapper that:
> - takes a ssh_private_key and makes a ssh_key
> - calls ssh_userauth_publickey() and gives it in parameters the said ssh_key
> 
> So on success, ssh_userauth_publickey() asks me to call
> ssh_userauth_pubkey() that calls ssh_userauth_publickey().
> 
> Is it really what I'm supposed to do? Or is there a need to update the
> documentation? Or did I miss something?
> 
> Thanks in advance for you help :)

The documentation needs to be updated ...

Obviously ssh_userauth_publickey() is the right function to use and not the 
legacy one ...


Cheers,

	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

References:
ssh_userauth_publickey() vs. ssh_userauth_pubkey()Younes Serraj <younes.serraj@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org