Lines Matching refs:ntlm

87                                              struct ntlmdata *ntlm,  in Curl_auth_create_ntlm_type1_message()  argument
98 Curl_auth_ntlm_cleanup(ntlm); in Curl_auth_create_ntlm_type1_message()
106 ntlm->token_max = SecurityPackage->cbMaxToken; in Curl_auth_create_ntlm_type1_message()
112 ntlm->output_token = malloc(ntlm->token_max); in Curl_auth_create_ntlm_type1_message()
113 if(!ntlm->output_token) in Curl_auth_create_ntlm_type1_message()
120 result = Curl_create_sspi_identity(userp, passwdp, &ntlm->identity); in Curl_auth_create_ntlm_type1_message()
125 ntlm->p_identity = &ntlm->identity; in Curl_auth_create_ntlm_type1_message()
129 ntlm->p_identity = NULL; in Curl_auth_create_ntlm_type1_message()
132 ntlm->credentials = calloc(1, sizeof(CredHandle)); in Curl_auth_create_ntlm_type1_message()
133 if(!ntlm->credentials) in Curl_auth_create_ntlm_type1_message()
140 ntlm->p_identity, NULL, NULL, in Curl_auth_create_ntlm_type1_message()
141 ntlm->credentials, &expiry); in Curl_auth_create_ntlm_type1_message()
146 ntlm->context = calloc(1, sizeof(CtxtHandle)); in Curl_auth_create_ntlm_type1_message()
147 if(!ntlm->context) in Curl_auth_create_ntlm_type1_message()
150 ntlm->spn = Curl_auth_build_spn(service, host, NULL); in Curl_auth_create_ntlm_type1_message()
151 if(!ntlm->spn) in Curl_auth_create_ntlm_type1_message()
159 type_1_buf.pvBuffer = ntlm->output_token; in Curl_auth_create_ntlm_type1_message()
160 type_1_buf.cbBuffer = curlx_uztoul(ntlm->token_max); in Curl_auth_create_ntlm_type1_message()
163 status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL, in Curl_auth_create_ntlm_type1_message()
164 ntlm->spn, in Curl_auth_create_ntlm_type1_message()
167 ntlm->context, &type_1_desc, in Curl_auth_create_ntlm_type1_message()
171 s_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc); in Curl_auth_create_ntlm_type1_message()
176 return Curl_base64_encode(data, (char *) ntlm->output_token, in Curl_auth_create_ntlm_type1_message()
195 struct ntlmdata *ntlm) in Curl_auth_decode_ntlm_type2_message() argument
220 ntlm->input_token = type2; in Curl_auth_decode_ntlm_type2_message()
221 ntlm->input_token_len = type2_len; in Curl_auth_decode_ntlm_type2_message()
248 struct ntlmdata *ntlm, in Curl_auth_create_ntlm_type3_message() argument
268 type_2_bufs[0].pvBuffer = ntlm->input_token; in Curl_auth_create_ntlm_type3_message()
269 type_2_bufs[0].cbBuffer = curlx_uztoul(ntlm->input_token_len); in Curl_auth_create_ntlm_type3_message()
280 if(ntlm->sslContext) { in Curl_auth_create_ntlm_type3_message()
285 ntlm->sslContext, in Curl_auth_create_ntlm_type3_message()
303 type_3_buf.pvBuffer = ntlm->output_token; in Curl_auth_create_ntlm_type3_message()
304 type_3_buf.cbBuffer = curlx_uztoul(ntlm->token_max); in Curl_auth_create_ntlm_type3_message()
307 status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, in Curl_auth_create_ntlm_type3_message()
308 ntlm->context, in Curl_auth_create_ntlm_type3_message()
309 ntlm->spn, in Curl_auth_create_ntlm_type3_message()
312 0, ntlm->context, in Curl_auth_create_ntlm_type3_message()
323 result = Curl_base64_encode(data, (char *) ntlm->output_token, in Curl_auth_create_ntlm_type3_message()
326 Curl_auth_ntlm_cleanup(ntlm); in Curl_auth_create_ntlm_type3_message()
341 void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm) in Curl_auth_ntlm_cleanup() argument
344 if(ntlm->context) { in Curl_auth_ntlm_cleanup()
345 s_pSecFn->DeleteSecurityContext(ntlm->context); in Curl_auth_ntlm_cleanup()
346 free(ntlm->context); in Curl_auth_ntlm_cleanup()
347 ntlm->context = NULL; in Curl_auth_ntlm_cleanup()
351 if(ntlm->credentials) { in Curl_auth_ntlm_cleanup()
352 s_pSecFn->FreeCredentialsHandle(ntlm->credentials); in Curl_auth_ntlm_cleanup()
353 free(ntlm->credentials); in Curl_auth_ntlm_cleanup()
354 ntlm->credentials = NULL; in Curl_auth_ntlm_cleanup()
358 Curl_sspi_free_identity(ntlm->p_identity); in Curl_auth_ntlm_cleanup()
359 ntlm->p_identity = NULL; in Curl_auth_ntlm_cleanup()
362 Curl_safefree(ntlm->input_token); in Curl_auth_ntlm_cleanup()
363 Curl_safefree(ntlm->output_token); in Curl_auth_ntlm_cleanup()
366 ntlm->token_max = 0; in Curl_auth_ntlm_cleanup()
368 Curl_safefree(ntlm->spn); in Curl_auth_ntlm_cleanup()