Subject: Re: [libssh2] libssh2_userauth_keyboard_interactive_ex()

Re: [libssh2] libssh2_userauth_keyboard_interactive_ex()

From: James Housley <>
Date: Fri, 24 Nov 2006 11:36:57 -0500

On Nov 24, 2006, at 11:27 AM, Daniel Stenberg wrote:

> Hello
> In libcurl we use the libssh2_userauth_keyboard_interactive_ex()
> function to
> provide a password as if it was coming from the keyboard.
> I'm not an expert on this, but it seems we have to assign two
> struct members
> in one of the structs passed to the callback.
> The problem here is that the data we need to provide is kept in a
> local struct
> (as we can do multiple simultaneous transfers), and there's no way
> we can
> access that local data from within the callback. We need a custom
> private
> pointer passed to the callback from the context where we call the
> libssh2
> function call, so that we can pass a pointer to a our private
> struct that has
> the info we need in there...

This in reality might not work for multi_*(). Because if a username/
password prompt just shows up, what transfer is it part of?

> So, here's another suggest API break: I want to add a pointer to
> the proto for
> this function. A user pointer and I want that pointer passed on to the
> callback function in a new argument.

For this change, and possibly others we might want to thing about
libssh2_userauth_keyboard_interactive_ex2() where this one has the
extra private pointer. libssh2_userauth_keyboard_interactive_ex()
would just call libssh2_userauth_keyboard_interactive_ex2() with a
null for the private pointer.


/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------     The Power to Serve
Fortune Not Found:
Abort, Retry, Ignore?

Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash

libssh2-devel mailing list

Received on 2006-11-24