|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52232 cURL doesn't support GSSAPI by default
Submitted: 2010-07-02 10:15 UTC Modified: 2021-02-07 04:22 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: andres dot maier at abf dot ch Assigned: cmb (profile)
Status: No Feedback Package: cURL related
PHP Version: 5.3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: andres dot maier at abf dot ch
New email:
PHP Version: OS:


 [2010-07-02 10:15 UTC] andres dot maier at abf dot ch
Our clients use Kerberos for SSO and we noticed that cURL doesn't support the GSSAPI by default. We couldn't find any cURL binaries with GSSAPI support neither could we get it compiled on windows. It would be great to have GSSAPI support by default because kerberos is a very wide spread authentication.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-02 11:05 UTC]
I don't libgssapi works on windows. However windows supports this auth mechanism via SSPI. See:

And Winsspi is built into curl on windows. Did you try it? or is it what you are looking for?
 [2010-07-02 11:06 UTC]
-Status: Open +Status: Feedback
 [2010-07-02 11:06 UTC]
-PHP Version: Irrelevant +PHP Version: 5.3
 [2010-07-07 13:24 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-07 13:24 UTC] andres dot maier at abf dot ch
If it would work with winsspi then we should be able to set CURLAUTH_GSSNEGOTIATE as CURLOPT_HTTPAUTH option in cURL. But if we do so, false gets returned and we aren't able to delegate the authorization token of the client.
 [2010-07-07 16:48 UTC]
-Status: Open +Status: Feedback
 [2010-07-07 16:48 UTC]
I don't understand what you are saying sorry.

Does it work? If not, what does not work exactly (like the constants are not defined or the required protocols are not listed in the available features, via curl info)? The options are not available? or they are not used even when you set them?
 [2010-07-08 07:39 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-08 07:39 UTC] andres dot maier at abf dot ch
It doesn't work in my opinion. The option CURLOPT_HTTPAUTH can have multiple authentication types like CURLAUTH_BASIC (value), *NTLM, as well as CURLAUTH_GSSNEGOTIATE - which is used to authenticate with kerberos. When we set this option/auth type [curl_setopt(CURLOPT_HTTPAUTH, CURLAUTH_GSSNEGOTIATE)] we get false as return value - which means that GSSAPI (or SSPI) is not available and this property can not be used with the cURL extension.
 [2010-07-08 07:55 UTC]
-Status: Open +Status: Feedback
 [2010-07-08 07:55 UTC]

Did you try ANY_SAFE or using the bitwise operator for ntlm and GSS?

I suppose too that it is only in your comment that the curl_setopt misses the curl resource.
 [2010-07-08 08:15 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-08 08:15 UTC] andres dot maier at abf dot ch
NTLM is working, but GSS not. We allready tried that. But we need kerberos authentication - that's why we need gssnegotiate to work.
 [2010-07-08 08:23 UTC] andres dot maier at abf dot ch
in addition to understand our problem, you can visit another feature/change request located here:
 [2010-07-08 13:21 UTC]
ok, I don't seem to be able to get the details I need to actually see where is the point of failure.

I do not use kerberos, so I won't be able to test or debug it. However, if you can provide me an access to a box where I can actually test GSS for kerberos auth, then we may get one step further.

By the way, one thing that could help is to test using the curl command line tool. All features available through the API can be tested using the command line as well (see the curl website). Can you give it a try too please?

About soap, unrelated. Soap does not use Curl.
 [2010-07-08 14:36 UTC] andres dot maier at abf dot ch
I'll try your suggestion and give you feedback.
Why I posted this link is not because of soap. Please read the last paragraph about overriding __doRequest and rebuilding it with cURL. Maybe you can extract some usefull information about our problem or about our environment.
 [2021-01-28 17:51 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-01-28 17:51 UTC]
Is this issue still unresolved?  It seems to me that the provided
libcurl builds have SSPI enabled for many years, and according to
the cURL documentation[1], CURLAUTH_NEGOTIATE requires SSPI on

[1] <>
 [2021-02-07 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 11:01:24 2023 UTC