From d62cb0f5d04597fa61ebfa6a5734b8283aa57646 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 5 Nov 2014 11:43:22 +0000 Subject: sspi: Define authentication package name constants These were previously hard coded, and whilst defined in security.h, they may or may not be present in old header files given that these defines were never used in the original code. Not only that, but there appears to be some ambiguity between the ANSI and UNICODE NTLM definition name in security.h. --- lib/curl_sasl_sspi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/curl_sasl_sspi.c') diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c index 9ae6f5d91..9dc2749a8 100644 --- a/lib/curl_sasl_sspi.c +++ b/lib/curl_sasl_sspi.c @@ -151,7 +151,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, return CURLE_BAD_CONTENT_ENCODING; /* Query the security package for DigestSSP */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("WDigest"), + status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), &SecurityPackage); if(status != SEC_E_OK) { Curl_safefree(chlg); @@ -201,7 +201,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, /* Acquire our credentials handle */ status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT("WDigest"), + (TCHAR *) TEXT(SP_NAME_DIGEST), SECPKG_CRED_OUTBOUND, NULL, p_identity, NULL, NULL, &handle, &expiry); @@ -321,7 +321,8 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data, if(!krb5->credentials) { /* Query the security package for Kerberos */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("Kerberos"), + status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) + TEXT(SP_NAME_KERBEROS), &SecurityPackage); if(status != SEC_E_OK) { return CURLE_NOT_BUILT_IN; @@ -364,7 +365,8 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data, /* Acquire our credentials handle */ status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT("Kerberos"), + (TCHAR *) + TEXT(SP_NAME_KERBEROS), SECPKG_CRED_OUTBOUND, NULL, krb5->p_identity, NULL, NULL, krb5->credentials, &expiry); -- cgit v1.2.3