aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/vauth/digest_sspi.c11
-rw-r--r--lib/vauth/krb5_sspi.c12
-rw-r--r--lib/vauth/ntlm_sspi.c11
-rw-r--r--lib/vauth/spnego_sspi.c12
4 files changed, 34 insertions, 12 deletions
diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c
index 9254385e5..1cc704d58 100644
--- a/lib/vauth/digest_sspi.c
+++ b/lib/vauth/digest_sspi.c
@@ -54,9 +54,14 @@
*/
bool Curl_auth_is_digest_supported(void)
{
- /* TODO: Return true for now which maintains compatability with the existing
- code */
- return TRUE;
+ PSecPkgInfo SecurityPackage;
+ SECURITY_STATUS status;
+
+ /* Query the security package for Digest */
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
+ &SecurityPackage);
+
+ return (status == SEC_E_OK ? TRUE : FALSE);
}
/*
diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c
index e04690046..151794e61 100644
--- a/lib/vauth/krb5_sspi.c
+++ b/lib/vauth/krb5_sspi.c
@@ -50,9 +50,15 @@
*/
bool Curl_auth_is_gssapi_supported(void)
{
- /* TODO: Return true for now which maintains compatability with the existing
- code */
- return TRUE;
+ PSecPkgInfo SecurityPackage;
+ SECURITY_STATUS status;
+
+ /* Query the security package for Kerberos */
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *)
+ TEXT(SP_NAME_KERBEROS),
+ &SecurityPackage);
+
+ return (status == SEC_E_OK ? TRUE : FALSE);
}
/*
diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c
index 6f446780e..c3305176d 100644
--- a/lib/vauth/ntlm_sspi.c
+++ b/lib/vauth/ntlm_sspi.c
@@ -48,9 +48,14 @@
*/
bool Curl_auth_is_ntlm_supported(void)
{
- /* TODO: Return true for now which maintains compatability with the existing
- code */
- return TRUE;
+ PSecPkgInfo SecurityPackage;
+ SECURITY_STATUS status;
+
+ /* Query the security package for NTLM */
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
+ &SecurityPackage);
+
+ return (status == SEC_E_OK ? TRUE : FALSE);
}
/*
diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c
index f83c44632..672b43fa4 100644
--- a/lib/vauth/spnego_sspi.c
+++ b/lib/vauth/spnego_sspi.c
@@ -50,9 +50,15 @@
*/
bool Curl_auth_is_spnego_supported(void)
{
- /* TODO: Return true for now which maintains compatability with the existing
- code */
- return TRUE;
+ PSecPkgInfo SecurityPackage;
+ SECURITY_STATUS status;
+
+ /* Query the security package for Negotiate */
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *)
+ TEXT(SP_NAME_NEGOTIATE),
+ &SecurityPackage);
+
+ return (status == SEC_E_OK ? TRUE : FALSE);
}
/*