gsasl-compat

gsasl-compat

Synopsis

int                 (*Gsasl_client_callback_anonymous)  (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
int                 (*Gsasl_client_callback_authentication_id)
                                                        (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
int                 (*Gsasl_client_callback_authorization_id)
                                                        (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
size_t              (*Gsasl_client_callback_maxbuf)     (Gsasl_session *sctx,
                                                         size_t servermaxbuf);
int                 (*Gsasl_client_callback_passcode)   (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
int                 (*Gsasl_client_callback_password)   (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
int                 (*Gsasl_client_callback_pin)        (Gsasl_session *sctx,
                                                         char *suggestion,
                                                         char *out,
                                                         size_t *outlen);
Gsasl_qop           (*Gsasl_client_callback_qop)        (Gsasl_session *sctx,
                                                         Gsasl_qop serverqops);
int                 (*Gsasl_client_callback_realm)      (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);
int                 (*Gsasl_client_callback_service)    (Gsasl_session *sctx,
                                                         char *service,
                                                         size_t *servicelen,
                                                         char *hostname,
                                                         size_t *hostnamelen,
                                                         char *servicename,
                                                         size_t *servicenamelen);
int                 (*Gsasl_server_callback_anonymous)  (Gsasl_session *sctx,
                                                         const char *token);
Gsasl_cipher        (*Gsasl_server_callback_cipher)     (Gsasl_session *sctx);
int                 (*Gsasl_server_callback_cram_md5)   (Gsasl_session *sctx,
                                                         char *username,
                                                         char *challenge,
                                                         char *response);
int                 (*Gsasl_server_callback_digest_md5) (Gsasl_session *sctx,
                                                         char *username,
                                                         char *realm,
                                                         char *secrethash);
int                 (*Gsasl_server_callback_external)   (Gsasl_session *sctx);
int                 (*Gsasl_server_callback_gssapi)     (Gsasl_session *sctx,
                                                         const char *clientname,
                                                         const char *authentication_id);
size_t              (*Gsasl_server_callback_maxbuf)     (Gsasl_session *sctx);
Gsasl_qop           (*Gsasl_server_callback_qop)        (Gsasl_session *sctx);
int                 (*Gsasl_server_callback_realm)      (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen,
                                                         size_t nth);
int                 (*Gsasl_server_callback_retrieve)   (Gsasl_session *sctx,
                                                         const char *authentication_id,
                                                         const char *authorization_id,
                                                         const char *realm,
                                                         char *key,
                                                         size_t *keylen);
int                 (*Gsasl_server_callback_securid)    (Gsasl_session *sctx,
                                                         const char *authentication_id,
                                                         const char *authorization_id,
                                                         const char *passcode,
                                                         char *pin,
                                                         char *suggestpin,
                                                         size_t *suggestpinlen);
int                 (*Gsasl_server_callback_service)    (Gsasl_session *sctx,
                                                         char *service,
                                                         size_t *servicelen,
                                                         char *hostname,
                                                         size_t *hostnamelen);
int                 (*Gsasl_server_callback_validate)   (Gsasl_session *sctx,
                                                         const char *authorization_id,
                                                         const char *authentication_id,
                                                         const char *password);
void *              gsasl_appinfo_get                   (Gsasl_session *sctx);
void                gsasl_appinfo_set                   (Gsasl_session *sctx,
                                                         void *appdata);
void *              gsasl_application_data_get          (Gsasl *ctx);
void                gsasl_application_data_set          (Gsasl *ctx,
                                                         void *appdata);
int                 gsasl_base64_decode                 (char const *src,
                                                         char *target,
                                                         size_t targsize);
int                 gsasl_base64_encode                 (char const *src,
                                                         size_t srclength,
                                                         char *target,
                                                         size_t targsize);
void *              gsasl_client_application_data_get   (Gsasl_session *sctx);
void                gsasl_client_application_data_set   (Gsasl_session *sctx,
                                                         void *application_data);
Gsasl_client_callback_anonymous gsasl_client_callback_anonymous_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_anonymous_set (Gsasl *ctx,
                                                         Gsasl_client_callback_anonymous cb);
Gsasl_client_callback_authentication_id gsasl_client_callback_authentication_id_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_authentication_id_set
                                                        (Gsasl *ctx,
                                                         Gsasl_client_callback_authentication_id cb);
Gsasl_client_callback_authorization_id gsasl_client_callback_authorization_id_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_authorization_id_set
                                                        (Gsasl *ctx,
                                                         Gsasl_client_callback_authorization_id cb);
Gsasl_client_callback_maxbuf gsasl_client_callback_maxbuf_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_maxbuf_set    (Gsasl *ctx,
                                                         Gsasl_client_callback_maxbuf cb);
Gsasl_client_callback_passcode gsasl_client_callback_passcode_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_passcode_set  (Gsasl *ctx,
                                                         Gsasl_client_callback_passcode cb);
Gsasl_client_callback_password gsasl_client_callback_password_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_password_set  (Gsasl *ctx,
                                                         Gsasl_client_callback_password cb);
Gsasl_client_callback_pin gsasl_client_callback_pin_get (Gsasl *ctx);
void                gsasl_client_callback_pin_set       (Gsasl *ctx,
                                                         Gsasl_client_callback_pin cb);
Gsasl_client_callback_qop gsasl_client_callback_qop_get (Gsasl *ctx);
void                gsasl_client_callback_qop_set       (Gsasl *ctx,
                                                         Gsasl_client_callback_qop cb);
Gsasl_client_callback_realm gsasl_client_callback_realm_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_realm_set     (Gsasl *ctx,
                                                         Gsasl_client_callback_realm cb);
Gsasl_client_callback_service gsasl_client_callback_service_get
                                                        (Gsasl *ctx);
void                gsasl_client_callback_service_set   (Gsasl *ctx,
                                                         Gsasl_client_callback_service cb);
Gsasl *             gsasl_client_ctx_get                (Gsasl_session *sctx);
void                gsasl_client_finish                 (Gsasl_session *sctx);
int                 gsasl_client_listmech               (Gsasl *ctx,
                                                         char *out,
                                                         size_t *outlen);
int                 gsasl_client_step                   (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);
int                 gsasl_client_step_base64            (Gsasl_session *sctx,
                                                         const char *b64input,
                                                         char *b64output,
                                                         size_t b64output_len);
Gsasl *             gsasl_ctx_get                       (Gsasl_session *sctx);
int                 gsasl_decode_inline                 (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);
int                 gsasl_encode_inline                 (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);
int                 gsasl_md5pwd_get_password           (const char *filename,
                                                         const char *username,
                                                         char *key,
                                                         size_t *keylen);
int                 gsasl_randomize                     (int strong,
                                                         char *data,
                                                         size_t datalen);
void *              gsasl_server_application_data_get   (Gsasl_session *sctx);
void                gsasl_server_application_data_set   (Gsasl_session *sctx,
                                                         void *application_data);
Gsasl_server_callback_anonymous gsasl_server_callback_anonymous_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_anonymous_set (Gsasl *ctx,
                                                         Gsasl_server_callback_anonymous cb);
Gsasl_server_callback_cipher gsasl_server_callback_cipher_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_cipher_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_cipher cb);
Gsasl_server_callback_cram_md5 gsasl_server_callback_cram_md5_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_cram_md5_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_cram_md5 cb);
Gsasl_server_callback_digest_md5 gsasl_server_callback_digest_md5_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_digest_md5_set
                                                        (Gsasl *ctx,
                                                         Gsasl_server_callback_digest_md5 cb);
Gsasl_server_callback_external gsasl_server_callback_external_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_external_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_external cb);
Gsasl_server_callback_gssapi gsasl_server_callback_gssapi_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_gssapi_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_gssapi cb);
Gsasl_server_callback_maxbuf gsasl_server_callback_maxbuf_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_maxbuf_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_maxbuf cb);
Gsasl_server_callback_qop gsasl_server_callback_qop_get (Gsasl *ctx);
void                gsasl_server_callback_qop_set       (Gsasl *ctx,
                                                         Gsasl_server_callback_qop cb);
Gsasl_server_callback_realm gsasl_server_callback_realm_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_realm_set     (Gsasl *ctx,
                                                         Gsasl_server_callback_realm cb);
Gsasl_server_callback_retrieve gsasl_server_callback_retrieve_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_retrieve_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_retrieve cb);
Gsasl_server_callback_securid gsasl_server_callback_securid_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_securid_set   (Gsasl *ctx,
                                                         Gsasl_server_callback_securid cb);
Gsasl_server_callback_service gsasl_server_callback_service_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_service_set   (Gsasl *ctx,
                                                         Gsasl_server_callback_service cb);
Gsasl_server_callback_validate gsasl_server_callback_validate_get
                                                        (Gsasl *ctx);
void                gsasl_server_callback_validate_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_validate cb);
Gsasl *             gsasl_server_ctx_get                (Gsasl_session *sctx);
void                gsasl_server_finish                 (Gsasl_session *sctx);
int                 gsasl_server_listmech               (Gsasl *ctx,
                                                         char *out,
                                                         size_t *outlen);
int                 gsasl_server_step                   (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);
int                 gsasl_server_step_base64            (Gsasl_session *sctx,
                                                         const char *b64input,
                                                         char *b64output,
                                                         size_t b64output_len);
const char *        gsasl_server_suggest_mechanism      (Gsasl *ctx,
                                                         const char *mechlist);
char *              gsasl_stringprep_nfkc               (const char *in,
                                                         ssize_t len);
char *              gsasl_stringprep_saslprep           (const char *in,
                                                         int *stringprep_rc);
char *              gsasl_stringprep_trace              (const char *in,
                                                         int *stringprep_rc);

Description

Details

Gsasl_client_callback_anonymous ()

int                 (*Gsasl_client_callback_anonymous)  (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_authentication_id ()

int                 (*Gsasl_client_callback_authentication_id)
                                                        (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_authorization_id ()

int                 (*Gsasl_client_callback_authorization_id)
                                                        (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_maxbuf ()

size_t              (*Gsasl_client_callback_maxbuf)     (Gsasl_session *sctx,
                                                         size_t servermaxbuf);


Gsasl_client_callback_passcode ()

int                 (*Gsasl_client_callback_passcode)   (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_password ()

int                 (*Gsasl_client_callback_password)   (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_pin ()

int                 (*Gsasl_client_callback_pin)        (Gsasl_session *sctx,
                                                         char *suggestion,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_qop ()

Gsasl_qop           (*Gsasl_client_callback_qop)        (Gsasl_session *sctx,
                                                         Gsasl_qop serverqops);


Gsasl_client_callback_realm ()

int                 (*Gsasl_client_callback_realm)      (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen);


Gsasl_client_callback_service ()

int                 (*Gsasl_client_callback_service)    (Gsasl_session *sctx,
                                                         char *service,
                                                         size_t *servicelen,
                                                         char *hostname,
                                                         size_t *hostnamelen,
                                                         char *servicename,
                                                         size_t *servicenamelen);


Gsasl_server_callback_anonymous ()

int                 (*Gsasl_server_callback_anonymous)  (Gsasl_session *sctx,
                                                         const char *token);


Gsasl_server_callback_cipher ()

Gsasl_cipher        (*Gsasl_server_callback_cipher)     (Gsasl_session *sctx);


Gsasl_server_callback_cram_md5 ()

int                 (*Gsasl_server_callback_cram_md5)   (Gsasl_session *sctx,
                                                         char *username,
                                                         char *challenge,
                                                         char *response);


Gsasl_server_callback_digest_md5 ()

int                 (*Gsasl_server_callback_digest_md5) (Gsasl_session *sctx,
                                                         char *username,
                                                         char *realm,
                                                         char *secrethash);


Gsasl_server_callback_external ()

int                 (*Gsasl_server_callback_external)   (Gsasl_session *sctx);


Gsasl_server_callback_gssapi ()

int                 (*Gsasl_server_callback_gssapi)     (Gsasl_session *sctx,
                                                         const char *clientname,
                                                         const char *authentication_id);


Gsasl_server_callback_maxbuf ()

size_t              (*Gsasl_server_callback_maxbuf)     (Gsasl_session *sctx);


Gsasl_server_callback_qop ()

Gsasl_qop           (*Gsasl_server_callback_qop)        (Gsasl_session *sctx);


Gsasl_server_callback_realm ()

int                 (*Gsasl_server_callback_realm)      (Gsasl_session *sctx,
                                                         char *out,
                                                         size_t *outlen,
                                                         size_t nth);


Gsasl_server_callback_retrieve ()

int                 (*Gsasl_server_callback_retrieve)   (Gsasl_session *sctx,
                                                         const char *authentication_id,
                                                         const char *authorization_id,
                                                         const char *realm,
                                                         char *key,
                                                         size_t *keylen);


Gsasl_server_callback_securid ()

int                 (*Gsasl_server_callback_securid)    (Gsasl_session *sctx,
                                                         const char *authentication_id,
                                                         const char *authorization_id,
                                                         const char *passcode,
                                                         char *pin,
                                                         char *suggestpin,
                                                         size_t *suggestpinlen);


Gsasl_server_callback_service ()

int                 (*Gsasl_server_callback_service)    (Gsasl_session *sctx,
                                                         char *service,
                                                         size_t *servicelen,
                                                         char *hostname,
                                                         size_t *hostnamelen);


Gsasl_server_callback_validate ()

int                 (*Gsasl_server_callback_validate)   (Gsasl_session *sctx,
                                                         const char *authorization_id,
                                                         const char *authentication_id,
                                                         const char *password);


gsasl_appinfo_get ()

void *              gsasl_appinfo_get                   (Gsasl_session *sctx);

Warning

gsasl_appinfo_get is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_get() instead.

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

sctx :

libgsasl session handle.

Returns :

Returns the application specific data, or NULL.

gsasl_appinfo_set ()

void                gsasl_appinfo_set                   (Gsasl_session *sctx,
                                                         void *appdata);

Warning

gsasl_appinfo_set is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_set() instead.

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_appinfo_get(). It is normally used by the application to maintain state between the main program and the callback.

sctx :

libgsasl session handle.

appdata :

opaque pointer to application specific data.

gsasl_application_data_get ()

void *              gsasl_application_data_get          (Gsasl *ctx);

Warning

gsasl_application_data_get is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_get() instead.

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

ctx :

libgsasl handle.

Returns :

Returns the application specific data, or NULL.

gsasl_application_data_set ()

void                gsasl_application_data_set          (Gsasl *ctx,
                                                         void *appdata);

Warning

gsasl_application_data_set is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_set() instead.

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

ctx :

libgsasl handle.

appdata :

opaque pointer to application specific data.

gsasl_base64_decode ()

int                 gsasl_base64_decode                 (char const *src,
                                                         char *target,
                                                         size_t targsize);

Warning

gsasl_base64_decode is deprecated and should not be used in newly-written code. Use gsasl_base64_from() instead.

Decode Base64 data. Skips all whitespace anywhere. Converts characters, four at a time, starting at (or after) src from Base64 numbers into three 8 bit bytes in the target area.

src :

input byte array

target :

output byte array

targsize :

size of output byte array

Returns :

Returns the number of data bytes stored at the target, or -1 on error.

gsasl_base64_encode ()

int                 gsasl_base64_encode                 (char const *src,
                                                         size_t srclength,
                                                         char *target,
                                                         size_t targsize);

Warning

gsasl_base64_encode is deprecated and should not be used in newly-written code. Use gsasl_base64_to() instead.

Encode data as base64. Converts characters, three at a time, starting at src into four base64 characters in the target area until the entire input buffer is encoded.

src :

input byte array

srclength :

size of input byte array

target :

output byte array

targsize :

size of output byte array

Returns :

Returns the number of data bytes stored at the target, or -1 on error.

gsasl_client_application_data_get ()

void *              gsasl_client_application_data_get   (Gsasl_session *sctx);

Warning

gsasl_client_application_data_get is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_get() or gsasl_session_hook_get() instead.

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.

sctx :

libgsasl client handle.

Returns :

Returns the application specific data, or NULL.

gsasl_client_application_data_set ()

void                gsasl_client_application_data_set   (Gsasl_session *sctx,
                                                         void *application_data);

Warning

gsasl_client_application_data_set is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_set() or gsasl_session_hook_set() instead.

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.

sctx :

libgsasl client handle.

application_data :

opaque pointer to application specific data.

gsasl_client_callback_anonymous_get ()

Gsasl_client_callback_anonymous gsasl_client_callback_anonymous_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_anonymous_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_anonymous_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_anonymous_set().

gsasl_client_callback_anonymous_set ()

void                gsasl_client_callback_anonymous_set (Gsasl *ctx,
                                                         Gsasl_client_callback_anonymous cb);

Warning

gsasl_client_callback_anonymous_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the anonymous token, which usually is the users email address. The function can be later retrieved using gsasl_client_callback_anonymous_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_authentication_id_get ()

Gsasl_client_callback_authentication_id gsasl_client_callback_authentication_id_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_authentication_id_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_authentication_id_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_authentication_id_set().

gsasl_client_callback_authentication_id_set ()

void                gsasl_client_callback_authentication_id_set
                                                        (Gsasl *ctx,
                                                         Gsasl_client_callback_authentication_id cb);

Warning

gsasl_client_callback_authentication_id_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the authentication identity. The function can be later retrieved using gsasl_client_callback_authentication_id_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_authorization_id_get ()

Gsasl_client_callback_authorization_id gsasl_client_callback_authorization_id_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_authorization_id_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_authorization_id_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_authorization_id_set().

gsasl_client_callback_authorization_id_set ()

void                gsasl_client_callback_authorization_id_set
                                                        (Gsasl *ctx,
                                                         Gsasl_client_callback_authorization_id cb);

Warning

gsasl_client_callback_authorization_id_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the authorization identity. The function can be later retrieved using gsasl_client_callback_authorization_id_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_maxbuf_get ()

Gsasl_client_callback_maxbuf gsasl_client_callback_maxbuf_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_maxbuf_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_maxbuf_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_maxbuf_set().

gsasl_client_callback_maxbuf_set ()

void                gsasl_client_callback_maxbuf_set    (Gsasl *ctx,
                                                         Gsasl_client_callback_maxbuf cb);

Warning

gsasl_client_callback_maxbuf_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to inform the server of the largest buffer the client is able to receive when using the DIGEST-MD5 "auth-int" or "auth-conf" Quality of Protection (qop). If this directive is missing, the default value 65536 will be assumed. The function can be later retrieved using gsasl_client_callback_maxbuf_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_passcode_get ()

Gsasl_client_callback_passcode gsasl_client_callback_passcode_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_passcode_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_passcode_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_passcode_set().

gsasl_client_callback_passcode_set ()

void                gsasl_client_callback_passcode_set  (Gsasl *ctx,
                                                         Gsasl_client_callback_passcode cb);

Warning

gsasl_client_callback_passcode_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the passcode. The function can be later retrieved using gsasl_client_callback_passcode_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_password_get ()

Gsasl_client_callback_password gsasl_client_callback_password_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_password_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_password_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_password_set().

gsasl_client_callback_password_set ()

void                gsasl_client_callback_password_set  (Gsasl *ctx,
                                                         Gsasl_client_callback_password cb);

Warning

gsasl_client_callback_password_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the password. The function can be later retrieved using gsasl_client_callback_password_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_pin_get ()

Gsasl_client_callback_pin gsasl_client_callback_pin_get (Gsasl *ctx);

Warning

gsasl_client_callback_pin_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_pin_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_pin_set().

gsasl_client_callback_pin_set ()

void                gsasl_client_callback_pin_set       (Gsasl *ctx,
                                                         Gsasl_client_callback_pin cb);

Warning

gsasl_client_callback_pin_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to chose a new pin, possibly suggested by the server, for the SECURID mechanism. This is not normally invoked, but only when the server requests it. The function can be later retrieved using gsasl_client_callback_pin_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_qop_get ()

Gsasl_client_callback_qop gsasl_client_callback_qop_get (Gsasl *ctx);

Warning

gsasl_client_callback_qop_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_qop_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_qop_set().

gsasl_client_callback_qop_set ()

void                gsasl_client_callback_qop_set       (Gsasl *ctx,
                                                         Gsasl_client_callback_qop cb);

Warning

gsasl_client_callback_qop_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to determine the qop to use after looking at what the server offered. The function can be later retrieved using gsasl_client_callback_qop_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_realm_get ()

Gsasl_client_callback_realm gsasl_client_callback_realm_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_realm_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_realm_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_realm_set().

gsasl_client_callback_realm_set ()

void                gsasl_client_callback_realm_set     (Gsasl *ctx,
                                                         Gsasl_client_callback_realm cb);

Warning

gsasl_client_callback_realm_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to know which realm it belongs to. The realm is used by the server to determine which username and password to use. The function can be later retrieved using gsasl_client_callback_realm_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_callback_service_get ()

Gsasl_client_callback_service gsasl_client_callback_service_get
                                                        (Gsasl *ctx);

Warning

gsasl_client_callback_service_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_client_callback_service_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_client_callback_service_set().

gsasl_client_callback_service_set ()

void                gsasl_client_callback_service_set   (Gsasl *ctx,
                                                         Gsasl_client_callback_service cb);

Warning

gsasl_client_callback_service_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the client to set the name of the service. The service buffer should be a registered GSSAPI host-based service name, hostname the name of the server. Servicename is used by DIGEST-MD5 and should be the name of generic server in case of a replicated service. The function can be later retrieved using gsasl_client_callback_service_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_client_ctx_get ()

Gsasl *             gsasl_client_ctx_get                (Gsasl_session *sctx);

Warning

gsasl_client_ctx_get is deprecated and should not be used in newly-written code. This function is not useful with the new 0.2.0 API.

Get the libgsasl handle given a libgsasl client handle.

sctx :

libgsasl client handle

Returns :

Returns the libgsasl handle given a libgsasl client handle.

gsasl_client_finish ()

void                gsasl_client_finish                 (Gsasl_session *sctx);

Warning

gsasl_client_finish is deprecated and should not be used in newly-written code. Use gsasl_finish() instead.

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

sctx :

libgsasl client handle.

gsasl_client_listmech ()

int                 gsasl_client_listmech               (Gsasl *ctx,
                                                         char *out,
                                                         size_t *outlen);

Warning

gsasl_client_listmech is deprecated and should not be used in newly-written code. Use gsasl_client_mechlist() instead.

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 a NULL out parameter.

ctx :

libgsasl handle.

out :

output character array.

outlen :

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

Returns :

Returns GSASL_OK if successful, or error code.

gsasl_client_step ()

int                 gsasl_client_step                   (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);

Warning

gsasl_client_step is deprecated and should not be used in newly-written code. Use gsasl_step() instead.

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.

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.

Returns :

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

gsasl_client_step_base64 ()

int                 gsasl_client_step_base64            (Gsasl_session *sctx,
                                                         const char *b64input,
                                                         char *b64output,
                                                         size_t b64output_len);

Warning

gsasl_client_step_base64 is deprecated and should not be used in newly-written code. Use gsasl_step64() instead.

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

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.

Returns :

See gsasl_client_step().

gsasl_ctx_get ()

Gsasl *             gsasl_ctx_get                       (Gsasl_session *sctx);

Warning

gsasl_ctx_get is deprecated and should not be used in newly-written code. This function is not useful with the new 0.2.0 API.

Get the libgsasl handle given a libgsasl session handle.

sctx :

libgsasl session handle

Returns :

Returns the libgsasl handle given a libgsasl session handle.

gsasl_decode_inline ()

int                 gsasl_decode_inline                 (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);

Warning

gsasl_decode_inline is deprecated and should not be used in newly-written code. Use gsasl_decode() instead.

Decode data according to negotiated SASL mechanism. This might mean that data is integrity or privacy protected.

sctx :

libgsasl session handle.

input :

input byte array.

input_len :

size of input byte array.

output :

output byte array.

output_len :

size of output byte array.

Returns :

Returns GSASL_OK if encoding was successful, otherwise an error code.

Since 0.2.0


gsasl_encode_inline ()

int                 gsasl_encode_inline                 (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);

Warning

gsasl_encode_inline is deprecated and should not be used in newly-written code. Use gsasl_encode() instead.

Encode data according to negotiated SASL mechanism. This might mean that data is integrity or privacy protected.

sctx :

libgsasl session handle.

input :

input byte array.

input_len :

size of input byte array.

output :

output byte array.

output_len :

size of output byte array.

Returns :

Returns GSASL_OK if encoding was successful, otherwise an error code.

Since 0.2.0


gsasl_md5pwd_get_password ()

int                 gsasl_md5pwd_get_password           (const char *filename,
                                                         const char *username,
                                                         char *key,
                                                         size_t *keylen);

Warning

gsasl_md5pwd_get_password is deprecated and should not be used in newly-written code. Use gsasl_simple_getpass() instead.

Retrieve password for user from specified file. To find out how large the output array must be, call this function with out=NULL.

The file should be on the UoW "MD5 Based Authentication" format, which means it is in text format with comments denoted by # first on the line, with user entries looking as "usernameTABpassword". This function removes CR and LF at the end of lines before processing. TAB, CR, and LF denote ASCII values 9, 13, and 10, respectively.

filename :

filename of file containing passwords.

username :

username string.

key :

output character array.

keylen :

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

Returns :

Return GSASL_OK if output buffer contains the password, GSASL_AUTHENTICATION_ERROR if the user could not be found, or other error code.

gsasl_randomize ()

int                 gsasl_randomize                     (int strong,
                                                         char *data,
                                                         size_t datalen);

Warning

gsasl_randomize is deprecated and should not be used in newly-written code. Use gsasl_random() or gsasl_nonce() instead.

Store cryptographically random data of given size in the provided buffer.

strong :

0 iff operation should not block, non-0 for very strong randomness.

data :

output array to be filled with random data.

datalen :

size of output array.

Returns :

Returns GSASL_OK iff successful.

gsasl_server_application_data_get ()

void *              gsasl_server_application_data_get   (Gsasl_session *sctx);

Warning

gsasl_server_application_data_get is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_get() or gsasl_session_hook_get() instead.

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.

sctx :

libgsasl server handle.

Returns :

Returns the application specific data, or NULL.

gsasl_server_application_data_set ()

void                gsasl_server_application_data_set   (Gsasl_session *sctx,
                                                         void *application_data);

Warning

gsasl_server_application_data_set is deprecated and should not be used in newly-written code. Use gsasl_callback_hook_set() or gsasl_session_hook_set() instead.

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.

sctx :

libgsasl server handle.

application_data :

opaque pointer to application specific data.

gsasl_server_callback_anonymous_get ()

Gsasl_server_callback_anonymous gsasl_server_callback_anonymous_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_anonymous_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_anonymous_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_anonymous_set().

gsasl_server_callback_anonymous_set ()

void                gsasl_server_callback_anonymous_set (Gsasl *ctx,
                                                         Gsasl_server_callback_anonymous cb);

Warning

gsasl_server_callback_anonymous_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for deciding if user is permitted anonymous access. The function can be later retrieved using gsasl_server_callback_anonymous_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_cipher_get ()

Gsasl_server_callback_cipher gsasl_server_callback_cipher_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_cipher_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_cipher_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_cipher_set().

gsasl_server_callback_cipher_set ()

void                gsasl_server_callback_cipher_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_cipher cb);

Warning

gsasl_server_callback_cipher_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server to inform the client of the cipher suites supported. The DES and 3DES ciphers must be supported for interoperability. It is currently used by the DIGEST-MD5 mechanism. The function can be later retrieved using gsasl_server_callback_cipher_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_cram_md5_get ()

Gsasl_server_callback_cram_md5 gsasl_server_callback_cram_md5_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_cram_md5_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_cram_md5_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_cram_md5_set().

gsasl_server_callback_cram_md5_set ()

void                gsasl_server_callback_cram_md5_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_cram_md5 cb);

Warning

gsasl_server_callback_cram_md5_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for deciding if user is authenticated using CRAM-MD5 challenge and response. The function can be later retrieved using gsasl_server_callback_cram_md5_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_digest_md5_get ()

Gsasl_server_callback_digest_md5 gsasl_server_callback_digest_md5_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_digest_md5_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_digest_md5_set().

ctx :

libgsasl handle.

Returns :

Return the callback earlier set by calling gsasl_server_callback_digest_md5_set().

gsasl_server_callback_digest_md5_set ()

void                gsasl_server_callback_digest_md5_set
                                                        (Gsasl *ctx,
                                                         Gsasl_server_callback_digest_md5 cb);

Warning

gsasl_server_callback_digest_md5_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for retrieving the secret hash of the username, realm and password for use in the DIGEST-MD5 mechanism. The function can be later retrieved using gsasl_server_callback_digest_md5_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_external_get ()

Gsasl_server_callback_external gsasl_server_callback_external_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_external_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_external_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_external_set().

gsasl_server_callback_external_set ()

void                gsasl_server_callback_external_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_external cb);

Warning

gsasl_server_callback_external_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for deciding if user is authenticated out of band. The function can be later retrieved using gsasl_server_callback_external_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_gssapi_get ()

Gsasl_server_callback_gssapi gsasl_server_callback_gssapi_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_gssapi_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_gssapi_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_gssapi_set().

gsasl_server_callback_gssapi_set ()

void                gsasl_server_callback_gssapi_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_gssapi cb);

Warning

gsasl_server_callback_gssapi_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for checking if a GSSAPI user is authorized for username (by, e.g., calling krb5_kuserok). The function should return GSASL_OK if the user should be permitted access, or an error code such as GSASL_AUTHENTICATION_ERROR on failure. The function can be later retrieved using gsasl_server_callback_gssapi_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_maxbuf_get ()

Gsasl_server_callback_maxbuf gsasl_server_callback_maxbuf_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_maxbuf_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_maxbuf_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_maxbuf_set().

gsasl_server_callback_maxbuf_set ()

void                gsasl_server_callback_maxbuf_set    (Gsasl *ctx,
                                                         Gsasl_server_callback_maxbuf cb);

Warning

gsasl_server_callback_maxbuf_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server to inform the client of the largest buffer the server is able to receive when using the DIGEST-MD5 "auth-int" or "auth-conf" Quality of Protection (qop). If this directive is missing, the default value 65536 will be assumed. The function can be later retrieved using gsasl_server_callback_maxbuf_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_qop_get ()

Gsasl_server_callback_qop gsasl_server_callback_qop_get (Gsasl *ctx);

Warning

gsasl_server_callback_qop_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_qop_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_qop_set().

gsasl_server_callback_qop_set ()

void                gsasl_server_callback_qop_set       (Gsasl *ctx,
                                                         Gsasl_server_callback_qop cb);

Warning

gsasl_server_callback_qop_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server to know which quality of protection it accepts. The quality of protection eventually used is selected by the client though. It is currently used by the DIGEST-MD5 mechanism. The function can be later retrieved using gsasl_server_callback_qop_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_realm_get ()

Gsasl_server_callback_realm gsasl_server_callback_realm_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_realm_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_realm_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_realm_set().

gsasl_server_callback_realm_set ()

void                gsasl_server_callback_realm_set     (Gsasl *ctx,
                                                         Gsasl_server_callback_realm cb);

Warning

gsasl_server_callback_realm_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server to know which realm it serves. The realm is used by the user to determine which username and password to use. The function can be later retrieved using gsasl_server_callback_realm_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_retrieve_get ()

Gsasl_server_callback_retrieve gsasl_server_callback_retrieve_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_retrieve_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_retrieve_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_retrieve_set().

gsasl_server_callback_retrieve_set ()

void                gsasl_server_callback_retrieve_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_retrieve cb);

Warning

gsasl_server_callback_retrieve_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for deciding if user is authenticated using authentication identity, authorization identity and password. The function can be later retrieved using gsasl_server_callback_retrieve_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_securid_get ()

Gsasl_server_callback_securid gsasl_server_callback_securid_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_securid_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_securid_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_securid_set().

gsasl_server_callback_securid_set ()

void                gsasl_server_callback_securid_set   (Gsasl *ctx,
                                                         Gsasl_server_callback_securid cb);

Warning

gsasl_server_callback_securid_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for validating a user via the SECURID mechanism. The function should return GSASL_OK if user authenticated successfully, GSASL_SECURID_SERVER_NEED_ADDITIONAL_PASSCODE if it wants another passcode, GSASL_SECURID_SERVER_NEED_NEW_PIN if it wants a PIN change, or an error. When (and only when) GSASL_SECURID_SERVER_NEED_NEW_PIN is returned, suggestpin can be populated with a PIN code the server suggests, and suggestpinlen set to the length of the PIN. The function can be later retrieved using gsasl_server_callback_securid_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_service_get ()

Gsasl_server_callback_service gsasl_server_callback_service_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_service_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_service_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_service_set().

gsasl_server_callback_service_set ()

void                gsasl_server_callback_service_set   (Gsasl *ctx,
                                                         Gsasl_server_callback_service cb);

Warning

gsasl_server_callback_service_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server to set the name of the service. The service buffer should be a registered GSSAPI host-based service name, hostname the name of the server. The function can be later retrieved using gsasl_server_callback_service_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_callback_validate_get ()

Gsasl_server_callback_validate gsasl_server_callback_validate_get
                                                        (Gsasl *ctx);

Warning

gsasl_server_callback_validate_get is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Get the callback earlier set by calling gsasl_server_callback_validate_set().

ctx :

libgsasl handle.

Returns :

Returns the callback earlier set by calling gsasl_server_callback_validate_set().

gsasl_server_callback_validate_set ()

void                gsasl_server_callback_validate_set  (Gsasl *ctx,
                                                         Gsasl_server_callback_validate cb);

Warning

gsasl_server_callback_validate_set is deprecated and should not be used in newly-written code. This function is part of the old callback interface. The new interface uses gsasl_callback_set() to set the application callback, and uses gsasl_callback() or gsasl_property_get() to invoke the callback for certain properties.

Specify the callback function to use in the server for deciding if user is authenticated using authentication identity, authorization identity and password. The function can be later retrieved using gsasl_server_callback_validate_get().

ctx :

libgsasl handle.

cb :

callback function

gsasl_server_ctx_get ()

Gsasl *             gsasl_server_ctx_get                (Gsasl_session *sctx);

Warning

gsasl_server_ctx_get is deprecated and should not be used in newly-written code. This function is not useful with the new 0.2.0 API.

Get the libgsasl handle given a libgsasl server handle.

sctx :

libgsasl server handle

Returns :

Returns the libgsasl handle given a libgsasl server handle.

gsasl_server_finish ()

void                gsasl_server_finish                 (Gsasl_session *sctx);

Warning

gsasl_server_finish is deprecated and should not be used in newly-written code. Use gsasl_finish() instead.

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

sctx :

libgsasl server handle.

gsasl_server_listmech ()

int                 gsasl_server_listmech               (Gsasl *ctx,
                                                         char *out,
                                                         size_t *outlen);

Warning

gsasl_server_listmech is deprecated and should not be used in newly-written code. Use gsasl_server_mechlist() instead.

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 a NULL out parameter.

ctx :

libgsasl handle.

out :

output character array.

outlen :

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

Returns :

Returns GSASL_OK if successful, or error code.

gsasl_server_step ()

int                 gsasl_server_step                   (Gsasl_session *sctx,
                                                         const char *input,
                                                         size_t input_len,
                                                         char *output,
                                                         size_t *output_len);

Warning

gsasl_server_step is deprecated and should not be used in newly-written code. Use gsasl_step() instead.

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.

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.

Returns :

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

gsasl_server_step_base64 ()

int                 gsasl_server_step_base64            (Gsasl_session *sctx,
                                                         const char *b64input,
                                                         char *b64output,
                                                         size_t b64output_len);

Warning

gsasl_server_step_base64 is deprecated and should not be used in newly-written code. Use gsasl_step64() instead.

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

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.

Returns :

See gsasl_server_step().

gsasl_server_suggest_mechanism ()

const char *        gsasl_server_suggest_mechanism      (Gsasl *ctx,
                                                         const char *mechlist);

Warning

gsasl_server_suggest_mechanism is deprecated and should not be used in newly-written code. This function was never useful, since it is the client that chose which mechanism to use.

Get name of "best" SASL mechanism supported by the libgsasl server which is present in the input string.

ctx :

libgsasl handle.

mechlist :

input character array with SASL mechanism names, separated by invalid characters (e.g. SPC).

Returns :

Returns name of "best" SASL mechanism supported by the libgsasl server which is present in the input string.

gsasl_stringprep_nfkc ()

char *              gsasl_stringprep_nfkc               (const char *in,
                                                         ssize_t len);

Warning

gsasl_stringprep_nfkc is deprecated and should not be used in newly-written code. No replacement functionality in GNU SASL, use GNU Libidn instead. Note that in SASL, you most likely want to use SASLprep and not bare NFKC, see gsasl_saslprep().

Converts a string into canonical form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character.

The normalization mode is NFKC (ALL COMPOSE). It standardizes differences that do not affect the text content, such as the above-mentioned accent representation. It standardizes the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same. It returns a result with composed forms rather than a maximally decomposed form.

in :

a UTF-8 encoded string.

len :

length of str, in bytes, or -1 if str is nul-terminated.

Returns :

Return a newly allocated string, that is the NFKC normalized form of str, or NULL on error.

gsasl_stringprep_saslprep ()

char *              gsasl_stringprep_saslprep           (const char *in,
                                                         int *stringprep_rc);

Warning

gsasl_stringprep_saslprep is deprecated and should not be used in newly-written code. Use gsasl_saslprep() instead.

Process a Unicode string for comparison, according to the "SASLprep" stringprep profile. This function is intended to be used by Simple Authentication and Security Layer (SASL) mechanisms (such as PLAIN, CRAM-MD5, and DIGEST-MD5) as well as other protocols exchanging user names and/or passwords.

in :

input ASCII or UTF-8 string with data to prepare according to SASLprep.

stringprep_rc :

pointer to output variable with stringprep error code, or NULL to indicate that you don't care about it.

Returns :

Return a newly allocated string that is the "SASLprep" processed form of the input string, or NULL on error, in which case stringprep_rc contain the stringprep library error code.

gsasl_stringprep_trace ()

char *              gsasl_stringprep_trace              (const char *in,
                                                         int *stringprep_rc);

Warning

gsasl_stringprep_trace is deprecated and should not be used in newly-written code. No replacement functionality in GNU SASL, use GNU Libidn instead.

Process a Unicode string for use as trace information, according to the "trace" stringprep profile. The profile is designed for use with the SASL ANONYMOUS Mechanism.

in :

input ASCII or UTF-8 string with data to prepare according to "trace".

stringprep_rc :

pointer to output variable with stringprep error code, or NULL to indicate that you don't care about it.

Returns :

Return a newly allocated string that is the "trace" processed form of the input string, or NULL on error, in which case stringprep_rc contain the stringprep library error code.