Subject: PK authentication from memory?

PK authentication from memory?

From: Robert M. Münch <robert.muench_at_robertmuench.de>
Date: Mon, 4 Apr 2011 17:23:53 +0200

Hi, I'm creating an application where I need PK authentication from memory and avoid reading any key-file.

This function seems to be the right one for this:

int libssh2_userauth_publickey(LIBSSH2_SESSION *session,
const char *user,
const unsigned char *pubkeydata,
size_t pubkeydata_len,
sign_callback,
void **abstract);

The problem I have is with the callback. Because the docs say:

"int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len,
          const unsigned char *data, size_t data_len, void **abstract);

This function gets called..."

I read somewhere that I need to create responses somehow but don't have a clue how to use this callback. What is this callback for? Is there any example available?

Thanks a lot.

--
Robert M. Münch
http://www.robertmuench.de
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-04-04