Subject: Keyboard Interactive

Keyboard Interactive

From: Robert M. Münch <robert.muench_at_robertmuench.de>
Date: Sat, 9 Apr 2011 21:07:17 +0200

Hi, just digging through the examples and found this one here:

static void kbd_callback(const char *name, int name_len,
                         const char *instruction, int instruction_len,
                         int num_prompts,
                         const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
                         LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
                         void **abstract)
{
    (void)name;
    (void)name_len;
    (void)instruction;
    (void)instruction_len;
    if (num_prompts == 1) {
        responses[0].text = strdup(password);
        responses[0].length = strlen(password);
    }
    (void)prompts;
    (void)abstract;
} /* kbd_callback */

I really don't understand what this callback should do. Can anyone please enlighten me?

--
Robert M. Münch
http://www.robertmuench.de

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2011-04-09