summaryrefslogtreecommitdiff
path: root/lib/vauth
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-07 09:44:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-07 12:58:57 +0200
commit2a81439553286f12cd04a4bdcdf66d8e026d8201 (patch)
treea587b2027f1fc8e3ad4c32c05268aaa39b62763b /lib/vauth
parentcad1f46ce3b4c3483ee14903c7f06aace11deef0 (diff)
downloadcurl-2a81439553286f12cd04a4bdcdf66d8e026d8201.tar.gz
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
Diffstat (limited to 'lib/vauth')
-rw-r--r--lib/vauth/ntlm_sspi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c
index cd6cb79c1..84ea51dad 100644
--- a/lib/vauth/ntlm_sspi.c
+++ b/lib/vauth/ntlm_sspi.c
@@ -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
* 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 */
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
&SecurityPackage);
- if(status != SEC_E_OK)
- return CURLE_NOT_BUILT_IN;
+ if(status != SEC_E_OK) {
+ failf(data, "SSPI: couldn't get auth info\n");
+ return CURLE_AUTH_ERROR;
+ }
ntlm->token_max = SecurityPackage->cbMaxToken;