gsasl-mech

gsasl-mech —

Synopsis




int         (*Gsasl_init_function)          (Gsasl *ctx);
void        (*Gsasl_done_function)          (Gsasl *ctx);
int         (*Gsasl_start_function)         (Gsasl_session *sctx,
                                             void **mech_data);
int         (*Gsasl_step_function)          (Gsasl_session *sctx,
                                             void *mech_data,
                                             const char *input,
                                             size_t input_len,
                                             char **output,
                                             size_t *output_len);
void        (*Gsasl_finish_function)        (Gsasl_session *sctx,
                                             void *mech_data);
int         (*Gsasl_code_function)          (Gsasl_session *sctx,
                                             void *mech_data,
                                             const char *input,
                                             size_t input_len,
                                             char **output,
                                             size_t *output_len);
struct      Gsasl_mechanism_functions;
struct      Gsasl_mechanism;
int         gsasl_register                  (Gsasl *ctx,
                                             const Gsasl_mechanism *mech);

Description

Details

Gsasl_init_function ()

int         (*Gsasl_init_function)          (Gsasl *ctx);

ctx :
Returns :

Gsasl_done_function ()

void        (*Gsasl_done_function)          (Gsasl *ctx);

ctx :

Gsasl_start_function ()

int         (*Gsasl_start_function)         (Gsasl_session *sctx,
                                             void **mech_data);

sctx :
mech_data :
Returns :

Gsasl_step_function ()

int         (*Gsasl_step_function)          (Gsasl_session *sctx,
                                             void *mech_data,
                                             const char *input,
                                             size_t input_len,
                                             char **output,
                                             size_t *output_len);

sctx :
mech_data :
input :
input_len :
output :
output_len :
Returns :

Gsasl_finish_function ()

void        (*Gsasl_finish_function)        (Gsasl_session *sctx,
                                             void *mech_data);

sctx :
mech_data :

Gsasl_code_function ()

int         (*Gsasl_code_function)          (Gsasl_session *sctx,
                                             void *mech_data,
                                             const char *input,
                                             size_t input_len,
                                             char **output,
                                             size_t *output_len);

sctx :
mech_data :
input :
input_len :
output :
output_len :
Returns :

struct Gsasl_mechanism_functions

struct Gsasl_mechanism_functions {
  Gsasl_init_function init;
  Gsasl_done_function done;
  Gsasl_start_function start;
  Gsasl_step_function step;
  Gsasl_finish_function finish;
  Gsasl_code_function encode;
  Gsasl_code_function decode;
};


struct Gsasl_mechanism

struct Gsasl_mechanism {
  const char *name;

  struct Gsasl_mechanism_functions client;
  struct Gsasl_mechanism_functions server;
};


gsasl_register ()

int         gsasl_register                  (Gsasl *ctx,
                                             const Gsasl_mechanism *mech);

This function initialize given mechanism, and if successful, add it to the list of plugins that is used by the library.

ctx : pointer to libgsasl handle.
mech : plugin structure with information about plugin.
Returns : GSASL_OK iff successful, otherwise GSASL_MALLOC_ERROR.

Since 0.2.0