Lines Matching defs:handle

96                            gsskrb5_cred handle)
123 if (handle->principal == NULL) {
124 kret = krb5_get_default_principal(context, &handle->principal);
132 realm = krb5_principal_get_realm(context, handle->principal);
148 kret = krb5_get_init_creds_password(context, &cred, handle->principal,
166 handle->cred_flags |= GSS_CF_DESTROY_CRED_ON_RELEASE;
169 handle->principal, &left);
172 handle->endtime = now + left;
173 handle->ccache = ccache;
197 gsskrb5_cred handle)
214 * Get current time early so we can set handle->endtime to a value that
233 if (handle->principal != NULL) {
239 handle->principal,
272 if (handle->principal == NULL ||
273 krb5_principal_compare(context, handle->principal,
281 if (handle->principal == NULL) {
282 kret = krb5_copy_principal(context, def_princ, &handle->principal);
296 if (handle->principal == NULL) {
298 kret = krb5_get_default_principal(context, &handle->principal);
310 kret = krb5_get_init_creds_keytab(context, &cred, handle->principal,
325 * AS exchange every time it acquires a credential handle. Hopefully
335 handle->cred_flags |= GSS_CF_DESTROY_CRED_ON_RELEASE;
346 assert(handle->principal != NULL);
348 handle->principal, &left);
351 handle->endtime = now + left;
352 handle->ccache = ccache;
359 if ((handle->cred_flags & GSS_CF_DESTROY_CRED_ON_RELEASE) != 0)
383 gsskrb5_cred handle)
390 kret = get_keytab(context, &handle->keytab);
395 if (handle->principal) {
398 kret = krb5_kt_get_entry(context, handle->keytab,
399 handle->principal, 0, 0, &entry);
412 kret = krb5_kt_start_seq_get (context, handle->keytab, &c);
415 if (krb5_kt_next_entry(context, handle->keytab, &tmp, &c) == 0) {
419 krb5_kt_end_seq_get (context, handle->keytab, &c);
423 if (handle->keytab != NULL)
424 krb5_kt_close(context, handle->keytab);
492 gsskrb5_cred handle;
507 handle = calloc(1, sizeof(*handle));
508 if (handle == NULL) {
513 HEIMDAL_MUTEX_init(&handle->cred_id_mutex);
517 desired_name, &handle->principal);
519 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
520 free(handle);
532 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
533 free(handle);
541 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
542 free(handle);
547 desired_mech, cred_usage, handle);
550 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
551 krb5_free_principal(context, handle->principal);
552 free(handle);
564 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
565 free(handle);
575 desired_mech, cred_usage, handle);
577 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
578 krb5_free_principal(context, handle->principal);
579 free(handle);
585 desired_mech, cred_usage, handle);
587 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
588 krb5_free_principal(context, handle->principal);
589 free(handle);
594 ret = gss_create_empty_oid_set(minor_status, &handle->mechanisms);
597 &handle->mechanisms);
599 if (handle->mechanisms != NULL)
600 gss_release_oid_set(NULL, &handle->mechanisms);
601 HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
602 krb5_free_principal(context, handle->principal);
603 free(handle);
606 handle->usage = cred_usage;
608 *output_cred_handle = (gss_cred_id_t)handle;