1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

ntlm_sspi: fix bad use of CURLE_NOT_BUILT_IN

That return code is reserved for build-time conditional code not being
present while this was a regular run-time error from a Windows API.

Reported-by: wangp on github
Fixes #5349
Closes #5350
This commit is contained in:
Daniel Stenberg 2020-05-07 09:44:00 +02:00
parent cad1f46ce3
commit 2a81439553
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -105,8 +105,10 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
/* Query the security package for NTLM */ /* Query the security package for NTLM */
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM), status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
&SecurityPackage); &SecurityPackage);
if(status != SEC_E_OK) if(status != SEC_E_OK) {
return CURLE_NOT_BUILT_IN; failf(data, "SSPI: couldn't get auth info\n");
return CURLE_AUTH_ERROR;
}
ntlm->token_max = SecurityPackage->cbMaxToken; ntlm->token_max = SecurityPackage->cbMaxToken;