mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:21:41 +03:00
curl_ntlm_core: merge two #if blocks
Cherry-picked from #20593 Closes #20620
This commit is contained in:
parent
dc08922a61
commit
633ec719d5
1 changed files with 10 additions and 14 deletions
|
|
@ -405,20 +405,6 @@ static void ascii_to_unicode_le(unsigned char *dest, const char *src,
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef USE_WINDOWS_SSPI
|
||||
|
||||
static void ascii_uppercase_to_unicode_le(unsigned char *dest,
|
||||
const char *src, size_t srclen)
|
||||
{
|
||||
size_t i;
|
||||
for(i = 0; i < srclen; i++) {
|
||||
dest[2 * i] = (unsigned char)(Curl_raw_toupper(src[i]));
|
||||
dest[2 * i + 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !USE_WINDOWS_SSPI */
|
||||
|
||||
/*
|
||||
* Set up nt hashed passwords
|
||||
* @unittest: 1600
|
||||
|
|
@ -502,6 +488,16 @@ static void time2filetime(struct ms_filetime *ft, time_t t)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void ascii_uppercase_to_unicode_le(unsigned char *dest,
|
||||
const char *src, size_t srclen)
|
||||
{
|
||||
size_t i;
|
||||
for(i = 0; i < srclen; i++) {
|
||||
dest[2 * i] = (unsigned char)(Curl_raw_toupper(src[i]));
|
||||
dest[2 * i + 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode
|
||||
* (uppercase UserName + Domain) as the data
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue