34 #define PASSCODE "passcode"
39 void *mech_data _GL_UNUSED,
40 const char *input,
size_t input_len,
41 char **output,
size_t *output_len)
43 const char *authorization_id = NULL;
44 const char *authentication_id = NULL;
45 const char *passcode = NULL;
46 const char *suggestedpin;
58 authorization_id = input;
59 authentication_id = memchr (input,
'\0', input_len - 1);
60 if (authentication_id)
63 passcode = memchr (authentication_id,
'\0',
64 input_len - strlen (authorization_id) - 1 - 1);
68 pin = memchr (passcode,
'\0', input_len -
69 strlen (authorization_id) - 1 -
70 strlen (authentication_id) - 1 - 1);
115 len = strlen (suggestedpin);
118 *output_len = strlen (
PIN) + len;
119 *output = malloc (*output_len);
122 memcpy (*output,
PIN, strlen (
PIN));
124 memcpy (*output + strlen (
PIN), suggestedpin, len);
int gsasl_callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
@ GSASL_SECURID_SERVER_NEED_ADDITIONAL_PASSCODE
@ GSASL_SECURID_SERVER_NEED_NEW_PIN
@ 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)
int _gsasl_securid_server_step(Gsasl_session *sctx, void *mech_data _GL_UNUSED, const char *input, size_t input_len, char **output, size_t *output_len)