Lines Matching refs:nego
89 struct negotiatedata *nego) in Curl_auth_decode_spnego_message() argument
106 if(nego->context && nego->status == SEC_E_OK) { in Curl_auth_decode_spnego_message()
110 Curl_auth_spnego_cleanup(nego); in Curl_auth_decode_spnego_message()
114 if(!nego->spn) { in Curl_auth_decode_spnego_message()
116 nego->spn = Curl_auth_build_spn(service, host, NULL); in Curl_auth_decode_spnego_message()
117 if(!nego->spn) in Curl_auth_decode_spnego_message()
121 if(!nego->output_token) { in Curl_auth_decode_spnego_message()
123 nego->status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) in Curl_auth_decode_spnego_message()
126 if(nego->status != SEC_E_OK) in Curl_auth_decode_spnego_message()
129 nego->token_max = SecurityPackage->cbMaxToken; in Curl_auth_decode_spnego_message()
135 nego->output_token = malloc(nego->token_max); in Curl_auth_decode_spnego_message()
136 if(!nego->output_token) in Curl_auth_decode_spnego_message()
140 if(!nego->credentials) { in Curl_auth_decode_spnego_message()
144 result = Curl_create_sspi_identity(user, password, &nego->identity); in Curl_auth_decode_spnego_message()
149 nego->p_identity = &nego->identity; in Curl_auth_decode_spnego_message()
153 nego->p_identity = NULL; in Curl_auth_decode_spnego_message()
156 nego->credentials = calloc(1, sizeof(CredHandle)); in Curl_auth_decode_spnego_message()
157 if(!nego->credentials) in Curl_auth_decode_spnego_message()
161 nego->status = in Curl_auth_decode_spnego_message()
165 nego->p_identity, NULL, NULL, in Curl_auth_decode_spnego_message()
166 nego->credentials, &expiry); in Curl_auth_decode_spnego_message()
167 if(nego->status != SEC_E_OK) in Curl_auth_decode_spnego_message()
171 nego->context = calloc(1, sizeof(CtxtHandle)); in Curl_auth_decode_spnego_message()
172 if(!nego->context) in Curl_auth_decode_spnego_message()
208 if(nego->sslContext) { in Curl_auth_decode_spnego_message()
212 nego->status = s_pSecFn->QueryContextAttributes( in Curl_auth_decode_spnego_message()
213 nego->sslContext, in Curl_auth_decode_spnego_message()
217 if(nego->status == SEC_E_OK) { in Curl_auth_decode_spnego_message()
232 resp_buf.pvBuffer = nego->output_token; in Curl_auth_decode_spnego_message()
233 resp_buf.cbBuffer = curlx_uztoul(nego->token_max); in Curl_auth_decode_spnego_message()
236 nego->status = s_pSecFn->InitializeSecurityContext(nego->credentials, in Curl_auth_decode_spnego_message()
237 chlg ? nego->context : in Curl_auth_decode_spnego_message()
239 nego->spn, in Curl_auth_decode_spnego_message()
243 0, nego->context, in Curl_auth_decode_spnego_message()
250 if(GSS_ERROR(nego->status)) { in Curl_auth_decode_spnego_message()
253 Curl_sspi_strerror(nego->status, buffer, sizeof(buffer))); in Curl_auth_decode_spnego_message()
257 if(nego->status == SEC_I_COMPLETE_NEEDED || in Curl_auth_decode_spnego_message()
258 nego->status == SEC_I_COMPLETE_AND_CONTINUE) { in Curl_auth_decode_spnego_message()
259 nego->status = s_pSecFn->CompleteAuthToken(nego->context, &resp_desc); in Curl_auth_decode_spnego_message()
260 if(GSS_ERROR(nego->status)) { in Curl_auth_decode_spnego_message()
265 nego->output_token_length = resp_buf.cbBuffer; in Curl_auth_decode_spnego_message()
287 struct negotiatedata *nego, in Curl_auth_create_spnego_message() argument
294 (const char *) nego->output_token, in Curl_auth_create_spnego_message()
295 nego->output_token_length, in Curl_auth_create_spnego_message()
319 void Curl_auth_spnego_cleanup(struct negotiatedata *nego) in Curl_auth_spnego_cleanup() argument
322 if(nego->context) { in Curl_auth_spnego_cleanup()
323 s_pSecFn->DeleteSecurityContext(nego->context); in Curl_auth_spnego_cleanup()
324 free(nego->context); in Curl_auth_spnego_cleanup()
325 nego->context = NULL; in Curl_auth_spnego_cleanup()
329 if(nego->credentials) { in Curl_auth_spnego_cleanup()
330 s_pSecFn->FreeCredentialsHandle(nego->credentials); in Curl_auth_spnego_cleanup()
331 free(nego->credentials); in Curl_auth_spnego_cleanup()
332 nego->credentials = NULL; in Curl_auth_spnego_cleanup()
336 Curl_sspi_free_identity(nego->p_identity); in Curl_auth_spnego_cleanup()
337 nego->p_identity = NULL; in Curl_auth_spnego_cleanup()
340 Curl_safefree(nego->spn); in Curl_auth_spnego_cleanup()
341 Curl_safefree(nego->output_token); in Curl_auth_spnego_cleanup()
344 nego->status = 0; in Curl_auth_spnego_cleanup()
345 nego->token_max = 0; in Curl_auth_spnego_cleanup()
346 nego->state = GSS_AUTHNONE; in Curl_auth_spnego_cleanup()
347 nego->noauthpersist = FALSE; in Curl_auth_spnego_cleanup()
348 nego->havenoauthpersist = FALSE; in Curl_auth_spnego_cleanup()
349 nego->havenegdata = FALSE; in Curl_auth_spnego_cleanup()
350 nego->havemultiplerequests = FALSE; in Curl_auth_spnego_cleanup()