Lines Matching refs:nego

95                                          struct negotiatedata *nego)  in Curl_auth_decode_spnego_message()  argument
112 if(nego->context && nego->status == SEC_E_OK) { in Curl_auth_decode_spnego_message()
116 Curl_auth_cleanup_spnego(nego); in Curl_auth_decode_spnego_message()
120 if(!nego->spn) { in Curl_auth_decode_spnego_message()
122 nego->spn = Curl_auth_build_spn(service, host, NULL); in Curl_auth_decode_spnego_message()
123 if(!nego->spn) in Curl_auth_decode_spnego_message()
127 if(!nego->output_token) { in Curl_auth_decode_spnego_message()
129 nego->status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) in Curl_auth_decode_spnego_message()
132 if(nego->status != SEC_E_OK) { in Curl_auth_decode_spnego_message()
137 nego->token_max = SecurityPackage->cbMaxToken; in Curl_auth_decode_spnego_message()
143 nego->output_token = malloc(nego->token_max); in Curl_auth_decode_spnego_message()
144 if(!nego->output_token) in Curl_auth_decode_spnego_message()
148 if(!nego->credentials) { in Curl_auth_decode_spnego_message()
152 result = Curl_create_sspi_identity(user, password, &nego->identity); in Curl_auth_decode_spnego_message()
157 nego->p_identity = &nego->identity; in Curl_auth_decode_spnego_message()
161 nego->p_identity = NULL; in Curl_auth_decode_spnego_message()
164 nego->credentials = calloc(1, sizeof(CredHandle)); in Curl_auth_decode_spnego_message()
165 if(!nego->credentials) in Curl_auth_decode_spnego_message()
169 nego->status = in Curl_auth_decode_spnego_message()
173 nego->p_identity, NULL, NULL, in Curl_auth_decode_spnego_message()
174 nego->credentials, &expiry); in Curl_auth_decode_spnego_message()
175 if(nego->status != SEC_E_OK) in Curl_auth_decode_spnego_message()
179 nego->context = calloc(1, sizeof(CtxtHandle)); in Curl_auth_decode_spnego_message()
180 if(!nego->context) in Curl_auth_decode_spnego_message()
216 if(nego->sslContext) { in Curl_auth_decode_spnego_message()
220 nego->status = s_pSecFn->QueryContextAttributes( in Curl_auth_decode_spnego_message()
221 nego->sslContext, in Curl_auth_decode_spnego_message()
225 if(nego->status == SEC_E_OK) { in Curl_auth_decode_spnego_message()
240 resp_buf.pvBuffer = nego->output_token; in Curl_auth_decode_spnego_message()
241 resp_buf.cbBuffer = curlx_uztoul(nego->token_max); in Curl_auth_decode_spnego_message()
244 nego->status = s_pSecFn->InitializeSecurityContext(nego->credentials, in Curl_auth_decode_spnego_message()
245 chlg ? nego->context : in Curl_auth_decode_spnego_message()
247 nego->spn, in Curl_auth_decode_spnego_message()
251 0, nego->context, in Curl_auth_decode_spnego_message()
258 if(GSS_ERROR(nego->status)) { in Curl_auth_decode_spnego_message()
261 Curl_sspi_strerror(nego->status, buffer, sizeof(buffer))); in Curl_auth_decode_spnego_message()
263 if(nego->status == (DWORD)SEC_E_INSUFFICIENT_MEMORY) in Curl_auth_decode_spnego_message()
269 if(nego->status == SEC_I_COMPLETE_NEEDED || in Curl_auth_decode_spnego_message()
270 nego->status == SEC_I_COMPLETE_AND_CONTINUE) { in Curl_auth_decode_spnego_message()
271 nego->status = s_pSecFn->CompleteAuthToken(nego->context, &resp_desc); in Curl_auth_decode_spnego_message()
272 if(GSS_ERROR(nego->status)) { in Curl_auth_decode_spnego_message()
275 Curl_sspi_strerror(nego->status, buffer, sizeof(buffer))); in Curl_auth_decode_spnego_message()
277 if(nego->status == (DWORD)SEC_E_INSUFFICIENT_MEMORY) in Curl_auth_decode_spnego_message()
284 nego->output_token_length = resp_buf.cbBuffer; in Curl_auth_decode_spnego_message()
306 struct negotiatedata *nego, in Curl_auth_create_spnego_message() argument
313 (const char *) nego->output_token, in Curl_auth_create_spnego_message()
314 nego->output_token_length, in Curl_auth_create_spnego_message()
338 void Curl_auth_cleanup_spnego(struct negotiatedata *nego) in Curl_auth_cleanup_spnego() argument
341 if(nego->context) { in Curl_auth_cleanup_spnego()
342 s_pSecFn->DeleteSecurityContext(nego->context); in Curl_auth_cleanup_spnego()
343 free(nego->context); in Curl_auth_cleanup_spnego()
344 nego->context = NULL; in Curl_auth_cleanup_spnego()
348 if(nego->credentials) { in Curl_auth_cleanup_spnego()
349 s_pSecFn->FreeCredentialsHandle(nego->credentials); in Curl_auth_cleanup_spnego()
350 free(nego->credentials); in Curl_auth_cleanup_spnego()
351 nego->credentials = NULL; in Curl_auth_cleanup_spnego()
355 Curl_sspi_free_identity(nego->p_identity); in Curl_auth_cleanup_spnego()
356 nego->p_identity = NULL; in Curl_auth_cleanup_spnego()
359 Curl_safefree(nego->spn); in Curl_auth_cleanup_spnego()
360 Curl_safefree(nego->output_token); in Curl_auth_cleanup_spnego()
363 nego->status = 0; in Curl_auth_cleanup_spnego()
364 nego->token_max = 0; in Curl_auth_cleanup_spnego()
365 nego->noauthpersist = FALSE; in Curl_auth_cleanup_spnego()
366 nego->havenoauthpersist = FALSE; in Curl_auth_cleanup_spnego()
367 nego->havenegdata = FALSE; in Curl_auth_cleanup_spnego()
368 nego->havemultiplerequests = FALSE; in Curl_auth_cleanup_spnego()