gsasl
2.2.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL).
![]() ![]() |
#include "internal.h"
Go to the source code of this file.
Functions | |
void | gsasl_callback_set (Gsasl *ctx, Gsasl_callback_function cb) |
int | gsasl_callback (Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop) |
void | gsasl_callback_hook_set (Gsasl *ctx, void *hook) |
void * | gsasl_callback_hook_get (Gsasl *ctx) |
void | gsasl_session_hook_set (Gsasl_session *sctx, void *hook) |
void * | gsasl_session_hook_get (Gsasl_session *sctx) |
int gsasl_callback | ( | Gsasl * | ctx, |
Gsasl_session * | sctx, | ||
Gsasl_property | prop | ||
) |
gsasl_callback: @ctx: handle received from gsasl_init(), may be NULL to derive it from @sctx. @sctx: session handle. @prop: enumerated value of Gsasl_property type.
Invoke the application callback. The @prop value indicate what the callback is expected to do. For example, for GSASL_ANONYMOUS_TOKEN, the function is expected to invoke gsasl_property_set(@SCTX, GSASL_ANONYMOUS_TOKEN, "token") where "token" is the anonymous token the application wishes the SASL mechanism to use. See the manual for the meaning of all parameters.
Return value: Returns whatever the application callback returns, or GSASL_NO_CALLBACK if no application was known.
Since: 0.2.0
Definition at line 70 of file callback.c.
References Gsasl::cb, Gsasl_session::ctx, and GSASL_NO_CALLBACK.
Referenced by _gsasl_anonymous_server_step(), _gsasl_digest_md5_client_step(), _gsasl_external_server_step(), _gsasl_gs2_server_step(), _gsasl_gssapi_server_step(), _gsasl_login_server_step(), _gsasl_openid20_client_step(), _gsasl_openid20_server_step(), _gsasl_plain_server_step(), _gsasl_saml20_client_step(), _gsasl_saml20_server_step(), _gsasl_securid_server_step(), and gsasl_property_get().
void * gsasl_callback_hook_get | ( | Gsasl * | ctx | ) |
gsasl_callback_hook_get: @ctx: libgsasl handle.
Retrieve application specific data from libgsasl handle.
The application data is set using gsasl_callback_hook_set(). This is normally used by the application to maintain a global state between the main program and callbacks.
Return value: Returns the application specific data, or NULL.
Since: 0.2.0
Definition at line 119 of file callback.c.
References Gsasl::application_hook.
void gsasl_callback_hook_set | ( | Gsasl * | ctx, |
void * | hook | ||
) |
gsasl_callback_hook_set: @ctx: libgsasl handle. @hook: opaque pointer to application specific data.
Store application specific data in the libgsasl handle.
The application data can be later (for instance, inside a callback) be retrieved by calling gsasl_callback_hook_get(). This is normally used by the application to maintain a global state between the main program and callbacks.
Since: 0.2.0
Definition at line 99 of file callback.c.
References Gsasl::application_hook.
void gsasl_callback_set | ( | Gsasl * | ctx, |
Gsasl_callback_function | cb | ||
) |
gsasl_callback_set: @ctx: handle received from gsasl_init(). @cb: pointer to function implemented by application.
Store the pointer to the application provided callback in the library handle. The callback will be used, via gsasl_callback(), by mechanisms to discover various parameters (such as username and passwords). The callback function will be called with a Gsasl_property value indicating the requested behaviour. For example, for GSASL_ANONYMOUS_TOKEN, the function is expected to invoke gsasl_property_set(@CTX, GSASL_ANONYMOUS_TOKEN, "token") where "token" is the anonymous token the application wishes the SASL mechanism to use. See the manual for the meaning of all parameters.
Since: 0.2.0
Definition at line 44 of file callback.c.
References Gsasl::cb.
Referenced by main().
void * gsasl_session_hook_get | ( | Gsasl_session * | sctx | ) |
gsasl_session_hook_get: @sctx: libgsasl session handle.
Retrieve application specific data from libgsasl session handle.
The application data is set using gsasl_callback_hook_set(). This is normally used by the application to maintain a per-session state between the main program and callbacks.
Return value: Returns the application specific data, or NULL.
Since: 0.2.14
Definition at line 159 of file callback.c.
References Gsasl_session::application_hook.
void gsasl_session_hook_set | ( | Gsasl_session * | sctx, |
void * | hook | ||
) |
gsasl_session_hook_set: @sctx: libgsasl session handle. @hook: opaque pointer to application specific data.
Store application specific data in the libgsasl session handle.
The application data can be later (for instance, inside a callback) be retrieved by calling gsasl_session_hook_get(). This is normally used by the application to maintain a per-session state between the main program and callbacks.
Since: 0.2.14
Definition at line 139 of file callback.c.
References Gsasl_session::application_hook.