• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/lib/

Lines Matching defs:ntlm

30  * http://davenport.sourceforge.net/ntlm.html
31 * http://www.innovation.ch/java/ntlm.html
175 * This is used to decode the "target info" in the ntlm type-2 message
181 * buffer [in] - The decoded base64 ntlm header of Type 2
183 * ntlm [in] - Pointer to ntlm data struct being used and modified.
190 struct ntlmdata *ntlm)
195 Curl_safefree(ntlm->target_info);
196 ntlm->target_info_len = 0;
209 ntlm->target_info = malloc(target_info_len);
210 if(!ntlm->target_info)
213 memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len);
214 ntlm->target_info_len = target_info_len;
244 * This is used to decode a ntlm type-2 message received from a HTTP or SASL
246 * from a base64 string into a raw ntlm message and checked for validity
248 * the given ntlm data structure.
254 * ntlm [in] - Pointer to ntlm data struct being used and modified.
260 struct ntlmdata *ntlm)
300 ntlm->type_2 = malloc(size + 1);
301 if(ntlm->type_2 == NULL) {
305 ntlm->n_type_2 = curlx_uztoul(size);
306 memcpy(ntlm->type_2, buffer, size);
308 ntlm->flags = 0;
319 ntlm->flags = readint_le(&buffer[20]);
320 memcpy(ntlm->nonce, &buffer[24], 8);
322 if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
323 error = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm);
332 fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags);
333 ntlm_print_flags(stderr, ntlm->flags);
335 ntlm_print_hex(stderr, (char *)ntlm->nonce, 8);
346 void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm)
348 Curl_safefree(ntlm->type_2);
349 if(ntlm->has_handles) {
350 s_pSecFn->DeleteSecurityContext(&ntlm->c_handle);
351 s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
352 ntlm->has_handles = 0;
354 if(ntlm->p_identity) {
355 Curl_safefree(ntlm->identity.User);
356 Curl_safefree(ntlm->identity.Password);
357 Curl_safefree(ntlm->identity.Domain);
358 ntlm->p_identity = NULL;
387 * ntlm [in/out] - The ntlm data struct being used and modified.
396 struct ntlmdata *ntlm,
432 Curl_ntlm_sspi_cleanup(ntlm);
436 /* null initialize ntlm identity's data to allow proper cleanup */
437 ntlm->p_identity = &ntlm->identity;
438 memset(ntlm->p_identity, 0, sizeof(*ntlm->p_identity));
459 /* setup ntlm identity's user and length */
465 ntlm->identity.User = dup_user.tbyte_ptr;
466 ntlm->identity.UserLength = curlx_uztoul(_tcslen(dup_user.tchar_ptr));
469 /* setup ntlm identity's domain and length */
477 ntlm->identity.Domain = dup_domain.tbyte_ptr;
478 ntlm->identity.DomainLength = curlx_uztoul(domlen);
483 /* setup ntlm identity's password and length */
492 ntlm->identity.Password = dup_passwd.tbyte_ptr;
493 ntlm->identity.PasswordLength =
499 /* setup ntlm identity's flags */
500 ntlm->identity.Flags = SECFLAG_WINNT_AUTH_IDENTITY;
503 ntlm->p_identity = NULL;
508 ntlm->p_identity, NULL, NULL,
509 &ntlm->handle, &tsDummy);
520 status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL,
527 &ntlm->c_handle, &desc,
532 s_pSecFn->CompleteAuthToken(&ntlm->c_handle, &desc);
534 s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
538 ntlm->has_handles = 1;
552 (void)ntlm;
635 * ntlm [in/out] - The ntlm data struct being used and modified.
645 struct ntlmdata *ntlm,
689 type_2.pvBuffer = ntlm->type_2;
690 type_2.cbBuffer = ntlm->n_type_2;
695 status = s_pSecFn->InitializeSecurityContext(&ntlm->handle,
696 &ntlm->c_handle,
703 0, &ntlm->c_handle,
711 Curl_ntlm_sspi_cleanup(ntlm);
723 bool unicode = (ntlm->flags & NTLMFLAG_NEGOTIATE_UNICODE) ? TRUE : FALSE;
761 if(ntlm->target_info_len) {
784 res = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, entropy, &ntlm->nonce[0],
790 res = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, entropy, ntlm, &ntlmv2resp,
802 if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
818 memcpy(tmp, &ntlm->nonce[0], 8);
847 Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], ntresp);
851 Curl_ntlm_core_lm_resp(lmbuffer, &ntlm->nonce[0], lmresp);
853 * Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], lmresp);
854 * See http://davenport.sourceforge.net/ntlm.html#ntlmVersion2 */
955 LONGQUARTET(ntlm->flags));
989 LONGQUARTET(ntlm->flags), ntlm->flags);
990 ntlm_print_flags(stderr, ntlm->flags);