Re: return value from sasl_client_start()

Ted Yu <[email protected]>
Newsgroups gmane.comp.security.cyrus.sasl
Message-ID <CALte62yZMmCR7XHtzaR-rWwNyZw96-0KvJ2FdCWAA7TkNVbVXw@mail.gmail.com>
w.r.t. callbacks :

  if (userid) {
    callback->id = SASL_CB_USER;
    callback->proc = (sasl_callback_ft)&simple;

Is SASL_CB_USER required ?

Earlier I sent out an email "Casting function pointers to sasl_callback_ft"
where I described issue casting my method to signature of proc member.

If someone has used the callbacks in C++11 environment, please share your
experience.

On Fri, Mar 10, 2017 at 10:41 AM, Dan White <[email protected]> wrote:

> On 03/10/17 09:35 -0800, Ted Yu wrote:
>
>> Hi,
>> I use the following code:
>>
>>  do {
>>    rc = sasl_client_start(sconn_, /* the same context from above */
>>        mechlist, /* the list of mechanisms
>>     from the server */
>>        NULL, /* filled in if an
>>     interaction is needed */
>>        &out, /* filled in on success */
>>        &outlen, /* filled in on success */
>>        &mechusing);
>>  } while (rc == SASL_INTERACT); /* the mechanism may ask us to fill
>>  in things many times. result is SASL_CONTINUE on success */
>>
>>  if (rc != SASL_CONTINUE) {
>>    LOG(FATAL)<< "Cannot start client ("<< rc << ") ";
>>    return false;
>>  }
>>
>> In one run, rc was SASL_OK.
>>
>> Can someone confirm whether SASL_OK meant that the client didn't actually
>> start ?
>>
>> Thanks
>>
>
> See the "Basic client model" section in includes/sasl.h, and review the
> documentation under doc/, and the examples under sample/ in the source
> tree.
>
> --
> Dan White
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.