pubkey auth fail

Will Cosgrove will at panic.com
Thu Nov 25 18:13:20 CET 2021


Hi Bastien,
You’re using OpenSSH keys in your test project and the only backend that implements OpenSSH key parsing is the OpenSSL backend.

The functions other backends need to implement are the functions in OpenSSL with *_openssh_* in the names.

Cheers,
Will


> 
> I wrote a while ago about crypto engine detection, because
> libssh2_userauth_publickey_frommemory() doc says "It's only supported
> when libssh2 is backed by OpenSSL."
> 
> I wrote a fallback using libssh2_userauth_publickey_fromfile() ,which
> has no such warning, but it fails too.
> 
> Here is a project replicating this project :
> https://github.com/BastienDurel/test-libssh2
> 
> this file
> https://github.com/BastienDurel/test-libssh2/blob/master/ssh.cpp holds
> the auth_pukey_mem() & _auth_pukey_mem2file() fallback I use in my own
> project, with ssh_more.cpp containing the plumbing.
> 
> I made a few docker containers to run compilation/test in Debian with a
> custom-built libssh2 :
> https://hub.docker.com/r/datafr/libssh2/tags



More information about the libssh2-devel mailing list