41 #define CHALLENGE_USERNAME "User Name"
42 #define CHALLENGE_PASSWORD "Password"
49 state = calloc (1,
sizeof (*state));
61 const char *input,
size_t input_len,
62 char **output,
size_t *output_len)
83 state->
username = strndup (input, input_len);
87 if (input_len != strlen (state->
username))
103 state->
password = strndup (input, input_len);
107 if (input_len != strlen (state->
password))
127 if (key && strlen (state->
password) == strlen (key) &&
int gsasl_callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
_GSASL_API void gsasl_property_free(Gsasl_session *sctx, Gsasl_property prop)
@ GSASL_AUTHENTICATION_ERROR
@ GSASL_MECHANISM_CALLED_TOO_MANY_TIMES
@ GSASL_MECHANISM_PARSE_ERROR
_GSASL_API int gsasl_property_set(Gsasl_session *sctx, Gsasl_property prop, const char *data)
_GSASL_API const char * gsasl_property_get(Gsasl_session *sctx, Gsasl_property prop)
#define CHALLENGE_USERNAME
int _gsasl_login_server_step(Gsasl_session *sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len)
void _gsasl_login_server_finish(Gsasl_session *sctx _GL_UNUSED, void *mech_data)
#define CHALLENGE_PASSWORD
int _gsasl_login_server_start(Gsasl_session *sctx _GL_UNUSED, void **mech_data)