Lines Matching refs:krb5
98 struct kerberos5data *krb5, in Curl_auth_create_gssapi_user_message() argument
112 if(!krb5->spn) { in Curl_auth_create_gssapi_user_message()
114 krb5->spn = Curl_auth_build_spn(service, host, NULL); in Curl_auth_create_gssapi_user_message()
115 if(!krb5->spn) in Curl_auth_create_gssapi_user_message()
119 if(!krb5->output_token) { in Curl_auth_create_gssapi_user_message()
129 krb5->token_max = SecurityPackage->cbMaxToken; in Curl_auth_create_gssapi_user_message()
135 krb5->output_token = malloc(krb5->token_max); in Curl_auth_create_gssapi_user_message()
136 if(!krb5->output_token) in Curl_auth_create_gssapi_user_message()
140 if(!krb5->credentials) { in Curl_auth_create_gssapi_user_message()
144 result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity); in Curl_auth_create_gssapi_user_message()
149 krb5->p_identity = &krb5->identity; in Curl_auth_create_gssapi_user_message()
153 krb5->p_identity = NULL; in Curl_auth_create_gssapi_user_message()
156 krb5->credentials = calloc(1, sizeof(CredHandle)); in Curl_auth_create_gssapi_user_message()
157 if(!krb5->credentials) in Curl_auth_create_gssapi_user_message()
165 krb5->p_identity, NULL, NULL, in Curl_auth_create_gssapi_user_message()
166 krb5->credentials, &expiry); in Curl_auth_create_gssapi_user_message()
171 krb5->context = calloc(1, sizeof(CtxtHandle)); in Curl_auth_create_gssapi_user_message()
172 if(!krb5->context) in Curl_auth_create_gssapi_user_message()
196 resp_buf.pvBuffer = krb5->output_token; in Curl_auth_create_gssapi_user_message()
197 resp_buf.cbBuffer = curlx_uztoul(krb5->token_max); in Curl_auth_create_gssapi_user_message()
200 status = Curl_pSecFn->InitializeSecurityContext(krb5->credentials, in Curl_auth_create_gssapi_user_message()
201 chlg ? krb5->context : NULL, in Curl_auth_create_gssapi_user_message()
202 krb5->spn, in Curl_auth_create_gssapi_user_message()
217 if(memcmp(&context, krb5->context, sizeof(context))) { in Curl_auth_create_gssapi_user_message()
218 Curl_pSecFn->DeleteSecurityContext(krb5->context); in Curl_auth_create_gssapi_user_message()
220 memcpy(krb5->context, &context, sizeof(context)); in Curl_auth_create_gssapi_user_message()
253 struct kerberos5data *krb5, in Curl_auth_create_gssapi_security_message() argument
285 status = Curl_pSecFn->QueryContextAttributes(krb5->context, in Curl_auth_create_gssapi_security_message()
307 status = Curl_pSecFn->DecryptMessage(krb5->context, &input_desc, 0, &qop); in Curl_auth_create_gssapi_security_message()
395 status = Curl_pSecFn->EncryptMessage(krb5->context, KERB_WRAP_NO_ENCRYPT, in Curl_auth_create_gssapi_security_message()
447 void Curl_auth_cleanup_gssapi(struct kerberos5data *krb5) in Curl_auth_cleanup_gssapi() argument
450 if(krb5->context) { in Curl_auth_cleanup_gssapi()
451 Curl_pSecFn->DeleteSecurityContext(krb5->context); in Curl_auth_cleanup_gssapi()
452 free(krb5->context); in Curl_auth_cleanup_gssapi()
453 krb5->context = NULL; in Curl_auth_cleanup_gssapi()
457 if(krb5->credentials) { in Curl_auth_cleanup_gssapi()
458 Curl_pSecFn->FreeCredentialsHandle(krb5->credentials); in Curl_auth_cleanup_gssapi()
459 free(krb5->credentials); in Curl_auth_cleanup_gssapi()
460 krb5->credentials = NULL; in Curl_auth_cleanup_gssapi()
464 Curl_sspi_free_identity(krb5->p_identity); in Curl_auth_cleanup_gssapi()
465 krb5->p_identity = NULL; in Curl_auth_cleanup_gssapi()
468 Curl_safefree(krb5->spn); in Curl_auth_cleanup_gssapi()
469 Curl_safefree(krb5->output_token); in Curl_auth_cleanup_gssapi()
472 krb5->token_max = 0; in Curl_auth_cleanup_gssapi()