36 void *mech_data _GL_UNUSED,
37 const char *input,
size_t input_len,
38 char **output,
size_t *output_len)
40 const char *authzidptr = input;
41 char *authidptr = NULL;
42 char *passwordptr = NULL;
43 char *passwdz = NULL, *passprep = NULL, *authidprep = NULL;
56 authidptr = memchr (input, 0, input_len - 1);
60 passwordptr = memchr (authidptr, 0, input_len - strlen (input) - 1);
72 tmplen = input_len - (size_t) (passwordptr - input);
73 if (memchr (passwordptr, 0, tmplen))
89 if (*authzidptr ==
'\0')
101 size_t passwdzlen = input_len - (size_t) (passwordptr - input);
104 passwdz = malloc (passwdzlen + 1);
107 memcpy (passwdz, passwordptr, passwdzlen);
108 passwdz[passwdzlen] =
'\0';
146 if (strcmp (normkey, passprep) == 0)
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_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)
_GSASL_API int gsasl_saslprep(const char *in, Gsasl_saslprep_flags flags, char **out, int *stringpreprc)
int _gsasl_plain_server_step(Gsasl_session *sctx, void *mech_data _GL_UNUSED, const char *input, size_t input_len, char **output, size_t *output_len)