Chapter 10. Old Functions

As GNU SASL is still under heavy development, some API functions have been found to be less useful. Those old API functions will be supported during a transition period. Refer to the NEWS file to find out since when a function has been deprecated.

int gsasl_client_listmech (Gsasl_ctx * ctx, char * out, size_t * outlen) ctx: libgsasl handle.

out: output character array.

outlen: input maximum size of output character array, on output contains actual length of output array.

Write SASL names, separated by space, of mechanisms supported by the libgsasl client to the output array. To find out how large the output array must be, call this function with out=NULL.

Note that this function is obsolete and may be removed in the future.

Return value: Returns GSASL_OK if successful, or error code.

int gsasl_server_listmech (Gsasl_ctx * ctx, char * out, size_t * outlen) ctx: libgsasl handle.

out: output character array.

outlen: input maximum size of output character array, on output contains actual length of output array.

Write SASL names, separated by space, of mechanisms supported by the libgsasl server to the output array. To find out how large the output array must be, call this function with out=NULL.

Note that this function is obsolete and may be removed in the future.

Return value: Returns GSASL_OK if successful, or error code.

int gsasl_client_step (Gsasl_session_ctx * sctx, const char * input, size_t input_len, char * output, size_t * output_len) sctx: libgsasl client handle.

input: input byte array.

input_len: size of input byte array.

output: output byte array.

output_len: size of output byte array.

Perform one step of SASL authentication in client. This reads data from server (specified with input and input_len), processes it (potentially invoking callbacks to the application), and writes data to server (into variables output and output_len).

The contents of the output buffer is unspecified if this functions returns anything other than GSASL_NEEDS_MORE.

Note that this function is obsolete and may be removed in the future.

Return value: Returns GSASL_OK if authenticated terminated successfully, GSASL_NEEDS_MORE if more data is needed, or error code.

int gsasl_server_step (Gsasl_session_ctx * sctx, const char * input, size_t input_len, char * output, size_t * output_len) sctx: libgsasl server handle.

input: input byte array.

input_len: size of input byte array.

output: output byte array.

output_len: size of output byte array.

Perform one step of SASL authentication in server. This reads data from client (specified with input and input_len), processes it (potentially invoking callbacks to the application), and writes data to client (into variables output and output_len).

The contents of the output buffer is unspecified if this functions returns anything other than GSASL_NEEDS_MORE.

Note that this function is obsolete and may be removed in the future.

Return value: Returns GSASL_OK if authenticated terminated successfully, GSASL_NEEDS_MORE if more data is needed, or error code.

int gsasl_client_step_base64 (Gsasl_session_ctx * sctx, const char * b64input, char * b64output, size_t b64output_len) sctx: libgsasl client handle.

b64input: input base64 encoded byte array.

b64output: output base64 encoded byte array.

b64output_len: size of output base64 encoded byte array.

This is a simple wrapper around gsasl_client_step() that base64 decodes the input and base64 encodes the output.

Note that this function is obsolete and may be removed in the future.

Return value: See gsasl_client_step().

int gsasl_server_step_base64 (Gsasl_session_ctx * sctx, const char * b64input, char * b64output, size_t b64output_len) sctx: libgsasl server handle.

b64input: input base64 encoded byte array.

b64output: output base64 encoded byte array.

b64output_len: size of output base64 encoded byte array.

This is a simple wrapper around gsasl_server_step() that base64 decodes the input and base64 encodes the output.

Note that this function is obsolete and may be removed in the future.

Return value: See gsasl_server_step().

void gsasl_client_finish (Gsasl_session_ctx * sctx) sctx: libgsasl client handle.

Destroy a libgsasl client handle. The handle must not be used with other libgsasl functions after this call.

Note that this function is obsolete and may be removed in the future.

void gsasl_server_finish (Gsasl_session_ctx * sctx) sctx: libgsasl server handle.

Destroy a libgsasl server handle. The handle must not be used with other libgsasl functions after this call.

Note that this function is obsolete and may be removed in the future.

Gsasl_ctx * gsasl_client_ctx_get (Gsasl_session_ctx * sctx) sctx: libgsasl client handle

Note that this function is obsolete and may be removed in the future.

Return value: Returns the libgsasl handle given a libgsasl client handle.

void gsasl_client_application_data_set (Gsasl_session_ctx * sctx, void * application_data) sctx: libgsasl client handle.

application_data: opaque pointer to application specific data.

Store application specific data in the libgsasl client handle. The application data can be later (for instance, inside a callback) be retrieved by calling gsasl_client_application_data_get(). It is normally used by the application to maintain state between the main program and the callback.

Note that this function is obsolete and may be removed in the future.

void * gsasl_client_application_data_get (Gsasl_session_ctx * sctx) sctx: libgsasl client handle.

Retrieve application specific data from libgsasl client handle. The application data is set using gsasl_client_application_data_set(). It is normally used by the application to maintain state between the main program and the callback.

Note that this function is obsolete and may be removed in the future.

Return value: Returns the application specific data, or NULL.

Gsasl_ctx * gsasl_server_ctx_get (Gsasl_session_ctx * sctx) sctx: libgsasl server handle

Note that this function is obsolete and may be removed in the future.

Return value: Returns the libgsasl handle given a libgsasl server handle.

void gsasl_server_application_data_set (Gsasl_session_ctx * sctx, void * application_data) sctx: libgsasl server handle.

application_data: opaque pointer to application specific data.

Store application specific data in the libgsasl server handle. The application data can be later (for instance, inside a callback) be retrieved by calling gsasl_server_application_data_get(). It is normally used by the application to maintain state between the main program and the callback.

Note that this function is obsolete and may be removed in the future.

void * gsasl_server_application_data_get (Gsasl_session_ctx * sctx) sctx: libgsasl server handle.

Retrieve application specific data from libgsasl server handle. The application data is set using gsasl_server_application_data_set(). It is normally used by the application to maintain state between the main program and the callback.

Note that this function is obsolete and may be removed in the future.

Return value: Returns the application specific data, or NULL.