Lines Matching refs:handle
113 gsskrb5_cred handle in acquire_initiator_cred() argument
142 if (handle->principal) { in acquire_initiator_cred()
144 handle->principal, in acquire_initiator_cred()
163 } else if (handle->principal == NULL) { in acquire_initiator_cred()
164 kret = krb5_copy_principal(context, def_princ, &handle->principal); in acquire_initiator_cred()
167 } else if (handle->principal != NULL && in acquire_initiator_cred()
168 krb5_principal_compare(context, handle->principal, in acquire_initiator_cred()
179 if (handle->principal == NULL) { in acquire_initiator_cred()
180 kret = krb5_get_default_principal(context, &handle->principal); in acquire_initiator_cred()
194 handle->principal, in acquire_initiator_cred()
204 handle->principal, keytab, in acquire_initiator_cred()
224 handle->lifetime = cred.times.endtime; in acquire_initiator_cred()
225 handle->cred_flags |= GSS_CF_DESTROY_CRED_ON_RELEASE; in acquire_initiator_cred()
231 handle->principal, in acquire_initiator_cred()
232 &handle->lifetime); in acquire_initiator_cred()
240 handle->ccache = ccache; in acquire_initiator_cred()
264 gsskrb5_cred handle in acquire_acceptor_cred() argument
277 kret = get_keytab(context, &handle->keytab); in acquire_acceptor_cred()
282 if (handle->principal) { in acquire_acceptor_cred()
285 kret = krb5_kt_get_entry(context, handle->keytab, in acquire_acceptor_cred()
286 handle->principal, 0, 0, &entry); in acquire_acceptor_cred()
299 kret = krb5_kt_start_seq_get (context, handle->keytab, &c); in acquire_acceptor_cred()
302 if (krb5_kt_next_entry(context, handle->keytab, &tmp, &c) == 0) { in acquire_acceptor_cred()
306 krb5_kt_end_seq_get (context, handle->keytab, &c); in acquire_acceptor_cred()
310 if (handle->keytab != NULL) in acquire_acceptor_cred()
311 krb5_kt_close(context, handle->keytab); in acquire_acceptor_cred()
379 gsskrb5_cred handle; in _gsskrb5_acquire_cred_ext() local
393 handle = calloc(1, sizeof(*handle)); in _gsskrb5_acquire_cred_ext()
394 if (handle == NULL) { in _gsskrb5_acquire_cred_ext()
399 HEIMDAL_MUTEX_init(&handle->cred_id_mutex); in _gsskrb5_acquire_cred_ext()
403 desired_name, &handle->principal); in _gsskrb5_acquire_cred_ext()
405 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex); in _gsskrb5_acquire_cred_ext()
406 free(handle); in _gsskrb5_acquire_cred_ext()
414 desired_mech, cred_usage, handle); in _gsskrb5_acquire_cred_ext()
416 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex); in _gsskrb5_acquire_cred_ext()
417 krb5_free_principal(context, handle->principal); in _gsskrb5_acquire_cred_ext()
418 free(handle); in _gsskrb5_acquire_cred_ext()
426 desired_mech, cred_usage, handle); in _gsskrb5_acquire_cred_ext()
428 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex); in _gsskrb5_acquire_cred_ext()
429 krb5_free_principal(context, handle->principal); in _gsskrb5_acquire_cred_ext()
430 free(handle); in _gsskrb5_acquire_cred_ext()
434 ret = gss_create_empty_oid_set(minor_status, &handle->mechanisms); in _gsskrb5_acquire_cred_ext()
437 &handle->mechanisms); in _gsskrb5_acquire_cred_ext()
439 if (handle->mechanisms != NULL) in _gsskrb5_acquire_cred_ext()
440 gss_release_oid_set(NULL, &handle->mechanisms); in _gsskrb5_acquire_cred_ext()
441 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex); in _gsskrb5_acquire_cred_ext()
442 krb5_free_principal(context, handle->principal); in _gsskrb5_acquire_cred_ext()
443 free(handle); in _gsskrb5_acquire_cred_ext()
446 handle->usage = cred_usage; in _gsskrb5_acquire_cred_ext()
448 *output_cred_handle = (gss_cred_id_t)handle; in _gsskrb5_acquire_cred_ext()