1

I would like to use curl with Kerberos

curl --negotiate '<SOME_ULR>'

or

curl --negotiate -u : '<SOME_ULR>'

But I got the error:

curl: option --negotiate: the installed libcurl version doesn't support this

My OS: OS X El Capitan

Curl version:

curl -V
curl 7.52.1 (x86_64-apple-darwin13.4.0) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

Any Ideas?

Babu
  • 2,579
  • 3
  • 31
  • 45
  • Just Google `download curl OSX` and skip the bogus results (ads etc) until you locate the official site i.e. `curl.haxx.se` >> https://curl.haxx.se/download.html#MacOSX >> then dig into the different sites mentioned there to find a recent binary version that supports _negotiate_ (note that versions reported in `curl.haxx.se` may be outdated) – Samson Scharfrichter Jul 17 '17 at 22:10

2 Answers2

1

you can try "--anyauth" option which tells curl to figure out authentication method by itself.

--anyauth

(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims it supports. This is done by first doing a request and checking the response-headers, thus inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with --basic, --digest, --ntlm, and --negotiate. (Added in 7.10.6)

Horace
  • 131
  • 1
  • 3
0

I found it. My problem was in curl version

Actuall curl version supporting --negotiate

curl -V

curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
Babu
  • 2,579
  • 3
  • 31
  • 45
  • 2
    Can you tell me how you get this older version installed ? TIA. – Olivier MATROT Jan 14 '18 at 09:23
  • Wait, so you had Curl version 7.52.1, and the version of Curl that supports --negotiate is Curl 7.43.0 or higher? So shouldn't that have worked in the first place? – Eptin Apr 10 '18 at 22:20
  • 1
    seriously, leaving this answer without commenting how you downgraded your libcurl version is rather bad :) – hummingBird Oct 08 '18 at 08:25
  • ...the problem was different curl versions, not "how to install different curl on Mac"...anyway I am using brew, how to install specific version is very nicely described here: https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula – Babu Oct 18 '18 at 11:38