/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_iterator_create (kim_ccache_iterator_t *out_ccache_iterator)
+kim_error kim_ccache_iterator_create (kim_ccache_iterator *out_ccache_iterator)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_ccache_iterator_t ccache_iterator = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_ccache_iterator ccache_iterator = NULL;
if (!err && !out_ccache_iterator) { err = param_error (1, "out_ccache_iterator", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_iterator_next (kim_ccache_iterator_t in_ccache_iterator,
- kim_ccache_t *out_ccache)
+kim_error kim_ccache_iterator_next (kim_ccache_iterator in_ccache_iterator,
+ kim_ccache *out_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_ccache ccache = NULL;
if (!err && !in_ccache_iterator) { err = param_error (1, "in_ccache_iterator", "NULL"); }
/* ------------------------------------------------------------------------ */
-void kim_ccache_iterator_free (kim_ccache_iterator_t *io_ccache_iterator)
+void kim_ccache_iterator_free (kim_ccache_iterator *io_ccache_iterator)
{
if (io_ccache_iterator && *io_ccache_iterator) {
if ((*io_ccache_iterator)->context) {
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_ccache_create_resolve_name (kim_string_t *out_resolve_name,
- kim_string_t in_name,
- kim_string_t in_type)
+static kim_error kim_ccache_create_resolve_name (kim_string *out_resolve_name,
+ kim_string in_name,
+ kim_string in_type)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !out_resolve_name) { err = param_error (1, "out_resolve_name", "NULL"); }
if (!err && !in_name ) { err = param_error (2, "in_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-static kim_boolean_t kim_ccache_k5ccaches_are_equal (krb5_context in_context,
+static kim_boolean kim_ccache_k5ccaches_are_equal (krb5_context in_context,
krb5_ccache in_ccache,
krb5_context in_compare_to_context,
krb5_ccache io_compare_to_ccache)
{
- kim_boolean_t equal = FALSE;
+ kim_boolean equal = FALSE;
if (in_context && in_ccache && in_compare_to_context && io_compare_to_ccache) {
const char *type = krb5_cc_get_type (in_context, in_ccache);
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_ccache_allocate (kim_ccache_t *out_ccache)
+static inline kim_error kim_ccache_allocate (kim_ccache *out_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_ccache_t ccache = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_ccache ccache = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_new (kim_ccache_t *out_ccache,
- kim_identity_t in_client_identity,
- kim_options_t in_options)
+kim_error kim_ccache_create_new (kim_ccache *out_ccache,
+ kim_identity in_client_identity,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
- kim_identity_t client_identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
+ kim_identity client_identity = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_new_if_needed (kim_ccache_t *out_ccache,
- kim_identity_t in_client_identity,
- kim_options_t in_options)
+kim_error kim_ccache_create_new_if_needed (kim_ccache *out_ccache,
+ kim_identity in_client_identity,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_client_identity (kim_ccache_t *out_ccache,
- kim_identity_t in_client_identity)
+kim_error kim_ccache_create_from_client_identity (kim_ccache *out_ccache,
+ kim_identity in_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_ccache_iterator_t iterator = NULL;
- kim_boolean_t found = FALSE;
+ kim_error err = KIM_NO_ERROR;
+ kim_ccache_iterator iterator = NULL;
+ kim_boolean found = FALSE;
if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); }
}
while (!err && !found) {
- kim_ccache_t ccache = NULL;
- kim_identity_t identity = NULL;
+ kim_ccache ccache = NULL;
+ kim_identity identity = NULL;
err = kim_ccache_iterator_next (iterator, &ccache);
if (!err && !ccache) {
- kim_string_t string = NULL;
+ kim_string string = NULL;
err = kim_identity_get_display_string (in_client_identity, &string);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_keytab (kim_ccache_t *out_ccache,
- kim_identity_t in_identity,
- kim_options_t in_options,
- kim_string_t in_keytab)
+kim_error kim_ccache_create_from_keytab (kim_ccache *out_ccache,
+ kim_identity in_identity,
+ kim_options in_options,
+ kim_string in_keytab)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
- kim_identity_t client_identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
+ kim_identity client_identity = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_default (kim_ccache_t *out_ccache)
+kim_error kim_ccache_create_from_default (kim_ccache *out_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_ccache_t ccache = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_ccache ccache = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_display_name (kim_ccache_t *out_ccache,
- kim_string_t in_display_name)
+kim_error kim_ccache_create_from_display_name (kim_ccache *out_ccache,
+ kim_string in_display_name)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_ccache_t ccache = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_ccache ccache = NULL;
if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_display_name) { err = param_error (2, "in_display_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_type_and_name (kim_ccache_t *out_ccache,
- kim_string_t in_type,
- kim_string_t in_name)
+kim_error kim_ccache_create_from_type_and_name (kim_ccache *out_ccache,
+ kim_string in_type,
+ kim_string in_name)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t resolve_name = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string resolve_name = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_name ) { err = param_error (2, "in_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_create_from_krb5_ccache (kim_ccache_t *out_ccache,
+kim_error kim_ccache_create_from_krb5_ccache (kim_ccache *out_ccache,
krb5_context in_krb5_context,
krb5_ccache in_krb5_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_krb5_ccache ) { err = param_error (2, "in_krb5_ccache", "NULL"); }
if (!err && !in_krb5_context) { err = param_error (3, "in_krb5_context", "NULL"); }
if (!err) {
- kim_string_t type = krb5_cc_get_type (in_krb5_context, in_krb5_ccache);
- kim_string_t name = krb5_cc_get_name (in_krb5_context, in_krb5_ccache);
+ kim_string type = krb5_cc_get_type (in_krb5_context, in_krb5_ccache);
+ kim_string name = krb5_cc_get_name (in_krb5_context, in_krb5_ccache);
err = kim_ccache_create_from_type_and_name (out_ccache, type, name);
}
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_copy (kim_ccache_t *out_ccache,
- kim_ccache_t in_ccache)
+kim_error kim_ccache_copy (kim_ccache *out_ccache,
+ kim_ccache in_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t name = NULL;
- kim_string_t type = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string name = NULL;
+ kim_string type = NULL;
if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); }
if (!err && !in_ccache ) { err = param_error (2, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_compare (kim_ccache_t in_ccache,
- kim_ccache_t in_compare_to_ccache,
- kim_boolean_t *out_equal)
+kim_error kim_ccache_compare (kim_ccache in_ccache,
+ kim_ccache in_compare_to_ccache,
+ kim_boolean *out_equal)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !in_compare_to_ccache) { err = param_error (2, "in_compare_to_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_krb5_ccache (kim_ccache_t in_ccache,
+kim_error kim_ccache_get_krb5_ccache (kim_ccache in_ccache,
krb5_context in_krb5_context,
krb5_ccache *out_krb5_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t resolve_name = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string resolve_name = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !in_krb5_context) { err = param_error (2, "in_krb5_context", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_type (kim_ccache_t in_ccache,
- kim_string_t *out_type)
+kim_error kim_ccache_get_type (kim_ccache in_ccache,
+ kim_string *out_type)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_type ) { err = param_error (2, "out_type", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_name (kim_ccache_t in_ccache,
- kim_string_t *out_name)
+kim_error kim_ccache_get_name (kim_ccache in_ccache,
+ kim_string *out_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_name ) { err = param_error (2, "out_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_display_name (kim_ccache_t in_ccache,
- kim_string_t *out_display_name)
+kim_error kim_ccache_get_display_name (kim_ccache in_ccache,
+ kim_string *out_display_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_display_name) { err = param_error (2, "out_display_name", "NULL"); }
if (!err) {
- kim_string_t type = krb5_cc_get_type (in_ccache->context,
+ kim_string type = krb5_cc_get_type (in_ccache->context,
in_ccache->ccache);
- kim_string_t name = krb5_cc_get_name (in_ccache->context,
+ kim_string name = krb5_cc_get_name (in_ccache->context,
in_ccache->ccache);
err = kim_ccache_create_resolve_name (out_display_name, type, name);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_client_identity (kim_ccache_t in_ccache,
- kim_identity_t *out_client_identity)
+kim_error kim_ccache_get_client_identity (kim_ccache in_ccache,
+ kim_identity *out_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_principal principal = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache,
- kim_credential_t *out_credential)
+kim_error kim_ccache_get_valid_credential (kim_ccache in_ccache,
+ kim_credential *out_credential)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_iterator_t iterator = NULL;
- kim_boolean_t out_of_credentials = FALSE;
- kim_boolean_t found_valid_tgt = FALSE;
- kim_boolean_t found_invalid_tgt = FALSE;
- kim_credential_state_t invalid_tgt_state = kim_credentials_state_valid;
- kim_credential_t valid_credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential_iterator iterator = NULL;
+ kim_boolean out_of_credentials = FALSE;
+ kim_boolean found_valid_tgt = FALSE;
+ kim_boolean found_invalid_tgt = FALSE;
+ kim_credential_state invalid_tgt_state = kim_credentials_state_valid;
+ kim_credential valid_credential = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_credential) { err = param_error (2, "out_credential", "NULL"); }
}
while (!err && !found_valid_tgt && !out_of_credentials) {
- kim_credential_t credential = NULL;
+ kim_credential credential = NULL;
err = kim_credential_iterator_next (iterator, &credential);
out_of_credentials = TRUE;
} else if (!err) {
- kim_identity_t service_identity = NULL;
- kim_credential_state_t state = kim_credentials_state_valid;
- kim_boolean_t is_tgt = FALSE;
+ kim_identity service_identity = NULL;
+ kim_credential_state state = kim_credentials_state_valid;
+ kim_boolean is_tgt = FALSE;
err = kim_credential_get_service_identity (credential,
&service_identity);
}
if (!err && (!valid_credential || found_invalid_tgt)) {
- kim_identity_t identity = NULL;
- kim_string_t identity_string = NULL;
+ kim_identity identity = NULL;
+ kim_string identity_string = NULL;
err = kim_ccache_get_client_identity (in_ccache, &identity);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_start_time (kim_ccache_t in_ccache,
- kim_time_t *out_start_time)
+kim_error kim_ccache_get_start_time (kim_ccache in_ccache,
+ kim_time *out_start_time)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_start_time) { err = param_error (2, "out_start_time", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_expiration_time (kim_ccache_t in_ccache,
- kim_time_t *out_expiration_time)
+kim_error kim_ccache_get_expiration_time (kim_ccache in_ccache,
+ kim_time *out_expiration_time)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_expiration_time) { err = param_error (2, "out_expiration_time", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_get_renewal_expiration_time (kim_ccache_t in_ccache,
- kim_time_t *out_renewal_expiration_time)
+kim_error kim_ccache_get_renewal_expiration_time (kim_ccache in_ccache,
+ kim_time *out_renewal_expiration_time)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); }
if (!err && !out_renewal_expiration_time) { err = param_error (2, "out_renewal_expiration_time", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_set_default (kim_ccache_t io_ccache)
+kim_error kim_ccache_set_default (kim_ccache io_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_ccache) { err = param_error (1, "io_ccache", "NULL"); }
environment_ccache); }
} else {
- kim_string_t type = NULL;
- kim_string_t name = NULL;
+ kim_string type = NULL;
+ kim_string name = NULL;
cc_context_t cc_context = NULL;
cc_ccache_t cc_ccache = NULL;
err = kim_ccache_get_type (io_ccache, &type);
if (!err && strcmp (type, "API")) {
- kim_string_t display_name = NULL;
+ kim_string display_name = NULL;
/* Not a CCAPI ccache; can't set to default */
err = kim_ccache_get_display_name (io_ccache, &display_name);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_verify (kim_ccache_t in_ccache,
- kim_identity_t in_service_identity,
- kim_string_t in_keytab,
- kim_boolean_t in_fail_if_no_service_key)
+kim_error kim_ccache_verify (kim_ccache in_ccache,
+ kim_identity in_service_identity,
+ kim_string in_keytab,
+ kim_boolean in_fail_if_no_service_key)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_renew (kim_ccache_t in_ccache,
- kim_options_t in_options)
+kim_error kim_ccache_renew (kim_ccache in_ccache,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
- kim_identity_t client_identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
+ kim_identity client_identity = NULL;
if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_validate (kim_ccache_t in_ccache,
- kim_options_t in_options)
+kim_error kim_ccache_validate (kim_ccache in_ccache,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
- kim_identity_t client_identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
+ kim_identity client_identity = NULL;
if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_ccache_destroy (kim_ccache_t *io_ccache)
+kim_error kim_ccache_destroy (kim_ccache *io_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (io_ccache && *io_ccache) {
err = krb5_error (krb5_cc_destroy ((*io_ccache)->context,
/* ------------------------------------------------------------------------ */
-void kim_ccache_free (kim_ccache_t *io_ccache)
+void kim_ccache_free (kim_ccache *io_ccache)
{
if (io_ccache && *io_ccache) {
if ((*io_ccache)->context) {
#include <kim/kim.h>
-kim_error_t kim_ccache_create_from_display_name (kim_ccache_t *out_ccache,
- kim_string_t in_display_name);
+kim_error kim_ccache_create_from_display_name (kim_ccache *out_ccache,
+ kim_string in_display_name);
-kim_error_t kim_ccache_compare (kim_ccache_t in_ccache,
- kim_ccache_t in_compare_to_ccache,
- kim_boolean_t *out_equal);
+kim_error kim_ccache_compare (kim_ccache in_ccache,
+ kim_ccache in_compare_to_ccache,
+ kim_boolean *out_equal);
#endif /* KIM_CCACHE_PRIVATE_H */
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_iterator_create (kim_credential_iterator_t *out_credential_iterator,
- kim_ccache_t in_ccache)
+kim_error kim_credential_iterator_create (kim_credential_iterator *out_credential_iterator,
+ kim_ccache in_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_iterator_t credential_iterator = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential_iterator credential_iterator = NULL;
if (!err && !out_credential_iterator) { err = param_error (1, "out_credential_iterator", "NULL"); }
if (!err && !in_ccache ) { err = param_error (2, "in_ccache", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_iterator_next (kim_credential_iterator_t in_credential_iterator,
- kim_credential_t *out_credential)
+kim_error kim_credential_iterator_next (kim_credential_iterator in_credential_iterator,
+ kim_credential *out_credential)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential_iterator) { err = param_error (1, "in_credential_iterator", "NULL"); }
if (!err && !out_credential ) { err = param_error (2, "out_credential", "NULL"); }
err = krb5_error (terr);
}
}
-
+
return check_error (err);
}
/* ------------------------------------------------------------------------ */
-void kim_credential_iterator_free (kim_credential_iterator_t *io_credential_iterator)
+void kim_credential_iterator_free (kim_credential_iterator *io_credential_iterator)
{
if (io_credential_iterator && *io_credential_iterator) {
if ((*io_credential_iterator)->context) {
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_credential_allocate (kim_credential_t *out_credential)
+static inline kim_error kim_credential_allocate (kim_credential *out_credential)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_create_new (kim_credential_t *out_credential,
- kim_identity_t in_client_identity,
- kim_options_t in_options)
+kim_error kim_credential_create_new (kim_credential *out_credential,
+ kim_identity in_client_identity,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential,
- kim_identity_t in_identity,
- kim_options_t in_options,
- kim_string_t in_keytab)
+kim_error kim_credential_create_from_keytab (kim_credential *out_credential,
+ kim_identity in_identity,
+ kim_options in_options,
+ kim_string in_keytab)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
krb5_keytab keytab = NULL;
krb5_creds creds;
- kim_boolean_t free_creds = FALSE;
+ kim_boolean free_creds = FALSE;
krb5_principal principal = NULL;
- kim_time_t start_time = 0;
- kim_string_t service_name = NULL;
+ kim_time start_time = 0;
+ kim_string service_name = NULL;
krb5_get_init_creds_opt *init_cred_options = NULL;
if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); }
}
if (!err) {
- kim_options_t options = in_options;
-
+ kim_options options = in_options;
+
if (!options) {
err = kim_options_create (&options);
}
} else {
krb5_kt_cursor cursor = NULL;
krb5_keytab_entry entry;
- kim_boolean_t entry_allocated = FALSE;
+ kim_boolean entry_allocated = FALSE;
err = krb5_error (krb5_kt_start_seq_get (credential->context, keytab, &cursor));
if (cursor ) { krb5_kt_end_seq_get (credential->context, keytab, &cursor); }
}
}
-
+
if (!err) {
err = krb5_error (krb5_get_init_creds_keytab (credential->context, &creds, principal, keytab,
start_time, (char *) service_name, init_cred_options));
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_create_from_krb5_creds (kim_credential_t *out_credential,
- krb5_context in_krb5_context,
- krb5_creds *in_krb5_creds)
+kim_error kim_credential_create_from_krb5_creds (kim_credential *out_credential,
+ krb5_context in_krb5_context,
+ krb5_creds *in_krb5_creds)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !out_credential ) { err = param_error (1, "out_credential", "NULL"); }
if (!err && !in_krb5_creds ) { err = param_error (2, "in_krb5_creds", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_copy (kim_credential_t *out_credential,
- kim_credential_t in_credential)
+kim_error kim_credential_copy (kim_credential *out_credential,
+ kim_credential in_credential)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_credential_t credential = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_credential credential = NULL;
if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); }
if (!err && !in_credential ) { err = param_error (2, "in_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_krb5_creds (kim_credential_t in_credential,
- krb5_context in_krb5_context,
- krb5_creds **out_krb5_creds)
+kim_error kim_credential_get_krb5_creds (kim_credential in_credential,
+ krb5_context in_krb5_context,
+ krb5_creds **out_krb5_creds)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); }
if (!err && !in_krb5_context) { err = param_error (2, "in_krb5_context", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_client_identity (kim_credential_t in_credential,
- kim_identity_t *out_client_identity)
+kim_error kim_credential_get_client_identity (kim_credential in_credential,
+ kim_identity *out_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); }
if (!err && !out_client_identity) { err = param_error (2, "out_client_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_service_identity (kim_credential_t in_credential,
- kim_identity_t *out_service_identity)
+kim_error kim_credential_get_service_identity (kim_credential in_credential,
+ kim_identity *out_service_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); }
if (!err && !out_service_identity) { err = param_error (2, "out_service_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_is_tgt (kim_credential_t in_credential,
- kim_boolean_t *out_is_tgt)
+kim_error kim_credential_is_tgt (kim_credential in_credential,
+ kim_boolean *out_is_tgt)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t service = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity service = NULL;
if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); }
if (!err && !out_is_tgt ) { err = param_error (2, "out_is_tgt", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_state (kim_credential_t in_credential,
- kim_credential_state_t *out_state)
+kim_error kim_credential_get_state (kim_credential in_credential,
+ kim_credential_state *out_state)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_time_t expiration_time = 0;
- kim_time_t start_time = 0;
+ kim_error err = KIM_NO_ERROR;
+ kim_time expiration_time = 0;
+ kim_time start_time = 0;
krb5_timestamp now = 0;
if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); }
if (expiration_time <= now) {
*out_state = kim_credentials_state_expired;
-
+
} else if ((in_credential->creds->ticket_flags & TKT_FLG_POSTDATED) &&
(in_credential->creds->ticket_flags & TKT_FLG_INVALID)) {
if (start_time > now) {
if (!code) { laddresses = NULL; }
if (laddresses) { /* assume valid if the local host has no addresses */
- kim_boolean_t found_match = FALSE;
- kim_count_t i = 0;
+ kim_boolean found_match = FALSE;
+ kim_count i = 0;
for (i = 0; in_credential->creds->addresses[0]; i++) {
if (krb5_address_search (in_credential->context,
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_start_time (kim_credential_t in_credential,
- kim_time_t *out_start_time)
+kim_error kim_credential_get_start_time (kim_credential in_credential,
+ kim_time *out_start_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_expiration_time (kim_credential_t in_credential,
- kim_time_t *out_expiration_time)
+kim_error kim_credential_get_expiration_time (kim_credential in_credential,
+ kim_time *out_expiration_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_get_renewal_expiration_time (kim_credential_t in_credential,
- kim_time_t *out_renewal_expiration_time)
+kim_error kim_credential_get_renewal_expiration_time (kim_credential in_credential,
+ kim_time *out_renewal_expiration_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_store (kim_credential_t in_credential,
- kim_identity_t in_client_identity,
- kim_ccache_t *out_ccache)
+kim_error kim_credential_store (kim_credential in_credential,
+ kim_identity in_client_identity,
+ kim_ccache *out_ccache)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_context context = NULL;
krb5_ccache k5ccache = NULL;
- kim_string_t type = NULL;
+ kim_string type = NULL;
krb5_principal client_principal = NULL;
- kim_boolean_t destroy_ccache_on_error = FALSE;
+ kim_boolean destroy_ccache_on_error = FALSE;
if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); }
if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); }
if (!err) {
char *environment_ccache = getenv ("KRB5CCNAME");
-
+
if (environment_ccache) {
err = krb5_error (krb5_cc_resolve (context, environment_ccache, &k5ccache));
} else {
- kim_ccache_t ccache = NULL;
+ kim_ccache ccache = NULL;
err = kim_ccache_create_from_client_identity (&ccache, in_client_identity);
err = krb5_error (krb5_cc_store_cred (in_credential->context,
k5ccache, in_credential->creds));
}
-
+
#warning Call plugins here
-
+
if (!err && out_ccache) {
err = kim_ccache_create_from_krb5_ccache (out_ccache, context, k5ccache);
}
if (client_principal) { krb5_free_principal (context, client_principal); }
if (context ) { krb5_free_context (context); }
kim_string_free (&type);
-
+
return check_error (err);
}
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_verify (kim_credential_t in_credential,
- kim_identity_t in_service_identity,
- kim_string_t in_keytab,
- kim_boolean_t in_fail_if_no_service_key)
+kim_error kim_credential_verify (kim_credential in_credential,
+ kim_identity in_service_identity,
+ kim_string in_keytab,
+ kim_boolean in_fail_if_no_service_key)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_context scontext = NULL;
krb5_principal service_principal = NULL;
krb5_keytab keytab = NULL;
if (!err) {
krb5_verify_init_creds_opt options;
-
+
/* That's "no key == fail" not "no fail" >.< */
krb5_verify_init_creds_opt_init (&options);
krb5_verify_init_creds_opt_set_ap_req_nofail (&options, in_fail_if_no_service_key);
-
+
err = krb5_error (krb5_verify_init_creds (scontext, in_credential->creds,
service_principal,
keytab,
if (err && !service_principal && in_fail_if_no_service_key) {
/* If the service principal wasn't specified but we are supposed to fail without a key
- we should walk the keytab trying to find one that succeeds. */
+ we should walk the keytab trying to find one that succeeds. */
krb5_error_code code = 0;
- kim_boolean_t verified = 0;
+ kim_boolean verified = 0;
krb5_kt_cursor cursor = NULL;
krb5_keytab_entry entry;
-
+
if (!keytab) {
- code = krb5_kt_default (scontext, &keytab);
+ code = krb5_kt_default (scontext, &keytab);
}
if (!err) {
}
while (!code && !verified) {
- kim_boolean_t free_entry = 0;
-
+ kim_boolean free_entry = 0;
+
code = krb5_kt_next_entry (scontext, keytab, &entry, &cursor);
free_entry = !code; /* remember to free */
if (!code) {
verified = 1;
}
-
+
if (free_entry) { krb5_free_keytab_entry_contents (scontext, &entry); }
}
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_renew (kim_credential_t *io_credential,
- kim_options_t in_options)
+kim_error kim_credential_renew (kim_credential *io_credential,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t service_name = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string service_name = NULL;
krb5_ccache ccache = NULL;
if (!err && !io_credential) { err = param_error (1, "io_credential", "NULL"); }
if (!err) {
- kim_options_t options = in_options;
+ kim_options options = in_options;
if (!options) {
err = kim_options_create (&options);
}
-
+
if (!err) {
err = kim_options_get_service_name (options, &service_name);
}
err = krb5_error (krb5_cc_initialize ((*io_credential)->context, ccache,
(*io_credential)->creds->client));
}
-
+
if (!err) {
err = krb5_error (krb5_cc_store_cred ((*io_credential)->context, ccache,
(*io_credential)->creds));
if (!err) {
krb5_creds creds;
krb5_creds *renewed_creds = NULL;
- kim_boolean_t free_creds = 0;
+ kim_boolean free_creds = 0;
err = krb5_error (krb5_get_renewed_creds ((*io_credential)->context,
&creds, (*io_credential)->creds->client,
if (free_creds) { krb5_free_cred_contents ((*io_credential)->context, &creds); }
}
-
+
if (ccache) { krb5_cc_destroy ((*io_credential)->context, ccache); }
kim_string_free (&service_name);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_credential_validate (kim_credential_t *io_credential,
- kim_options_t in_options)
+kim_error kim_credential_validate (kim_credential *io_credential,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t service_name = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string service_name = NULL;
krb5_ccache ccache = NULL;
if (!err && !io_credential) { err = param_error (1, "io_credential", "NULL"); }
if (!err) {
- kim_options_t options = in_options;
+ kim_options options = in_options;
if (!options) {
err = kim_options_create (&options);
if (!err) {
krb5_creds creds;
krb5_creds *validated_creds = NULL;
- kim_boolean_t free_creds = 0;
+ kim_boolean free_creds = 0;
err = krb5_error (krb5_get_validated_creds ((*io_credential)->context,
&creds, (*io_credential)->creds->client,
if (ccache) { krb5_cc_destroy ((*io_credential)->context, ccache); }
kim_string_free (&service_name);
-
+
return check_error (err);
}
/* ------------------------------------------------------------------------ */
-void kim_credential_free (kim_credential_t *io_credential)
+void kim_credential_free (kim_credential *io_credential)
{
if (io_credential && *io_credential) {
if ((*io_credential)->context) {
#include <CredentialsCache.h>
struct kim_error_opaque {
- kim_error_code_t code;
- kim_string_t message;
+ kim_error_code code;
+ kim_string message;
};
struct kim_error_opaque kim_no_memory_error_struct = { KIM_OUT_OF_MEMORY_ECODE, NULL, };
-kim_error_t kim_no_memory_error = &kim_no_memory_error_struct;
+kim_error kim_no_memory_error = &kim_no_memory_error_struct;
struct kim_error_opaque kim_error_initializer = { KIM_NO_ERROR_ECODE, NULL };
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_error_allocate (kim_error_t *out_error)
+static inline kim_error kim_error_allocate (kim_error *out_error)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_t error = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_error error = NULL;
if (!err) {
error = malloc (sizeof (*error));
/* ------------------------------------------------------------------------ */
-kim_error_t _kim_error_create_for_param (kim_string_t in_function,
+kim_error _kim_error_create_for_param (kim_string in_function,
unsigned int in_argument_position,
- kim_string_t in_argument_name,
- kim_string_t in_invalid_value)
+ kim_string in_argument_name,
+ kim_string in_invalid_value)
{
return kim_error_create_from_code (KIM_PARAMETER_ECODE,
in_function,
/* ------------------------------------------------------------------------ */
-kim_error_t kim_error_create_from_code (kim_error_code_t in_code,
+kim_error kim_error_create_from_code (kim_error_code in_code,
...)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
va_list args;
va_start (args, in_code);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code,
+kim_error kim_error_create_from_code_va (kim_error_code in_code,
va_list in_args)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_t error = KIM_NO_ERROR;
- kim_string_t message = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_error error = KIM_NO_ERROR;
+ kim_string message = NULL;
/* short circuit out of memory errors so we don't loop */
switch (in_code) {
/* ------------------------------------------------------------------------ */
-kim_error_t kim_error_copy (kim_error_t *out_error,
- kim_error_t in_error)
+kim_error kim_error_copy (kim_error *out_error,
+ kim_error in_error)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_t error = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
+ kim_error error = KIM_NO_ERROR;
if (!err && !out_error) { err = param_error (1, "out_error", "NULL"); }
if (!err && !in_error ) { err = param_error (2, "in_error", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_code_t kim_error_get_code (kim_error_t in_error)
+kim_error_code kim_error_get_code (kim_error in_error)
{
if (!in_error) { /* KIM_NO_ERROR */
return KIM_NO_ERROR_ECODE;
/* ------------------------------------------------------------------------ */
-kim_string_t kim_error_get_display_string (kim_error_t in_error)
+kim_string kim_error_get_display_string (kim_error in_error)
{
if (!in_error) { /* KIM_NO_ERROR */
return error_message (KIM_NO_ERROR_ECODE);
/* ------------------------------------------------------------------------ */
-void kim_error_free (kim_error_t *io_error)
+void kim_error_free (kim_error *io_error)
{
if (io_error && *io_error) {
if (*io_error != kim_no_memory_error) {
/* ------------------------------------------------------------------------ */
-kim_error_t _check_error (kim_error_t in_err,
- kim_string_t in_function,
- kim_string_t in_file,
+kim_error _check_error (kim_error in_err,
+ kim_string in_function,
+ kim_string in_file,
int in_line)
{
if (in_err) {
- kim_error_code_t code = kim_error_get_code (in_err);
- kim_string_t message = kim_error_get_display_string (in_err);
+ kim_error_code code = kim_error_get_code (in_err);
+ kim_string message = kim_error_get_display_string (in_err);
kim_debug_printf ("%s(): got %d ('%s') at %s: %d",
in_function, code, message, in_file, in_line);
#include <kim/kim.h>
-kim_error_t _kim_error_create_for_param (kim_string_t in_function,
+kim_error _kim_error_create_for_param (kim_string in_function,
unsigned int in_argument_position,
- kim_string_t in_argument_name,
- kim_string_t in_invalid_value);
+ kim_string in_argument_name,
+ kim_string in_invalid_value);
#define param_error(pos, name, value) _kim_error_create_for_param(__FUNCTION__, \
pos, name, value)
-kim_error_t kim_error_create_from_code (kim_error_code_t in_code,
+kim_error kim_error_create_from_code (kim_error_code in_code,
...);
-kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code,
+kim_error kim_error_create_from_code_va (kim_error_code in_code,
va_list args);
#define ccapi_error(code) kim_error_create_from_code(code)
#define gss_error(code) kim_error_create_from_code(code)
#define os_error(code) kim_error_create_from_code(code)
-kim_error_t _check_error (kim_error_t in_err,
- kim_string_t in_function,
- kim_string_t in_file,
+kim_error _check_error (kim_error in_err,
+ kim_string in_function,
+ kim_string in_file,
int in_line);
#define check_error(err) _check_error(err, __FUNCTION__, __FILE__, __LINE__)
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_identity_allocate (kim_identity_t *out_identity)
+static inline kim_error kim_identity_allocate (kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_create_from_string (kim_identity_t *out_identity,
- kim_string_t in_string)
+kim_error kim_identity_create_from_string (kim_identity *out_identity,
+ kim_string in_string)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); }
if (!err && !in_string ) { err = param_error (2, "in_string", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity,
- kim_string_t in_realm,
- kim_string_t in_1st_component,
+kim_error kim_identity_create_from_components (kim_identity *out_identity,
+ kim_string in_realm,
+ kim_string in_1st_component,
...)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
krb5_principal_data principal_data; /* allocated by KIM so can't be returned */
if (!err && !out_identity ) { err = param_error (1, "out_identity", "NULL"); }
if (!err) {
va_list args;
- kim_count_t component_count = 1;
+ kim_count component_count = 1;
va_start (args, in_1st_component);
- while (va_arg (args, kim_string_t)) { component_count++; }
+ while (va_arg (args, kim_string)) { component_count++; }
va_end (args);
principal_data.length = component_count;
va_start (args, in_1st_component);
for (i = 0; !err && (i < principal_data.length); i++) {
- kim_string_t component = NULL;
+ kim_string component = NULL;
if (i == 0) {
err = kim_string_copy (&component, in_1st_component);
} else {
- err = kim_string_copy (&component, va_arg (args, kim_string_t));
+ err = kim_string_copy (&component, va_arg (args, kim_string));
}
if (!err) {
krb5_int32 i;
for (i = 0; i < principal_data.length; i++) {
- kim_string_t component = principal_data.data[i].data;
+ kim_string component = principal_data.data[i].data;
kim_string_free (&component);
}
free (principal_data.data);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_create_from_krb5_principal (kim_identity_t *out_identity,
+kim_error kim_identity_create_from_krb5_principal (kim_identity *out_identity,
krb5_context in_krb5_context,
krb5_principal in_krb5_principal)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
if (!err && !out_identity ) { err = param_error (1, "out_identity", "NULL"); }
if (!err && !in_krb5_principal) { err = param_error (2, "in_krb5_principal", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_copy (kim_identity_t *out_identity,
- kim_identity_t in_identity)
+kim_error kim_identity_copy (kim_identity *out_identity,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = KIM_IDENTITY_ANY;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = KIM_IDENTITY_ANY;
if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_compare (kim_identity_t in_identity,
- kim_identity_t in_compare_to_identity,
- kim_comparison_t *out_comparison)
+kim_error kim_identity_compare (kim_identity in_identity,
+ kim_identity in_compare_to_identity,
+ kim_comparison *out_comparison)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !in_compare_to_identity) { err = param_error (2, "in_compare_to_identity", "NULL"); }
in_compare_to_identity->principal)) {
*out_comparison = 0;
} else {
- kim_string_t string = NULL;
- kim_string_t compare_to_string = NULL;
+ kim_string string = NULL;
+ kim_string compare_to_string = NULL;
err = kim_identity_get_string (in_identity, &string);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_string (kim_identity_t in_identity,
- kim_string_t *out_string)
+kim_error kim_identity_get_string (kim_identity in_identity,
+ kim_string *out_string)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
char *unparsed_name = NULL;
if (!err && !in_identity) { err = param_error (1, "in_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_display_string (kim_identity_t in_identity,
- kim_string_t *out_display_string)
+kim_error kim_identity_get_display_string (kim_identity in_identity,
+ kim_string *out_display_string)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !out_display_string) { err = param_error (2, "out_display_string", "NULL"); }
}
if (!err) {
- kim_count_t i, j;
- kim_count_t length = strlen (string) + 1; /* Copy the '\0' */
+ kim_count i, j;
+ kim_count length = strlen (string) + 1; /* Copy the '\0' */
char *display_string = (char *) string; /* so we can modify it */
/* In place copy, skipping escaped separators.
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_realm (kim_identity_t in_identity,
- kim_string_t *out_realm_string)
+kim_error kim_identity_get_realm (kim_identity in_identity,
+ kim_string *out_realm_string)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !out_realm_string) { err = param_error (2, "out_realm_string", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_number_of_components (kim_identity_t in_identity,
- kim_count_t *out_number_of_components)
+kim_error kim_identity_get_number_of_components (kim_identity in_identity,
+ kim_count *out_number_of_components)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !out_number_of_components) { err = param_error (2, "out_number_of_components", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_component_at_index (kim_identity_t in_identity,
- kim_count_t in_index,
- kim_string_t *out_component_string)
+kim_error kim_identity_get_component_at_index (kim_identity in_identity,
+ kim_count in_index,
+ kim_string *out_component_string)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_data *component = NULL;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_krb5_principal (kim_identity_t in_identity,
+kim_error kim_identity_get_krb5_principal (kim_identity in_identity,
krb5_context in_krb5_context,
krb5_principal *out_krb5_principal)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !in_krb5_context ) { err = param_error (2, "in_krb5_context", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_get_gss_name (kim_identity_t in_identity,
+kim_error kim_identity_get_gss_name (kim_identity in_identity,
gss_name_t *out_gss_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !out_gss_name) { err = param_error (2, "out_gss_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_is_tgt_service (kim_identity_t in_identity,
- kim_boolean_t *out_is_tgt_service)
+kim_error kim_identity_is_tgt_service (kim_identity in_identity,
+ kim_boolean *out_is_tgt_service)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !out_is_tgt_service) { err = param_error (2, "out_is_tgt_service", "NULL"); }
if (!err) {
- kim_count_t count = krb5_princ_size (in_identity->context, in_identity->principal);
+ kim_count count = krb5_princ_size (in_identity->context, in_identity->principal);
krb5_data *name = krb5_princ_name (in_identity->context, in_identity->principal);
/* krbtgt/<REALM1>@<REALM2> (usually REALM1 == REALM2, but not always) */
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_change_password (kim_identity_t in_identity,
- kim_options_t in_options)
+kim_error kim_identity_change_password (kim_identity in_identity,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity) { err = param_error (1, "in_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_identity_change_password_to_password (kim_identity_t in_identity,
- kim_options_t in_options,
- kim_string_t in_new_password)
+kim_error kim_identity_change_password_to_password (kim_identity in_identity,
+ kim_options in_options,
+ kim_string in_new_password)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); }
if (!err && !in_new_password) { err = param_error (3, "in_new_password", "NULL"); }
/* ------------------------------------------------------------------------ */
-void kim_identity_free (kim_identity_t *io_identity)
+void kim_identity_free (kim_identity *io_identity)
{
if (io_identity && *io_identity) {
- kim_identity_t identity = *io_identity;
+ kim_identity identity = *io_identity;
if (identity->context) {
if (identity->principal) {
#include <kim/kim.h>
#include "kim_library_private.h"
-kim_error_t kim_os_identity_create_for_username (kim_identity_t *out_identity);
+kim_error kim_os_identity_create_for_username (kim_identity *out_identity);
-kim_error_t kim_identity_is_tgt_service (kim_identity_t in_identity,
- kim_boolean_t *out_is_tgt_service);
+kim_error kim_identity_is_tgt_service (kim_identity in_identity,
+ kim_boolean *out_is_tgt_service);
#endif /* KIM_IDENTITY_PRIVATE_H */
/* ------------------------------------------------------------------------ */
-void __kim_library_debug_printf (kim_string_t in_function,
- kim_string_t in_format,
+void __kim_library_debug_printf (kim_string in_function,
+ kim_string in_format,
...)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t format = NULL;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string format = NULL;
+ kim_string string = NULL;
if (!err && !in_function) { err = param_error (1, "in_function", "NULL"); }
if (!err && !in_format ) { err = param_error (2, "in_format", "NULL"); }
#pragma mark -- Allow Home Directory Access --
static pthread_mutex_t g_allow_home_directory_access_mutex = PTHREAD_MUTEX_INITIALIZER;
-kim_boolean_t g_allow_home_directory_access = TRUE;
+kim_boolean g_allow_home_directory_access = TRUE;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_library_set_allow_home_directory_access (kim_boolean_t in_allow_access)
+kim_error kim_library_set_allow_home_directory_access (kim_boolean in_allow_access)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
int mutex_err = pthread_mutex_lock (&g_allow_home_directory_access_mutex);
if (mutex_err) { err = os_error (mutex_err); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_library_get_allow_home_directory_access (kim_boolean_t *out_allow_access)
+kim_error kim_library_get_allow_home_directory_access (kim_boolean *out_allow_access)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
int mutex_err = 0;
if (!err && !out_allow_access) { err = param_error (3, "out_allow_access", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_boolean_t kim_library_allow_home_directory_access (void)
+kim_boolean kim_library_allow_home_directory_access (void)
{
- kim_boolean_t allow_access = FALSE;
- kim_error_t err = kim_library_get_allow_home_directory_access (&allow_access);
+ kim_boolean allow_access = FALSE;
+ kim_error err = kim_library_get_allow_home_directory_access (&allow_access);
kim_error_free (&err);
#pragma mark -- Allow Automatic Prompting --
static pthread_mutex_t g_allow_automatic_prompting_mutex = PTHREAD_MUTEX_INITIALIZER;
-kim_boolean_t g_allow_automatic_prompting = TRUE;
+kim_boolean g_allow_automatic_prompting = TRUE;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_library_set_allow_automatic_prompting (kim_boolean_t in_allow_automatic_prompting)
+kim_error kim_library_set_allow_automatic_prompting (kim_boolean in_allow_automatic_prompting)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
int mutex_err = pthread_mutex_lock (&g_allow_automatic_prompting_mutex);
if (mutex_err) { err = os_error (mutex_err); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_library_get_allow_automatic_prompting (kim_boolean_t *out_allow_automatic_prompting)
+kim_error kim_library_get_allow_automatic_prompting (kim_boolean *out_allow_automatic_prompting)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
int mutex_err = 0;
if (!err && !out_allow_automatic_prompting) { err = param_error (3, "out_allow_automatic_prompting", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_boolean_t kim_library_allow_automatic_prompting (void)
+kim_boolean kim_library_allow_automatic_prompting (void)
{
- kim_boolean_t allow_automatic_prompting = TRUE;
- kim_error_t err = kim_library_get_allow_automatic_prompting (&allow_automatic_prompting);
+ kim_boolean allow_automatic_prompting = TRUE;
+ kim_error err = kim_library_get_allow_automatic_prompting (&allow_automatic_prompting);
if (allow_automatic_prompting && getenv ("KERBEROSLOGIN_NEVER_PROMPT")) {
kim_debug_printf ("KERBEROSLOGIN_NEVER_PROMPT is set.");
/* Make sure there is at least 1 config file. We don't support DNS
* domain-realm lookup, so if there is no config, Kerberos won't work. */
- kim_boolean_t kerberos_config_exists = FALSE;
+ kim_boolean kerberos_config_exists = FALSE;
char **files = NULL;
profile_t profile = NULL;
#define kim_debug_printf(format, ...) __kim_library_debug_printf(__FUNCTION__, format, ## __VA_ARGS__)
-void __kim_library_debug_printf (kim_string_t in_function,
- kim_string_t in_format,
+void __kim_library_debug_printf (kim_string in_function,
+ kim_string in_format,
...);
-kim_error_t kim_library_set_allow_home_directory_access (kim_boolean_t in_allow_access);
+kim_error kim_library_set_allow_home_directory_access (kim_boolean in_allow_access);
-kim_error_t kim_library_get_allow_home_directory_access (kim_boolean_t *out_allow_access);
+kim_error kim_library_get_allow_home_directory_access (kim_boolean *out_allow_access);
-kim_boolean_t kim_library_allow_home_directory_access (void);
+kim_boolean kim_library_allow_home_directory_access (void);
-kim_error_t kim_library_set_allow_automatic_prompting (kim_boolean_t in_allow_automatic_prompting);
+kim_error kim_library_set_allow_automatic_prompting (kim_boolean in_allow_automatic_prompting);
-kim_error_t kim_library_get_allow_automatic_prompting (kim_boolean_t *out_allow_automatic_prompting);
+kim_error kim_library_get_allow_automatic_prompting (kim_boolean *out_allow_automatic_prompting);
-kim_boolean_t kim_library_allow_automatic_prompting (void);
+kim_boolean kim_library_allow_automatic_prompting (void);
-void kim_os_library_debug_print (kim_string_t in_string);
+void kim_os_library_debug_print (kim_string in_string);
-kim_boolean_t kim_os_library_caller_is_server (void);
+kim_boolean kim_os_library_caller_is_server (void);
#endif /* KIM_LIBRARY_PRIVATE_H */
kim_prompt_callback_t prompt_callback;
const void *prompt_callback_data;
#warning add prompt responses here
- kim_time_t start_time;
- kim_lifetime_t lifetime;
- kim_boolean_t renewable;
- kim_lifetime_t renewal_lifetime;
- kim_boolean_t forwardable;
- kim_boolean_t proxiable;
- kim_boolean_t addressless;
- kim_string_t service_name;
+ kim_time start_time;
+ kim_lifetime lifetime;
+ kim_boolean renewable;
+ kim_lifetime renewal_lifetime;
+ kim_boolean forwardable;
+ kim_boolean proxiable;
+ kim_boolean addressless;
+ kim_string service_name;
};
struct kim_options_opaque kim_options_initializer = {
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_options_allocate (kim_options_t *out_options)
+static inline kim_error kim_options_allocate (kim_options *out_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_options_t options = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_options options = NULL;
if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_create_from_defaults (kim_options_t *out_options)
+kim_error kim_options_create_from_defaults (kim_options *out_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_options_t options = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_options options = NULL;
if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_create (kim_options_t *out_options)
+kim_error kim_options_create (kim_options *out_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_preferences_t preferences = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_preferences preferences = NULL;
if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_copy (kim_options_t *out_options,
- kim_options_t in_options)
+kim_error kim_options_copy (kim_options *out_options,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_options_t options = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_options options = NULL;
if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); }
if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_prompt_callback (kim_options_t io_options,
+kim_error kim_options_set_prompt_callback (kim_options io_options,
kim_prompt_callback_t in_prompt_callback)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_prompt_callback (kim_options_t in_options,
+kim_error kim_options_get_prompt_callback (kim_options in_options,
kim_prompt_callback_t *out_prompt_callback)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_prompt_callback) { err = param_error (2, "out_prompt_callback", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_data (kim_options_t io_options,
+kim_error kim_options_set_data (kim_options io_options,
const void *in_data)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_data (kim_options_t in_options,
+kim_error kim_options_get_data (kim_options in_options,
const void **out_data)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_data ) { err = param_error (2, "out_data", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_prompt_response (kim_options_t io_options,
+kim_error kim_options_set_prompt_response (kim_options io_options,
kim_prompt_type_t in_prompt_type,
void *in_response)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options ) { err = param_error (1, "io_options", "NULL"); }
if (!err && !in_response) { err = param_error (2, "in_response", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_prompt_response (kim_options_t in_options,
+kim_error kim_options_get_prompt_response (kim_options in_options,
kim_prompt_type_t in_prompt_type,
void **out_response)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_response) { err = param_error (2, "out_response", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_start_time (kim_options_t io_options,
- kim_time_t in_start_time)
+kim_error kim_options_set_start_time (kim_options io_options,
+ kim_time in_start_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_start_time (kim_options_t in_options,
- kim_time_t *out_start_time)
+kim_error kim_options_get_start_time (kim_options in_options,
+ kim_time *out_start_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_start_time) { err = param_error (2, "out_start_time", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_lifetime (kim_options_t io_options,
- kim_lifetime_t in_lifetime)
+kim_error kim_options_set_lifetime (kim_options io_options,
+ kim_lifetime in_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_lifetime (kim_options_t in_options,
- kim_lifetime_t *out_lifetime)
+kim_error kim_options_get_lifetime (kim_options in_options,
+ kim_lifetime *out_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_lifetime) { err = param_error (2, "out_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_renewable (kim_options_t io_options,
- kim_boolean_t in_renewable)
+kim_error kim_options_set_renewable (kim_options io_options,
+ kim_boolean in_renewable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_renewable (kim_options_t in_options,
- kim_boolean_t *out_renewable)
+kim_error kim_options_get_renewable (kim_options in_options,
+ kim_boolean *out_renewable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_renewable) { err = param_error (2, "out_renewable", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_renewal_lifetime (kim_options_t io_options,
- kim_lifetime_t in_renewal_lifetime)
+kim_error kim_options_set_renewal_lifetime (kim_options io_options,
+ kim_lifetime in_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_renewal_lifetime (kim_options_t in_options,
- kim_lifetime_t *out_renewal_lifetime)
+kim_error kim_options_get_renewal_lifetime (kim_options in_options,
+ kim_lifetime *out_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_renewal_lifetime) { err = param_error (2, "out_renewal_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_forwardable (kim_options_t io_options,
- kim_boolean_t in_forwardable)
+kim_error kim_options_set_forwardable (kim_options io_options,
+ kim_boolean in_forwardable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_forwardable (kim_options_t in_options,
- kim_boolean_t *out_forwardable)
+kim_error kim_options_get_forwardable (kim_options in_options,
+ kim_boolean *out_forwardable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_forwardable) { err = param_error (2, "out_forwardable", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_proxiable (kim_options_t io_options,
- kim_boolean_t in_proxiable)
+kim_error kim_options_set_proxiable (kim_options io_options,
+ kim_boolean in_proxiable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_proxiable (kim_options_t in_options,
- kim_boolean_t *out_proxiable)
+kim_error kim_options_get_proxiable (kim_options in_options,
+ kim_boolean *out_proxiable)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_proxiable) { err = param_error (2, "out_proxiable", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_addressless (kim_options_t io_options,
- kim_boolean_t in_addressless)
+kim_error kim_options_set_addressless (kim_options io_options,
+ kim_boolean in_addressless)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_addressless (kim_options_t in_options,
- kim_boolean_t *out_addressless)
+kim_error kim_options_get_addressless (kim_options in_options,
+ kim_boolean *out_addressless)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_addressless) { err = param_error (2, "out_addressless", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_set_service_name (kim_options_t io_options,
- kim_string_t in_service_name)
+kim_error kim_options_set_service_name (kim_options io_options,
+ kim_string in_service_name)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t service_name = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string service_name = NULL;
if (!err && !io_options ) { err = param_error (1, "io_options", "NULL"); }
if (!err && !in_service_name) { err = param_error (2, "in_service_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_service_name (kim_options_t in_options,
- kim_string_t *out_service_name)
+kim_error kim_options_get_service_name (kim_options in_options,
+ kim_string *out_service_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); }
if (!err && !out_service_name) { err = param_error (2, "out_service_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_get_init_cred_options (kim_options_t in_options,
+kim_error kim_options_get_init_cred_options (kim_options in_options,
krb5_context in_context,
krb5_get_init_creds_opt **out_init_cred_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
krb5_get_init_creds_opt *init_cred_options;
krb5_address **addresses = NULL;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_options_free_init_cred_options (krb5_context in_context,
+kim_error kim_options_free_init_cred_options (krb5_context in_context,
krb5_get_init_creds_opt **io_init_cred_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_context) { err = param_error (1, "in_context", "NULL"); }
/* ------------------------------------------------------------------------ */
-void kim_options_free (kim_options_t *io_options)
+void kim_options_free (kim_options *io_options)
{
if (io_options && *io_options) {
kim_string_free (&(*io_options)->service_name);
/* ------------------------------------------------------------------------ */
-kim_error_code_t kim_prompt_callback_default (kim_options_t *io_options,
+kim_error_code kim_prompt_callback_default (kim_options *io_options,
kim_prompt_type_t in_type,
- kim_string_t in_title,
- kim_string_t in_message,
- kim_string_t in_description,
+ kim_string in_title,
+ kim_string in_message,
+ kim_string in_description,
void **out_reply)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_code_t code = KIM_NO_ERROR_ECODE;
+ kim_error err = KIM_NO_ERROR;
+ kim_error_code code = KIM_NO_ERROR_ECODE;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_code_t kim_prompt_callback_gui (kim_options_t *io_options,
+kim_error_code kim_prompt_callback_gui (kim_options *io_options,
kim_prompt_type_t in_type,
- kim_string_t in_title,
- kim_string_t in_message,
- kim_string_t in_description,
+ kim_string in_title,
+ kim_string in_message,
+ kim_string in_description,
void **out_reply)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_code_t code = KIM_NO_ERROR_ECODE;
+ kim_error err = KIM_NO_ERROR;
+ kim_error_code code = KIM_NO_ERROR_ECODE;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_code_t kim_prompt_callback_cli (kim_options_t *io_options,
+kim_error_code kim_prompt_callback_cli (kim_options *io_options,
kim_prompt_type_t in_type,
- kim_string_t in_title,
- kim_string_t in_message,
- kim_string_t in_description,
+ kim_string in_title,
+ kim_string in_message,
+ kim_string in_description,
void **out_reply)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_error_code_t code = KIM_NO_ERROR_ECODE;
+ kim_error err = KIM_NO_ERROR;
+ kim_error_code code = KIM_NO_ERROR_ECODE;
if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); }
if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_code_t kim_prompt_callback_none (kim_options_t *io_options,
+kim_error_code kim_prompt_callback_none (kim_options *io_options,
kim_prompt_type_t in_type,
- kim_string_t in_title,
- kim_string_t in_message,
- kim_string_t in_description,
+ kim_string in_title,
+ kim_string in_message,
+ kim_string in_description,
void **out_reply)
{
return KIM_USER_CANCELED_ECODE;
#include <kim/kim.h>
-kim_error_t kim_options_create_from_defaults (kim_options_t *out_options);
+kim_error kim_options_create_from_defaults (kim_options *out_options);
-kim_error_t kim_options_get_init_cred_options (kim_options_t in_options,
+kim_error kim_options_get_init_cred_options (kim_options in_options,
krb5_context in_context,
krb5_get_init_creds_opt **out_init_cred_options);
-kim_error_t kim_options_free_init_cred_options (krb5_context in_context,
+kim_error kim_options_free_init_cred_options (krb5_context in_context,
krb5_get_init_creds_opt **io_init_cred_options);
#endif /* KIM_OPTIONS_PRIVATE_H */
#pragma mark -- KIM Favorite Realms --
struct kim_favorite_identities_opaque {
- kim_count_t count;
- kim_identity_t *identities;
+ kim_count count;
+ kim_identity *identities;
};
struct kim_favorite_identities_opaque kim_favorite_identities_initializer = { 0, NULL };
struct kim_favorite_identities_opaque kim_empty_favorite_identities_struct = { 0, NULL };
-const kim_favorite_identities_t kim_empty_favorite_identities = &kim_empty_favorite_identities_struct;
+const kim_favorite_identities kim_empty_favorite_identities = &kim_empty_favorite_identities_struct;
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_favorite_identities_allocate (kim_favorite_identities_t *out_favorite_identities)
+static inline kim_error kim_favorite_identities_allocate (kim_favorite_identities *out_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_favorite_identities_t favorite_identities = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_favorite_identities favorite_identities = NULL;
if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); }
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_favorite_identities_resize (kim_favorite_identities_t io_favorite_identities,
- kim_count_t in_new_count)
+static inline kim_error kim_favorite_identities_resize (kim_favorite_identities io_favorite_identities,
+ kim_count in_new_count)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); }
if (!err && io_favorite_identities->count != in_new_count) {
- kim_identity_t *identities = NULL;
+ kim_identity *identities = NULL;
if (in_new_count == 0) {
if (io_favorite_identities->identities) {
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_create (kim_favorite_identities_t *out_favorite_identities)
+kim_error kim_favorite_identities_create (kim_favorite_identities *out_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_favorite_identities_t favorite_identities = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_favorite_identities favorite_identities = NULL;
if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_copy (kim_favorite_identities_t *out_favorite_identities,
- kim_favorite_identities_t in_favorite_identities)
+kim_error kim_favorite_identities_copy (kim_favorite_identities *out_favorite_identities,
+ kim_favorite_identities in_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_favorite_identities_t favorite_identities = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_favorite_identities favorite_identities = NULL;
if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); }
if (!err && !in_favorite_identities ) { err = param_error (2, "in_favorite_identities", "NULL"); }
}
if (!err) {
- kim_count_t i;
+ kim_count i;
for (i = 0; !err && i < favorite_identities->count; i++) {
err = kim_identity_copy (&favorite_identities->identities[i],
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_get_number_of_identities (kim_favorite_identities_t in_favorite_identities,
- kim_count_t *out_number_of_identities)
+kim_error kim_favorite_identities_get_number_of_identities (kim_favorite_identities in_favorite_identities,
+ kim_count *out_number_of_identities)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_favorite_identities ) { err = param_error (1, "in_favorite_identities", "NULL"); }
if (!err && !out_number_of_identities) { err = param_error (2, "out_number_of_identities", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_get_identity_at_index (kim_favorite_identities_t in_favorite_identities,
- kim_count_t in_index,
- kim_identity_t *out_identity)
+kim_error kim_favorite_identities_get_identity_at_index (kim_favorite_identities in_favorite_identities,
+ kim_count in_index,
+ kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_favorite_identities) { err = param_error (1, "in_favorite_identities", "NULL"); }
if (!err && !out_identity ) { err = param_error (3, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_favorite_identities,
- kim_identity_t in_identity)
+kim_error kim_favorite_identities_add_identity (kim_favorite_identities io_favorite_identities,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
- kim_count_t insert_at = 0;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
+ kim_count insert_at = 0;
if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); }
if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); }
}
if (!err) {
- kim_count_t i;
+ kim_count i;
for (i = 0; !err && i < io_favorite_identities->count; i++) {
- kim_comparison_t identity_comparison = 0;
+ kim_comparison identity_comparison = 0;
err = kim_identity_compare (in_identity, io_favorite_identities->identities[i], &identity_comparison);
} else if (kim_comparison_is_equal_to (identity_comparison)) {
/* already in list */
- kim_string_t display_string = NULL;
+ kim_string display_string = NULL;
err = kim_identity_get_display_string (in_identity, &display_string);
}
if (!err) {
- kim_count_t move_count = io_favorite_identities->count - 1 - insert_at;
+ kim_count move_count = io_favorite_identities->count - 1 - insert_at;
memmove (&io_favorite_identities->identities[insert_at + 1],
&io_favorite_identities->identities[insert_at],
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_remove_identity (kim_favorite_identities_t io_favorite_identities,
- kim_identity_t in_identity)
+kim_error kim_favorite_identities_remove_identity (kim_favorite_identities io_favorite_identities,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_boolean_t found = FALSE;
- kim_count_t i;
+ kim_error err = KIM_NO_ERROR;
+ kim_boolean found = FALSE;
+ kim_count i;
if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); }
if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); }
if (!err) {
for (i = 0; !err && !found && i < io_favorite_identities->count; i++) {
- kim_identity_t identity = io_favorite_identities->identities[i];
+ kim_identity identity = io_favorite_identities->identities[i];
err = kim_identity_compare (in_identity, identity, &found);
if (!err && found) {
- kim_count_t new_count = io_favorite_identities->count - 1;
+ kim_count new_count = io_favorite_identities->count - 1;
memmove (&io_favorite_identities->identities[i],
&io_favorite_identities->identities[i + 1],
(new_count - i) * sizeof (*io_favorite_identities->identities));
- kim_error_t terr = kim_favorite_identities_resize (io_favorite_identities, new_count);
+ kim_error terr = kim_favorite_identities_resize (io_favorite_identities, new_count);
if (terr) {
kim_debug_printf ("failed to resize list to %d. Continuing.", new_count);
kim_error_free (&terr);
}
if (!err && !found) {
- kim_string_t display_string = NULL;
+ kim_string display_string = NULL;
err = kim_identity_get_display_string (in_identity, &display_string);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_favorite_identities_remove_all_identities (kim_favorite_identities_t io_favorite_identities)
+kim_error kim_favorite_identities_remove_all_identities (kim_favorite_identities io_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); }
if (!err) {
- kim_count_t i;
+ kim_count i;
for (i = 0; i < io_favorite_identities->count; i++) {
kim_identity_free (&io_favorite_identities->identities[i]);
/* ------------------------------------------------------------------------ */
-void kim_favorite_identities_free (kim_favorite_identities_t *io_favorite_identities)
+void kim_favorite_identities_free (kim_favorite_identities *io_favorite_identities)
{
if (io_favorite_identities && *io_favorite_identities &&
*io_favorite_identities != kim_default_favorite_identities) {
- kim_count_t i;
+ kim_count i;
for (i = 0; i < (*io_favorite_identities)->count; i++) {
kim_identity_free (&(*io_favorite_identities)->identities[i]);
#pragma mark -- KIM Preferences --
struct kim_preferences_opaque {
- kim_options_t options;
- kim_boolean_t options_changed;
- kim_boolean_t remember_options;
- kim_boolean_t remember_options_changed;
- kim_identity_t client_identity;
- kim_boolean_t client_identity_changed;
- kim_boolean_t remember_client_identity;
- kim_boolean_t remember_client_identity_changed;
- kim_lifetime_t minimum_lifetime;
- kim_lifetime_t maximum_lifetime;
- kim_boolean_t lifetime_range_changed;
- kim_lifetime_t minimum_renewal_lifetime;
- kim_lifetime_t maximum_renewal_lifetime;
- kim_boolean_t renewal_lifetime_range_changed;
- kim_favorite_identities_t favorite_identities;
- kim_boolean_t favorite_identities_changed;
+ kim_options options;
+ kim_boolean options_changed;
+ kim_boolean remember_options;
+ kim_boolean remember_options_changed;
+ kim_identity client_identity;
+ kim_boolean client_identity_changed;
+ kim_boolean remember_client_identity;
+ kim_boolean remember_client_identity_changed;
+ kim_lifetime minimum_lifetime;
+ kim_lifetime maximum_lifetime;
+ kim_boolean lifetime_range_changed;
+ kim_lifetime minimum_renewal_lifetime;
+ kim_lifetime maximum_renewal_lifetime;
+ kim_boolean renewal_lifetime_range_changed;
+ kim_favorite_identities favorite_identities;
+ kim_boolean favorite_identities_changed;
};
struct kim_preferences_opaque kim_preferences_initializer = {
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_preferences_read (kim_preferences_t in_preferences)
+static kim_error kim_preferences_read (kim_preferences in_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); }
if (!err) {
- kim_lifetime_t lifetime = kim_default_lifetime;
+ kim_lifetime lifetime = kim_default_lifetime;
err = kim_os_preferences_get_lifetime_for_key (kim_preference_key_lifetime,
kim_default_lifetime,
}
if (!err) {
- kim_boolean_t renewable = kim_default_renewable;
+ kim_boolean renewable = kim_default_renewable;
err = kim_os_preferences_get_boolean_for_key (kim_preference_key_renewable,
kim_default_renewable,
}
if (!err) {
- kim_lifetime_t renewal_lifetime = kim_default_renewal_lifetime;
+ kim_lifetime renewal_lifetime = kim_default_renewal_lifetime;
err = kim_os_preferences_get_lifetime_for_key (kim_preference_key_renewal_lifetime,
kim_default_renewal_lifetime,
}
if (!err) {
- kim_boolean_t forwardable = kim_default_forwardable;
+ kim_boolean forwardable = kim_default_forwardable;
err = kim_os_preferences_get_boolean_for_key (kim_preference_key_forwardable,
kim_default_forwardable,
}
if (!err) {
- kim_boolean_t proxiable = kim_default_proxiable;
+ kim_boolean proxiable = kim_default_proxiable;
err = kim_os_preferences_get_boolean_for_key (kim_preference_key_proxiable,
kim_default_proxiable,
}
if (!err) {
- kim_boolean_t addressless = kim_default_addressless;
+ kim_boolean addressless = kim_default_addressless;
err = kim_os_preferences_get_boolean_for_key (kim_preference_key_addressless,
kim_default_addressless,
}
if (!err) {
- kim_identity_t default_identity = kim_default_client_identity;
+ kim_identity default_identity = kim_default_client_identity;
err = kim_os_identity_create_for_username (&default_identity);
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_preferences_write (kim_preferences_t in_preferences)
+static kim_error kim_preferences_write (kim_preferences in_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && in_preferences->remember_options && in_preferences->options_changed) {
- kim_lifetime_t lifetime = kim_default_lifetime;
+ kim_lifetime lifetime = kim_default_lifetime;
err = kim_options_get_lifetime (in_preferences->options, &lifetime);
}
if (!err) {
- kim_boolean_t renewable = kim_default_renewable;
+ kim_boolean renewable = kim_default_renewable;
err = kim_options_get_renewable (in_preferences->options, &renewable);
}
if (!err) {
- kim_lifetime_t renewal_lifetime = kim_default_renewal_lifetime;
+ kim_lifetime renewal_lifetime = kim_default_renewal_lifetime;
err = kim_options_get_renewal_lifetime (in_preferences->options, &renewal_lifetime);
}
if (!err) {
- kim_boolean_t forwardable = kim_default_forwardable;
+ kim_boolean forwardable = kim_default_forwardable;
err = kim_options_get_forwardable (in_preferences->options, &forwardable);
}
if (!err) {
- kim_boolean_t proxiable = kim_default_proxiable;
+ kim_boolean proxiable = kim_default_proxiable;
err = kim_options_get_proxiable (in_preferences->options, &proxiable);
}
if (!err) {
- kim_boolean_t addressless = kim_default_addressless;
+ kim_boolean addressless = kim_default_addressless;
err = kim_options_get_addressless (in_preferences->options, &addressless);
}
if (!err && in_preferences->remember_client_identity && in_preferences->client_identity_changed) {
- kim_identity_t default_identity = kim_default_client_identity;
+ kim_identity default_identity = kim_default_client_identity;
err = kim_os_identity_create_for_username (&default_identity);
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_preferences_allocate (kim_preferences_t *out_preferences)
+static inline kim_error kim_preferences_allocate (kim_preferences *out_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_preferences_t preferences = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_preferences preferences = NULL;
if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_create (kim_preferences_t *out_preferences)
+kim_error kim_preferences_create (kim_preferences *out_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_preferences_t preferences = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_preferences preferences = NULL;
if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_copy (kim_preferences_t *out_preferences,
- kim_preferences_t in_preferences)
+kim_error kim_preferences_copy (kim_preferences *out_preferences,
+ kim_preferences in_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_preferences_t preferences = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_preferences preferences = NULL;
if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); }
if (!err && !in_preferences ) { err = param_error (2, "in_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_options (kim_preferences_t io_preferences,
- kim_options_t in_options)
+kim_error kim_preferences_set_options (kim_preferences io_preferences,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_options_t options = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_options options = NULL;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_options (kim_preferences_t in_preferences,
- kim_options_t *out_options)
+kim_error kim_preferences_get_options (kim_preferences in_preferences,
+ kim_options *out_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_options ) { err = param_error (2, "out_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_remember_options (kim_preferences_t io_preferences,
- kim_boolean_t in_remember_options)
+kim_error kim_preferences_set_remember_options (kim_preferences io_preferences,
+ kim_boolean in_remember_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_remember_options (kim_preferences_t in_preferences,
- kim_boolean_t *out_remember_options)
+kim_error kim_preferences_get_remember_options (kim_preferences in_preferences,
+ kim_boolean *out_remember_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_remember_options) { err = param_error (2, "out_remember_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_client_identity (kim_preferences_t io_preferences,
- kim_identity_t in_client_identity)
+kim_error kim_preferences_set_client_identity (kim_preferences io_preferences,
+ kim_identity in_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = KIM_IDENTITY_ANY;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = KIM_IDENTITY_ANY;
if (!err && !io_preferences ) { err = param_error (1, "io_preferences", "NULL"); }
/* in_client_identity may be KIM_IDENTITY_ANY */
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_client_identity (kim_preferences_t in_preferences,
- kim_identity_t *out_client_identity)
+kim_error kim_preferences_get_client_identity (kim_preferences in_preferences,
+ kim_identity *out_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_client_identity) { err = param_error (2, "out_client_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_remember_client_identity (kim_preferences_t io_preferences,
- kim_boolean_t in_remember_client_identity)
+kim_error kim_preferences_set_remember_client_identity (kim_preferences io_preferences,
+ kim_boolean in_remember_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_remember_client_identity (kim_preferences_t in_preferences,
- kim_boolean_t *out_remember_client_identity)
+kim_error kim_preferences_get_remember_client_identity (kim_preferences in_preferences,
+ kim_boolean *out_remember_client_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_remember_client_identity) { err = param_error (2, "out_remember_client_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_minimum_lifetime (kim_preferences_t io_preferences,
- kim_lifetime_t in_minimum_lifetime)
+kim_error kim_preferences_set_minimum_lifetime (kim_preferences io_preferences,
+ kim_lifetime in_minimum_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_minimum_lifetime (kim_preferences_t in_preferences,
- kim_lifetime_t *out_minimum_lifetime)
+kim_error kim_preferences_get_minimum_lifetime (kim_preferences in_preferences,
+ kim_lifetime *out_minimum_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_minimum_lifetime) { err = param_error (2, "out_minimum_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_maximum_lifetime (kim_preferences_t io_preferences,
- kim_lifetime_t in_maximum_lifetime)
+kim_error kim_preferences_set_maximum_lifetime (kim_preferences io_preferences,
+ kim_lifetime in_maximum_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_maximum_lifetime (kim_preferences_t in_preferences,
- kim_lifetime_t *out_maximum_lifetime)
+kim_error kim_preferences_get_maximum_lifetime (kim_preferences in_preferences,
+ kim_lifetime *out_maximum_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_maximum_lifetime) { err = param_error (2, "out_maximum_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_minimum_renewal_lifetime (kim_preferences_t io_preferences,
- kim_lifetime_t in_minimum_renewal_lifetime)
+kim_error kim_preferences_set_minimum_renewal_lifetime (kim_preferences io_preferences,
+ kim_lifetime in_minimum_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_minimum_renewal_lifetime (kim_preferences_t in_preferences,
- kim_lifetime_t *out_minimum_renewal_lifetime)
+kim_error kim_preferences_get_minimum_renewal_lifetime (kim_preferences in_preferences,
+ kim_lifetime *out_minimum_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_minimum_renewal_lifetime) { err = param_error (2, "out_minimum_renewal_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_maximum_renewal_lifetime (kim_preferences_t io_preferences,
- kim_lifetime_t in_maximum_renewal_lifetime)
+kim_error kim_preferences_set_maximum_renewal_lifetime (kim_preferences io_preferences,
+ kim_lifetime in_maximum_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_maximum_renewal_lifetime (kim_preferences_t in_preferences,
- kim_lifetime_t *out_maximum_renewal_lifetime)
+kim_error kim_preferences_get_maximum_renewal_lifetime (kim_preferences in_preferences,
+ kim_lifetime *out_maximum_renewal_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_maximum_renewal_lifetime) { err = param_error (2, "out_maximum_renewal_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_set_favorite_identities (kim_preferences_t io_preferences,
- kim_favorite_identities_t in_favorite_identities)
+kim_error kim_preferences_set_favorite_identities (kim_preferences io_preferences,
+ kim_favorite_identities in_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_favorite_identities_t favorite_identities = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_favorite_identities favorite_identities = NULL;
if (!err && !io_preferences ) { err = param_error (1, "io_preferences", "NULL"); }
if (!err && !in_favorite_identities) { err = param_error (2, "in_favorite_identities", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_get_favorite_identities (kim_preferences_t in_preferences,
- kim_favorite_identities_t *out_favorite_identities)
+kim_error kim_preferences_get_favorite_identities (kim_preferences in_preferences,
+ kim_favorite_identities *out_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); }
if (!err && !out_favorite_identities) { err = param_error (2, "out_favorite_identities", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_preferences_synchronize (kim_preferences_t in_preferences)
+kim_error kim_preferences_synchronize (kim_preferences in_preferences)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); }
/* ------------------------------------------------------------------------ */
-void kim_preferences_free (kim_preferences_t *io_preferences)
+void kim_preferences_free (kim_preferences *io_preferences)
{
if (io_preferences && *io_preferences) {
kim_options_free (&(*io_preferences)->options);
#include <kim/kim.h>
-extern const kim_favorite_identities_t kim_empty_favorite_identities;
+extern const kim_favorite_identities kim_empty_favorite_identities;
typedef enum kim_preference_key_enum {
kim_preference_key_lifetime,
#define kim_default_maximum_renewal_lifetime 7*24*60*60
-kim_error_t kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key,
- kim_identity_t in_hardcoded_default,
- kim_identity_t *out_identity);
+kim_error kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key,
+ kim_identity in_hardcoded_default,
+ kim_identity *out_identity);
-kim_error_t kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key,
- kim_identity_t in_identity);
+kim_error kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key,
+ kim_identity in_identity);
-kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key,
- kim_favorite_identities_t in_hardcoded_default,
- kim_favorite_identities_t *out_favorite_identities);
+kim_error kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key,
+ kim_favorite_identities in_hardcoded_default,
+ kim_favorite_identities *out_favorite_identities);
-kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key,
- kim_favorite_identities_t in_favorite_identities);
+kim_error kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key,
+ kim_favorite_identities in_favorite_identities);
-kim_error_t kim_os_preferences_get_time_for_key (kim_preference_key_t in_key,
- kim_time_t in_hardcoded_default,
- kim_time_t *out_time);
+kim_error kim_os_preferences_get_time_for_key (kim_preference_key_t in_key,
+ kim_time in_hardcoded_default,
+ kim_time *out_time);
-kim_error_t kim_os_preferences_set_time_for_key (kim_preference_key_t in_key,
- kim_time_t in_time);
+kim_error kim_os_preferences_set_time_for_key (kim_preference_key_t in_key,
+ kim_time in_time);
-kim_error_t kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key,
- kim_lifetime_t in_hardcoded_default,
- kim_lifetime_t *out_lifetime);
+kim_error kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key,
+ kim_lifetime in_hardcoded_default,
+ kim_lifetime *out_lifetime);
-kim_error_t kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key,
- kim_lifetime_t in_lifetime);
+kim_error kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key,
+ kim_lifetime in_lifetime);
-kim_error_t kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key,
- kim_boolean_t in_hardcoded_default,
- kim_boolean_t *out_boolean);
+kim_error kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key,
+ kim_boolean in_hardcoded_default,
+ kim_boolean *out_boolean);
-kim_error_t kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key,
- kim_boolean_t in_boolean);
+kim_error kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key,
+ kim_boolean in_boolean);
#endif /* KIM_PREFERENCES_PRIVATE_H */
/* ------------------------------------------------------------------------ */
struct kim_selection_hints_opaque {
- kim_string_t application_identifier;
- kim_string_t application_name;
- kim_string_t explanation;
- kim_options_t options;
- kim_boolean_t allow_user_interaction;
- kim_boolean_t use_cached_results;
- kim_string_t service_identity;
- kim_string_t client_realm;
- kim_string_t user;
- kim_string_t service_realm;
- kim_string_t service;
- kim_string_t server;
+ kim_string application_identifier;
+ kim_string application_name;
+ kim_string explanation;
+ kim_options options;
+ kim_boolean allow_user_interaction;
+ kim_boolean use_cached_results;
+ kim_string service_identity;
+ kim_string client_realm;
+ kim_string user;
+ kim_string service_realm;
+ kim_string service;
+ kim_string server;
};
struct kim_selection_hints_opaque kim_selection_hints_initializer = {
- NULL,
- NULL,
- NULL,
- KIM_OPTIONS_DEFAULT,
- TRUE,
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+NULL,
+NULL,
+NULL,
+KIM_OPTIONS_DEFAULT,
+TRUE,
+TRUE,
+NULL,
+NULL,
+NULL,
+NULL,
+NULL,
+NULL
};
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_selection_hints_allocate (kim_selection_hints_t *out_selection_hints)
+static inline kim_error kim_selection_hints_allocate (kim_selection_hints *out_selection_hints)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_selection_hints_t selection_hints = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_selection_hints selection_hints = NULL;
if (!err && !out_selection_hints) { err = param_error (1, "out_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_create (kim_selection_hints_t *out_selection_hints,
- kim_string_t in_application_identifier)
+kim_error kim_selection_hints_create (kim_selection_hints *out_selection_hints,
+ kim_string in_application_identifier)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_selection_hints_t selection_hints = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_selection_hints selection_hints = NULL;
if (!err && !out_selection_hints ) { err = param_error (1, "out_selection_hints", "NULL"); }
if (!err && !in_application_identifier) { err = param_error (1, "in_application_identifier", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_copy (kim_selection_hints_t *out_selection_hints,
- kim_selection_hints_t in_selection_hints)
+kim_error kim_selection_hints_copy (kim_selection_hints *out_selection_hints,
+ kim_selection_hints in_selection_hints)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_selection_hints_t selection_hints = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_selection_hints selection_hints = NULL;
if (!err && !out_selection_hints) { err = param_error (1, "out_selection_hints", "NULL"); }
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_service_identity_hint (kim_selection_hints_t io_selection_hints,
- kim_identity_t in_service_identity)
+kim_error kim_selection_hints_set_service_identity_hint (kim_selection_hints io_selection_hints,
+ kim_identity in_service_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_service_identity) { err = param_error (2, "in_service_identity", "KIM_IDENTITY_ANY"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_service_identity_hint (kim_selection_hints_t in_selection_hints,
- kim_identity_t *out_service_identity)
+kim_error kim_selection_hints_get_service_identity_hint (kim_selection_hints in_selection_hints,
+ kim_identity *out_service_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_service_identity) { err = param_error (2, "out_service_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_client_realm_hint (kim_selection_hints_t io_selection_hints,
- kim_string_t in_client_realm)
+kim_error kim_selection_hints_set_client_realm_hint (kim_selection_hints io_selection_hints,
+ kim_string in_client_realm)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_client_realm ) { err = param_error (2, "in_client_realm", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_client_realm_hint (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_client_realm)
+kim_error kim_selection_hints_get_client_realm_hint (kim_selection_hints in_selection_hints,
+ kim_string *out_client_realm)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_client_realm ) { err = param_error (2, "out_client_realm", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_user_hint (kim_selection_hints_t io_selection_hints,
- kim_string_t in_user)
+kim_error kim_selection_hints_set_user_hint (kim_selection_hints io_selection_hints,
+ kim_string in_user)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_user ) { err = param_error (2, "in_user", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_user_hint (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_user)
+kim_error kim_selection_hints_get_user_hint (kim_selection_hints in_selection_hints,
+ kim_string *out_user)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_user ) { err = param_error (2, "out_user", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_service_realm_hint (kim_selection_hints_t io_selection_hints,
- kim_string_t in_service_realm)
+kim_error kim_selection_hints_set_service_realm_hint (kim_selection_hints io_selection_hints,
+ kim_string in_service_realm)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_service_realm ) { err = param_error (2, "in_service_realm", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_service_realm_hint (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_service_realm)
+kim_error kim_selection_hints_get_service_realm_hint (kim_selection_hints in_selection_hints,
+ kim_string *out_service_realm)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_service_realm ) { err = param_error (2, "out_service_realm", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_service_hint (kim_selection_hints_t io_selection_hints,
- kim_string_t in_service)
+kim_error kim_selection_hints_set_service_hint (kim_selection_hints io_selection_hints,
+ kim_string in_service)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_service ) { err = param_error (2, "in_service", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_service_hint (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_service)
+kim_error kim_selection_hints_get_service_hint (kim_selection_hints in_selection_hints,
+ kim_string *out_service)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_service ) { err = param_error (2, "out_service", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_server_hint (kim_selection_hints_t io_selection_hints,
- kim_string_t in_server_hostname)
+kim_error kim_selection_hints_set_server_hint (kim_selection_hints io_selection_hints,
+ kim_string in_server_hostname)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_server_hostname) { err = param_error (2, "in_server_hostname", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_server_hint (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_server_hostname)
+kim_error kim_selection_hints_get_server_hint (kim_selection_hints in_selection_hints,
+ kim_string *out_server_hostname)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_server_hostname) { err = param_error (2, "out_server_hostname", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_application_name (kim_selection_hints_t io_selection_hints,
- kim_string_t in_application_name)
+kim_error kim_selection_hints_set_application_name (kim_selection_hints io_selection_hints,
+ kim_string in_application_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_application_name) { err = param_error (2, "in_application_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_application_name (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_application_name)
+kim_error kim_selection_hints_get_application_name (kim_selection_hints in_selection_hints,
+ kim_string *out_application_name)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_application_name) { err = param_error (2, "out_application_name", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_explanation (kim_selection_hints_t io_selection_hints,
- kim_string_t in_explanation)
+kim_error kim_selection_hints_set_explanation (kim_selection_hints io_selection_hints,
+ kim_string in_explanation)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_explanation ) { err = param_error (2, "in_explanation", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_explanation (kim_selection_hints_t in_selection_hints,
- kim_string_t *out_explanation)
+kim_error kim_selection_hints_get_explanation (kim_selection_hints in_selection_hints,
+ kim_string *out_explanation)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_explanation ) { err = param_error (2, "out_explanation", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_options (kim_selection_hints_t io_selection_hints,
- kim_options_t in_options)
+kim_error kim_selection_hints_set_options (kim_selection_hints io_selection_hints,
+ kim_options in_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); }
if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_options (kim_selection_hints_t in_selection_hints,
- kim_options_t *out_options)
+kim_error kim_selection_hints_get_options (kim_selection_hints in_selection_hints,
+ kim_options *out_options)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_options ) { err = param_error (2, "out_options", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_allow_user_interaction (kim_selection_hints_t io_selection_hints,
- kim_boolean_t in_allow_user_interaction)
+kim_error kim_selection_hints_set_allow_user_interaction (kim_selection_hints io_selection_hints,
+ kim_boolean in_allow_user_interaction)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_allow_user_interaction (kim_selection_hints_t in_selection_hints,
- kim_boolean_t *out_allow_user_interaction)
+kim_error kim_selection_hints_get_allow_user_interaction (kim_selection_hints in_selection_hints,
+ kim_boolean *out_allow_user_interaction)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_allow_user_interaction) { err = param_error (2, "out_allow_user_interaction", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_set_remember_identity (kim_selection_hints_t io_selection_hints,
- kim_boolean_t in_use_cached_results)
+kim_error kim_selection_hints_set_remember_identity (kim_selection_hints io_selection_hints,
+ kim_boolean in_use_cached_results)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_remember_identity (kim_selection_hints_t in_selection_hints,
- kim_boolean_t *out_use_cached_results)
+kim_error kim_selection_hints_get_remember_identity (kim_selection_hints in_selection_hints,
+ kim_boolean *out_use_cached_results)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_use_cached_results) { err = param_error (2, "out_use_cached_results", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t *out_identity)
+kim_error kim_selection_hints_get_identity (kim_selection_hints in_selection_hints,
+ kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_identity_t identity = NULL;
- kim_ccache_t ccache = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_identity identity = NULL;
+ kim_ccache ccache = NULL;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !out_identity ) { err = param_error (2, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t in_identity)
+kim_error kim_selection_hints_remember_identity (kim_selection_hints in_selection_hints,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints)
+kim_error kim_selection_hints_forget_identity (kim_selection_hints in_selection_hints)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_selection_hints_get_preference_strings (kim_selection_hints_t in_selection_hints,
- kim_selection_hints_preference_strings *io_preference_strings)
+kim_error kim_selection_hints_get_preference_strings (kim_selection_hints in_selection_hints,
+ kim_selection_hints_preference_strings *io_preference_strings)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !io_preference_strings) { err = param_error (2, "io_preference_strings", "NULL"); }
-
+
if (!err) {
io_preference_strings->application_identifier = in_selection_hints->application_identifier;
io_preference_strings->service_identity = in_selection_hints->service_identity;
/* ------------------------------------------------------------------------ */
-void kim_selection_hints_free (kim_selection_hints_t *io_selection_hints)
+void kim_selection_hints_free (kim_selection_hints *io_selection_hints)
{
if (io_selection_hints && *io_selection_hints) {
kim_string_free (&(*io_selection_hints)->application_identifier);
#include <kim/kim.h>
typedef struct kim_selection_hints_preference_strings {
- kim_string_t application_identifier;
- kim_string_t service_identity;
- kim_string_t client_realm;
- kim_string_t user;
- kim_string_t service_realm;
- kim_string_t service;
- kim_string_t server;
+ kim_string application_identifier;
+ kim_string service_identity;
+ kim_string client_realm;
+ kim_string user;
+ kim_string service_realm;
+ kim_string service;
+ kim_string server;
} kim_selection_hints_preference_strings;
-kim_error_t kim_selection_hints_get_preference_strings (kim_selection_hints_t in_selection_hints,
+kim_error kim_selection_hints_get_preference_strings (kim_selection_hints in_selection_hints,
kim_selection_hints_preference_strings *io_preference_strings);
-kim_error_t kim_os_selection_hints_lookup_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t *out_identity);
+kim_error kim_os_selection_hints_lookup_identity (kim_selection_hints in_selection_hints,
+ kim_identity *out_identity);
-kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t in_identity);
+kim_error kim_os_selection_hints_remember_identity (kim_selection_hints in_selection_hints,
+ kim_identity in_identity);
-kim_error_t kim_os_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints);
+kim_error kim_os_selection_hints_forget_identity (kim_selection_hints in_selection_hints);
#endif /* KIM_SELECTION_HINTS_PRIVATE_H */
/* ------------------------------------------------------------------------ */
-static inline kim_error_t kim_string_allocate (kim_string_t *out_string,
- kim_count_t in_length)
+static inline kim_error kim_string_allocate (kim_string *out_string,
+ kim_count in_length)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_create_from_format (kim_string_t *out_string,
- kim_string_t in_format,
- ...)
+kim_error kim_string_create_from_format (kim_string *out_string,
+ kim_string in_format,
+ ...)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
va_list args;
va_start (args, in_format);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_create_from_format_va_retcode (kim_string_t *out_string,
- kim_string_t in_format,
- va_list in_args)
+kim_error kim_string_create_from_format_va_retcode (kim_string *out_string,
+ kim_string in_format,
+ va_list in_args)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
int count = vasprintf ((char **) out_string, in_format, in_args);
if (count < 0) { err = os_error (ENOMEM); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_create_from_format_va (kim_string_t *out_string,
- kim_string_t in_format,
- va_list in_args)
+kim_error kim_string_create_from_format_va (kim_string *out_string,
+ kim_string in_format,
+ va_list in_args)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); }
if (!err && !in_format ) { err = param_error (2, "in_format", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_create_from_buffer (kim_string_t *out_string,
- const char *in_buffer,
- kim_count_t in_length)
+kim_error kim_string_create_from_buffer (kim_string *out_string,
+ const char *in_buffer,
+ kim_count in_length)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); }
if (!err && !in_buffer ) { err = param_error (2, "in_buffer", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_copy (kim_string_t *out_string,
- kim_string_t in_string)
+kim_error kim_string_copy (kim_string *out_string,
+ kim_string in_string)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); }
if (!err && !in_string ) { err = param_error (2, "in_string", "NULL"); }
-
+
if (!err) {
err = kim_string_allocate (&string, strlen (in_string) + 1);
}
/* ------------------------------------------------------------------------ */
-kim_error_t kim_string_compare (kim_string_t in_string,
- kim_string_t in_compare_to_string,
- kim_comparison_t *out_comparison)
+kim_error kim_string_compare (kim_string in_string,
+ kim_string in_compare_to_string,
+ kim_comparison *out_comparison)
{
return kim_os_string_compare (in_string, in_compare_to_string, out_comparison);
}
/* ------------------------------------------------------------------------ */
-void kim_string_free (kim_string_t *io_string)
+void kim_string_free (kim_string *io_string)
{
if (io_string && *io_string) {
free ((char *) *io_string);
#include <kim/kim.h>
-kim_error_t kim_string_create_from_format (kim_string_t *out_string,
- kim_string_t in_format,
+kim_error kim_string_create_from_format (kim_string *out_string,
+ kim_string in_format,
...);
-kim_error_t kim_string_create_from_format_va_retcode (kim_string_t *out_string,
- kim_string_t in_format,
+kim_error kim_string_create_from_format_va_retcode (kim_string *out_string,
+ kim_string in_format,
va_list in_args);
-kim_error_t kim_string_create_from_format_va (kim_string_t *out_string,
- kim_string_t in_format,
+kim_error kim_string_create_from_format_va (kim_string *out_string,
+ kim_string in_format,
va_list in_args);
-kim_error_t kim_string_create_from_buffer (kim_string_t *out_string,
+kim_error kim_string_create_from_buffer (kim_string *out_string,
const char *in_buffer,
- kim_count_t in_length);
+ kim_count in_length);
-kim_error_t kim_string_prepend (kim_string_t *io_string,
- kim_string_t in_prefix);
+kim_error kim_string_prepend (kim_string *io_string,
+ kim_string in_prefix);
-kim_error_t kim_string_append (kim_string_t *io_string,
- kim_string_t in_suffix);
+kim_error kim_string_append (kim_string *io_string,
+ kim_string in_suffix);
/* OS-specific because it should use UTF8-safe sorting where possible */
-kim_error_t kim_os_string_compare (kim_string_t in_string,
- kim_string_t in_compare_to_string,
- kim_comparison_t *out_comparison);
+kim_error kim_os_string_compare (kim_string in_string,
+ kim_string in_compare_to_string,
+ kim_comparison *out_comparison);
#endif /* KIM_STRING_PRIVATE_H */
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_identity_create_for_username (kim_identity_t *out_identity)
+kim_error kim_os_identity_create_for_username (kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-void kim_os_library_debug_print (kim_string_t in_string)
+void kim_os_library_debug_print (kim_string in_string)
{
dprintf (in_string);
}
/* ------------------------------------------------------------------------ */
-kim_boolean_t kim_os_library_caller_is_server (void)
+kim_boolean kim_os_library_caller_is_server (void)
{
CFBundleRef mainBundle = CFBundleGetMainBundle ();
if (mainBundle) {
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_preferences_cfstring_for_key (kim_preference_key_t in_key,
+static kim_error kim_os_preferences_cfstring_for_key (kim_preference_key_t in_key,
CFStringRef *out_kim_string_key,
CFStringRef *out_kll_string_key)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !out_kim_string_key) { err = param_error (2, "out_kim_string_key", "NULL"); }
if (!err && !out_kll_string_key) { err = param_error (3, "out_kll_string_key", "NULL"); }
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_preferences_get_value (kim_preference_key_t in_key,
+static kim_error kim_os_preferences_get_value (kim_preference_key_t in_key,
CFTypeID in_type,
CFPropertyListRef *out_value)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFPropertyListRef value = NULL;
CFStringRef users[] = { kCFPreferencesCurrentUser, kCFPreferencesAnyUser, NULL };
CFStringRef files[] = { KIM_PREFERENCES_FILE, KLL_PREFERENCES_FILE, NULL };
}
if (!err) {
- kim_count_t u, f, h;
+ kim_count u, f, h;
if (!kim_library_allow_home_directory_access()) {
users[0] = kCFPreferencesAnyUser;
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_preferences_set_value (kim_preference_key_t in_key,
+static kim_error kim_os_preferences_set_value (kim_preference_key_t in_key,
CFPropertyListRef in_value)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef kim_key = NULL;
CFStringRef kll_key = NULL;
}
if (!err) {
- kim_boolean_t homedir_ok = kim_library_allow_home_directory_access();
+ kim_boolean homedir_ok = kim_library_allow_home_directory_access();
CFStringRef user = homedir_ok ? kCFPreferencesCurrentUser : kCFPreferencesAnyUser;
CFStringRef host = homedir_ok ? kCFPreferencesAnyHost : kCFPreferencesCurrentHost;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key,
- kim_identity_t in_hardcoded_default,
- kim_identity_t *out_identity)
+kim_error kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key,
+ kim_identity in_hardcoded_default,
+ kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
CFStringRef value = NULL;
if (!err && !out_identity) { err = param_error (2, "out_identity", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key,
- kim_identity_t in_identity)
+kim_error kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef value = NULL;
- kim_string_t string = NULL;
+ kim_string string = NULL;
/* in_identity can be KIM_IDENTITY_ANY */
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key,
- kim_favorite_identities_t in_hardcoded_default,
- kim_favorite_identities_t *out_favorite_identities)
+kim_error kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key,
+ kim_favorite_identities in_hardcoded_default,
+ kim_favorite_identities *out_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFArrayRef value = NULL;
if (!err && !out_favorite_identities) { err = param_error (2, "out_favorite_identities", "NULL"); }
err = kim_favorite_identities_copy (out_favorite_identities, in_hardcoded_default);
} else {
- kim_favorite_identities_t favorite_identities = NULL;
+ kim_favorite_identities favorite_identities = NULL;
CFIndex count = CFArrayGetCount (value);
CFIndex i;
for (i = 0; !err && i < count; i++) {
CFStringRef cfstring = NULL;
- kim_string_t string = NULL;
- kim_identity_t identity = NULL;
+ kim_string string = NULL;
+ kim_identity identity = NULL;
cfstring = (CFStringRef) CFArrayGetValueAtIndex (value, i);
if (!cfstring || CFGetTypeID (cfstring) != CFStringGetTypeID ()) {
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key,
- kim_favorite_identities_t in_favorite_identities)
+kim_error kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key,
+ kim_favorite_identities in_favorite_identities)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_count_t count = 0;
+ kim_error err = KIM_NO_ERROR;
+ kim_count count = 0;
CFMutableArrayRef value = NULL;
if (!err && !in_favorite_identities) { err = param_error (2, "in_favorite_identities", "NULL"); }
}
if (!err) {
- kim_count_t i;
+ kim_count i;
for (i = 0; !err && i < count; i++) {
- kim_identity_t identity = NULL;
- kim_string_t string = NULL;
+ kim_identity identity = NULL;
+ kim_string string = NULL;
CFStringRef cfstring = NULL;
err = kim_favorite_identities_get_identity_at_index (in_favorite_identities, i, &identity);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_get_time_for_key (kim_preference_key_t in_key,
- kim_time_t in_hardcoded_default,
- kim_time_t *out_time)
+kim_error kim_os_preferences_get_time_for_key (kim_preference_key_t in_key,
+ kim_time in_hardcoded_default,
+ kim_time *out_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFNumberRef value = NULL;
if (!err && !out_time) { err = param_error (2, "out_time", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_set_time_for_key (kim_preference_key_t in_key,
- kim_time_t in_time)
+kim_error kim_os_preferences_set_time_for_key (kim_preference_key_t in_key,
+ kim_time in_time)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFNumberRef value = NULL;
SInt32 number = (SInt32) in_time;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key,
- kim_lifetime_t in_hardcoded_default,
- kim_lifetime_t *out_lifetime)
+kim_error kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key,
+ kim_lifetime in_hardcoded_default,
+ kim_lifetime *out_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFNumberRef value = NULL;
if (!err && !out_lifetime) { err = param_error (2, "out_lifetime", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key,
- kim_lifetime_t in_lifetime)
+kim_error kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key,
+ kim_lifetime in_lifetime)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFNumberRef value = NULL;
SInt32 number = (SInt32) in_lifetime;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key,
- kim_boolean_t in_hardcoded_default,
- kim_boolean_t *out_boolean)
+kim_error kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key,
+ kim_boolean in_hardcoded_default,
+ kim_boolean *out_boolean)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFBooleanRef value = NULL;
if (!err && !out_boolean) { err = param_error (2, "out_boolean", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key,
- kim_boolean_t in_boolean)
+kim_error kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key,
+ kim_boolean in_boolean)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFBooleanRef value = in_boolean ? kCFBooleanTrue : kCFBooleanFalse;
if (!err) {
CFStringRef kim_os_string_get_cfstring_for_key_and_dictionary (CFStringRef in_key,
CFBundleRef in_bundle);
-CFStringRef kim_os_string_get_cfstring_for_key (kim_string_t in_key_string);
+CFStringRef kim_os_string_get_cfstring_for_key (kim_string in_key_string);
-kim_error_t kim_os_string_create_from_cfstring (kim_string_t *out_string,
+kim_error kim_os_string_create_from_cfstring (kim_string *out_string,
CFStringRef in_cfstring);
-kim_error_t kim_os_string_create_for_key (kim_string_t *out_string,
- kim_string_t in_key_string);
+kim_error kim_os_string_create_for_key (kim_string *out_string,
+ kim_string in_key_string);
-kim_error_t kim_os_string_get_cfstring (kim_string_t in_string,
+kim_error kim_os_string_get_cfstring (kim_string in_string,
CFStringRef *out_cfstring);
-kim_error_t kim_os_string_compare_to_cfstring (kim_string_t in_string,
+kim_error kim_os_string_compare_to_cfstring (kim_string in_string,
CFStringRef in_compare_to_cfstring,
- kim_comparison_t *out_comparison);
+ kim_comparison *out_comparison);
#endif /* KIM_PRIVATE_H */
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_selection_hints_get_selection_hints_array (CFArrayRef *out_selection_hints_array)
+static kim_error kim_os_selection_hints_get_selection_hints_array (CFArrayRef *out_selection_hints_array)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFPropertyListRef value = NULL;
CFStringRef users[] = { kCFPreferencesCurrentUser, kCFPreferencesAnyUser, NULL };
CFStringRef hosts[] = { kCFPreferencesCurrentHost, kCFPreferencesAnyHost, NULL };
if (!err && !out_selection_hints_array) { err = param_error (1, "out_selection_hints_array", "NULL"); }
if (!err) {
- kim_count_t u, h;
+ kim_count u, h;
if (!kim_library_allow_home_directory_access()) {
users[0] = kCFPreferencesAnyUser;
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_selection_hints_set_selection_hints_array (CFArrayRef in_selection_hints_array)
+static kim_error kim_os_selection_hints_set_selection_hints_array (CFArrayRef in_selection_hints_array)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
if (!err && !in_selection_hints_array) { err = param_error (1, "in_selection_hints_array", "NULL"); }
if (!err) {
- kim_boolean_t homedir_ok = kim_library_allow_home_directory_access();
+ kim_boolean homedir_ok = kim_library_allow_home_directory_access();
CFStringRef user = homedir_ok ? kCFPreferencesCurrentUser : kCFPreferencesAnyUser;
CFStringRef host = homedir_ok ? kCFPreferencesAnyHost : kCFPreferencesCurrentHost;
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_selection_hints_create_dictionary (kim_selection_hints_t in_selection_hints,
- kim_identity_t in_identity,
+static kim_error kim_os_selection_hints_create_dictionary (kim_selection_hints in_selection_hints,
+ kim_identity in_identity,
CFDictionaryRef *out_hints_dictionary)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
kim_selection_hints_preference_strings preference_strings = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
- kim_string_t identity_string = NULL;
+ kim_string identity_string = NULL;
CFStringRef keys[KIM_MAX_HINTS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
CFStringRef values[KIM_MAX_HINTS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
CFIndex i = 0;
/* ------------------------------------------------------------------------ */
-static kim_boolean_t kim_os_selection_hints_compare_hint (kim_string_t in_string,
+static kim_boolean kim_os_selection_hints_compare_hint (kim_string in_string,
CFStringRef in_value)
{
- kim_boolean_t equal = 0;
+ kim_boolean equal = 0;
if (!in_string && !in_value) {
equal = 1;
} else if (in_string && in_value) {
if (CFGetTypeID (in_value) == CFStringGetTypeID ()) {
- kim_comparison_t comparison;
+ kim_comparison comparison;
- kim_error_t err = kim_os_string_compare_to_cfstring (in_string, in_value,
+ kim_error err = kim_os_string_compare_to_cfstring (in_string, in_value,
&comparison);
if (!err && kim_comparison_is_equal_to (comparison)) {
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_selection_hints_compare_to_dictionary (kim_selection_hints_t in_selection_hints,
+static kim_error kim_os_selection_hints_compare_to_dictionary (kim_selection_hints in_selection_hints,
CFDictionaryRef in_hints_dictionary,
- kim_boolean_t *out_hints_equal)
+ kim_boolean *out_hints_equal)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
kim_selection_hints_preference_strings preference_strings = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
- kim_boolean_t hints_equal = 1;
+ kim_boolean hints_equal = 1;
if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !in_hints_dictionary) { err = param_error (2, "in_hints_dictionary", "NULL"); }
/* ------------------------------------------------------------------------ */
-static kim_error_t kim_os_selection_hints_get_dictionary_identity (CFDictionaryRef in_dictionary,
- kim_identity_t *out_identity)
+static kim_error kim_os_selection_hints_get_dictionary_identity (CFDictionaryRef in_dictionary,
+ kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef identity_cfstr = NULL;
- kim_string_t identity_string = NULL;
+ kim_string identity_string = NULL;
identity_cfstr = CFDictionaryGetValue (in_dictionary, KIM_IDENTITY_HINT);
if (!identity_cfstr || CFGetTypeID (identity_cfstr) != CFStringGetTypeID ()) {
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_selection_hints_lookup_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t *out_identity)
+kim_error kim_os_selection_hints_lookup_identity (kim_selection_hints in_selection_hints,
+ kim_identity *out_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFArrayRef hints_array = NULL;
CFIndex i = 0;
CFIndex count = 0;
- kim_boolean_t found = 0;
+ kim_boolean found = 0;
CFDictionaryRef found_dictionary = NULL;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints,
- kim_identity_t in_identity)
+kim_error kim_os_selection_hints_remember_identity (kim_selection_hints in_selection_hints,
+ kim_identity in_identity)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFArrayRef old_hints_array = NULL;
CFMutableArrayRef new_hints_array = NULL;
CFIndex count = 0;
CFIndex i = 0;
- kim_boolean_t hint_already_exists = 0;
- kim_boolean_t hints_array_changed = 0;
+ kim_boolean hint_already_exists = 0;
+ kim_boolean hints_array_changed = 0;
if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); }
if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); }
for (i = 0; !err && i < count; i++) {
CFDictionaryRef dictionary = NULL;
- kim_identity_t identity = NULL;
- kim_boolean_t hints_equal = 0;
+ kim_identity identity = NULL;
+ kim_boolean hints_equal = 0;
dictionary = CFArrayGetValueAtIndex (new_hints_array, i);
if (!dictionary) { err = os_error (ENOMEM); }
}
if (!err && hints_equal) {
- kim_comparison_t comparison;
+ kim_comparison comparison;
err = kim_os_selection_hints_get_dictionary_identity (dictionary,
&identity);
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints)
+kim_error kim_os_selection_hints_forget_identity (kim_selection_hints in_selection_hints)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFArrayRef old_hints_array = NULL;
CFMutableArrayRef new_hints_array = NULL;
CFIndex count = 0;
for (i = 0; !err && i < count; i++) {
CFDictionaryRef dictionary = NULL;
- kim_boolean_t hints_equal = 0;
+ kim_boolean hints_equal = 0;
dictionary = CFArrayGetValueAtIndex (new_hints_array, i);
if (!dictionary) { err = os_error (ENOMEM); }
/* ------------------------------------------------------------------------ */
/* WARNING: DO NOT CALL check_error() -- it is called by error_message()!! */
-CFStringRef kim_os_string_get_cfstring_for_key (kim_string_t in_key_string)
+CFStringRef kim_os_string_get_cfstring_for_key (kim_string in_key_string)
{
CFStringRef key = NULL;
CFStringRef value = NULL;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_string_create_from_cfstring (kim_string_t *out_string,
+kim_error kim_os_string_create_from_cfstring (kim_string *out_string,
CFStringRef in_cfstring)
{
- kim_error_t err = KIM_NO_ERROR;
- kim_string_t string = NULL;
+ kim_error err = KIM_NO_ERROR;
+ kim_string string = NULL;
CFStringEncoding encoding = kim_os_string_get_encoding ();
CFIndex length = 0;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_string_create_for_key (kim_string_t *out_string,
- kim_string_t in_key_string)
+kim_error kim_os_string_create_for_key (kim_string *out_string,
+ kim_string in_key_string)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef value = NULL;
if (!err && !out_string ) { err = param_error (1, "out_string", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_string_get_cfstring (kim_string_t in_string,
+kim_error kim_os_string_get_cfstring (kim_string in_string,
CFStringRef *out_cfstring)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef cfstring = NULL;
if (!err && !in_string ) { err = param_error (1, "in_string", "NULL"); }
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_string_compare (kim_string_t in_string,
- kim_string_t in_compare_to_string,
- kim_comparison_t *out_comparison)
+kim_error kim_os_string_compare (kim_string in_string,
+ kim_string in_compare_to_string,
+ kim_comparison *out_comparison)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef cfstring = NULL;
CFStringRef compare_to_cfstring = NULL;
/* ------------------------------------------------------------------------ */
-kim_error_t kim_os_string_compare_to_cfstring (kim_string_t in_string,
+kim_error kim_os_string_compare_to_cfstring (kim_string in_string,
CFStringRef in_compare_to_cfstring,
- kim_comparison_t *out_comparison)
+ kim_comparison *out_comparison)
{
- kim_error_t err = KIM_NO_ERROR;
+ kim_error err = KIM_NO_ERROR;
CFStringRef cfstring = NULL;
if (!err && !in_string ) { err = param_error (1, "in_string", "NULL"); }
void fail_if_error (kim_test_state_t in_state,
const char *in_function,
- kim_error_t in_err,
+ kim_error in_err,
const char *in_format,
...)
{
void fail_if_error_code (kim_test_state_t in_state,
const char *in_function,
- kim_error_code_t in_code,
+ kim_error_code in_code,
const char *in_format,
...)
{
void fail_if_error (kim_test_state_t in_state,
const char *in_function,
- kim_error_t in_err,
+ kim_error in_err,
const char *in_format,
...)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
void fail_if_error_code (kim_test_state_t in_state,
const char *in_function,
- kim_error_code_t in_code,
+ kim_error_code in_code,
const char *in_format,
...)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
typedef struct test_identity_d {
const char *string;
const char *display_string;
- kim_boolean_t is_tgt_service;
+ kim_boolean is_tgt_service;
const char *realm;
- kim_count_t component_count;
+ kim_count component_count;
const char *components[5];
} test_identity_t;
void test_kim_identity_create_from_krb5_principal (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_create_from_krb5_principal");
for (i = 0; test_identities[i].string; i++) {
krb5_error_code code = 0;
- kim_error_t err = NULL;
+ kim_error err = NULL;
krb5_context context = NULL;
krb5_principal principal = NULL;
- kim_identity_t identity = NULL;
- kim_string_t string = NULL;
+ kim_identity identity = NULL;
+ kim_string string = NULL;
printf (".");
void test_kim_identity_create_from_string (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_create_from_string");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_string_t string = NULL;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_string string = NULL;
printf (".");
void test_kim_identity_copy (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_copy");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_identity_t identity_copy = NULL;
- kim_string_t string = NULL;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_identity identity_copy = NULL;
+ kim_string string = NULL;
printf (".");
void test_kim_identity_compare (kim_test_state_t state)
{
- kim_count_t i, j = 0;
+ kim_count i, j = 0;
start_test (state, "kim_identity_create_from_string");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
printf (".");
test_identities[i].string);
for (j = 0; !err && test_identities[j].string; j++) {
- kim_identity_t compare_to_identity = NULL;
- kim_comparison_t comparison = 0;
+ kim_identity compare_to_identity = NULL;
+ kim_comparison comparison = 0;
err = kim_identity_create_from_string (&compare_to_identity, test_identities[j].string);
fail_if_error (state, "kim_identity_create_from_string", err,
void test_kim_identity_get_display_string (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_get_display_string");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_string_t string = NULL;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_string string = NULL;
printf (".");
void test_kim_identity_get_realm (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_get_realm");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_string_t realm = NULL;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_string realm = NULL;
printf (".");
void test_kim_identity_get_number_of_components (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_get_number_of_components");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_count_t count = 0;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_count count = 0;
printf (".");
void test_kim_identity_get_component_at_index (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_get_component_at_index");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
- kim_identity_t identity = NULL;
- kim_count_t c = 0;
+ kim_error err = NULL;
+ kim_identity identity = NULL;
+ kim_count c = 0;
printf (".");
}
for (c = 0; !err && c < test_identities[i].component_count; c++) {
- kim_string_t component = NULL;
+ kim_string component = NULL;
err = kim_identity_get_component_at_index (identity, c, &component);
fail_if_error (state, "kim_identity_get_component_at_index", err,
void test_kim_identity_get_krb5_principal (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_get_krb5_principal");
for (i = 0; test_identities[i].string; i++) {
krb5_error_code code = 0;
- kim_error_t err = NULL;
+ kim_error err = NULL;
krb5_context context = NULL;
krb5_principal principal = NULL;
krb5_principal identity_principal = NULL;
- kim_identity_t identity = NULL;
+ kim_identity identity = NULL;
printf (".");
/*
void test_kim_identity_is_tgt_service (kim_test_state_t state)
{
- kim_count_t i = 0;
+ kim_count i = 0;
start_test (state, "kim_identity_is_tgt_service");
for (i = 0; test_identities[i].string; i++) {
- kim_error_t err = NULL;
+ kim_error err = NULL;
kim_identity_t identity = NULL;
kim_boolean_t is_tgt_service = 0;
start_test (state, "kim_preferences_create");
{
- kim_error_t err = NULL;
- kim_preferences_t prefs = NULL;
+ kim_error err = NULL;
+ kim_preferences prefs = NULL;
err = kim_preferences_create (&prefs);
fail_if_error (state, "kim_preferences_create", err,
start_test (state, "test_kim_preferences_copy");
{
- kim_error_t err = NULL;
- kim_preferences_t prefs = NULL;
- kim_preferences_t prefs_copy = NULL;
+ kim_error err = NULL;
+ kim_preferences prefs = NULL;
+ kim_preferences prefs_copy = NULL;
err = kim_preferences_create (&prefs);
fail_if_error (state, "kim_preferences_create", err,
start_test (state, "kim_preferences_set_options");
{
- kim_error_t err = NULL;
- kim_preferences_t prefs = NULL;
- kim_options_t old_options = NULL;
- kim_options_t new_options = NULL;
- kim_options_t verify_options = NULL;
+ kim_error err = NULL;
+ kim_preferences prefs = NULL;
+ kim_options old_options = NULL;
+ kim_options new_options = NULL;
+ kim_options verify_options = NULL;
const char *custom_data = "Some custom data";
const char *verify_custom_data = NULL;
start_test (state, "kim_preferences_set_remember_options");
{
- kim_error_t err = NULL;
- kim_preferences_t prefs = NULL;
- kim_boolean_t remember_options = FALSE;
+ kim_error err = NULL;
+ kim_preferences prefs = NULL;
+ kim_boolean remember_options = FALSE;
err = kim_preferences_create (&prefs);
fail_if_error (state, "kim_preferences_create", err,
start_test (state, "kim_preferences_set_client_identity");
{
- kim_error_t err = NULL;
- kim_preferences_t prefs = NULL;
- kim_string_t test_string = "user@EXAMPLE.COM";
- kim_identity_t test_identity = KIM_IDENTITY_ANY;
- kim_string_t string = NULL;
- kim_identity_t identity = KIM_IDENTITY_ANY;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_preferences prefs = NULL;
+ kim_string test_string = "user@EXAMPLE.COM";
+ kim_identity test_identity = KIM_IDENTITY_ANY;
+ kim_string string = NULL;
+ kim_identity identity = KIM_IDENTITY_ANY;
+ kim_comparison comparison = 0;
err = kim_preferences_create (&prefs);
fail_if_error (state, "kim_preferences_create", err,
void test_kim_selection_hints_set_service_identity_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_identity_t service_identity = NULL;
- kim_identity_t identity = KIM_IDENTITY_ANY;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_identity service_identity = NULL;
+ kim_identity identity = KIM_IDENTITY_ANY;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_service_identity_hint");
void test_kim_selection_hints_set_client_realm_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_client_realm_hint");
void test_kim_selection_hints_set_user_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_user_hint");
void test_kim_selection_hints_set_service_realm_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_service_realm_hint");
void test_kim_selection_hints_set_service_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_service_hint");
void test_kim_selection_hints_set_server_hint (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_string_t string = NULL;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_string string = NULL;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_set_server_hint");
void test_kim_selection_hints_remember_identity (kim_test_state_t state)
{
- kim_error_t err = NULL;
- kim_selection_hints_t hints = NULL;
- kim_identity_t service_identity = NULL;
- kim_identity_t client_identity = NULL;
- kim_string_t string = NULL;
- kim_identity_t identity = KIM_IDENTITY_ANY;
- kim_comparison_t comparison = 0;
+ kim_error err = NULL;
+ kim_selection_hints hints = NULL;
+ kim_identity service_identity = NULL;
+ kim_identity client_identity = NULL;
+ kim_string string = NULL;
+ kim_identity identity = KIM_IDENTITY_ANY;
+ kim_comparison comparison = 0;
start_test (state, "kim_selection_hints_remember_identity");