Ticket #80 (closed defect)

Opened 8 years ago

Last modified 8 years ago

Inform password in libssh2_userauth_keyboard_interactive API

Reported by: tiarossi Owned by:
Priority: normal Milestone:
Component: API Version:
Keywords: Cc: tiarossi, thomaspu, alamaison, bagder
Blocked By: Blocks:

Description

It would be interesting if whe cold inform password in libssh2_userauth_keyboard_interactive API and let libssh2 manage data to send like keyboard interactive.
In some c++ aplications when the static callback function is called, the context of the caller object isn't available at this point, and is more dificult to assossiate LIBSSH2_SESSION data with this object.

Change History

comment:1 Changed 8 years ago by thomaspu

Actually, this can be easily gotten around:

"In some c++ aplications when the static callback function is called, the
context of the caller object isn't available at this point..."

The trick is to store a pointer to your object in libssh2's abstract pointer. Then when the callback is called and it runs your callback function, your callback function pulls the pointer out of libssh2's abstract field and boom! Your object is now accessible.

comment:2 Changed 8 years ago by alamaison

If you mean that you want keyboard-interactive authentication to work more like simple password authentication then I'm afraid this isn't possible. The whole point of KB-interactive authentication is that the server can send any number of prompts asking any questions it wants. It just happens that asking for a password is quite common.

comment:3 Changed 8 years ago by bagder

This really isn't a bug.

Note: See TracTickets for help on using tickets.