1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 19:45:04 -05:00
curl/src
David Woodhouse 9ad282b1ae Remove all traces of FBOpenSSL SPNEGO support
This is just fundamentally broken. SPNEGO (RFC4178) is a protocol which
allows client and server to negotiate the underlying mechanism which will
actually be used to authenticate. This is *often* Kerberos, and can also
be NTLM and other things. And to complicate matters, there are various
different OIDs which can be used to specify the Kerberos mechanism too.

A SPNEGO exchange will identify *which* GSSAPI mechanism is being used,
and will exchange GSSAPI tokens which are appropriate for that mechanism.

But this SPNEGO implementation just strips the incoming SPNEGO packet
and extracts the token, if any. And completely discards the information
about *which* mechanism is being used. Then we *assume* it was Kerberos,
and feed the token into gss_init_sec_context() with the default
mechanism (GSS_S_NO_OID for the mech_type argument).

Furthermore... broken as this code is, it was never even *used* for input
tokens anyway, because higher layers of curl would just bail out if the
server actually said anything *back* to us in the negotiation. We assume
that we send a single token to the server, and it accepts it. If the server
wants to continue the exchange (as is required for NTLM and for SPNEGO
to do anything useful), then curl was broken anyway.

So the only bit which actually did anything was the bit in
Curl_output_negotiate(), which always generates an *initial* SPNEGO
token saying "Hey, I support only the Kerberos mechanism and this is its
token".

You could have done that by manually just prefixing the Kerberos token
with the appropriate bytes, if you weren't going to do any proper SPNEGO
handling. There's no need for the FBOpenSSL library at all.

The sane way to do SPNEGO is just to *ask* the GSSAPI library to do
SPNEGO. That's what the 'mech_type' argument to gss_init_sec_context()
is for. And then it should all Just Work™.

That 'sane way' will be added in a subsequent patch, as will bug fixes
for our failure to handle any exchange other than a single outbound
token to the server which results in immediate success.
2014-07-16 17:26:08 +02:00
..
macos curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
.gitignore curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
CMakeLists.txt build: Renamed CURLX_ONES file list definition to CURLX_CFILES 2014-05-21 23:11:51 +01:00
curl.rc curl tool: reviewed code moved to tool_*.[ch] files 2011-10-06 17:39:00 +02:00
Makefile.am build: fixed unit1394 for debug and metlink builds 2013-05-06 23:28:04 +02:00
makefile.amiga build: Renamed CURLX_ONES file list definition to CURLX_CFILES 2014-05-21 23:11:51 +01:00
Makefile.b32 build: Renamed CURLX_ONES file list definition to CURLX_CFILES 2014-05-21 23:11:51 +01:00
makefile.dj Makefile.inc: fix $(top_srcdir) not allowed in _SOURCES variables 2013-01-20 04:20:02 +01:00
Makefile.inc build: Fixed incorrect reference to curl_setup.h in Visual Studio files 2014-05-22 01:53:50 +01:00
Makefile.m32 Remove all traces of FBOpenSSL SPNEGO support 2014-07-16 17:26:08 +02:00
Makefile.netware Remove all traces of FBOpenSSL SPNEGO support 2014-07-16 17:26:08 +02:00
Makefile.vc6 Makefile.vc6: Follow up fix to commit 45d3f00803 2014-04-06 00:53:47 +01:00
Makefile.Watcom build: Renamed CURLX_ONES file list definition to CURLX_CFILES 2014-05-21 23:11:51 +01:00
mkhelp.pl mkhelp: generate code for --disable-manual as well 2014-03-26 13:22:10 +01:00
tool_binmode.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_binmode.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_bname.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_bname.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_cb_dbg.c tool: Moved internal variable isatty to the global config 2014-03-01 18:30:16 +00:00
tool_cb_dbg.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_cb_hdr.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_cb_hdr.h Fixes allowing 26 more test cases in 1334 to 1393 range to succeed 2012-06-09 05:49:49 +02:00
tool_cb_prg.c tool: Moved --stderr to the global config 2014-03-01 13:03:20 +00:00
tool_cb_prg.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_cb_rea.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_cb_rea.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_cb_see.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_cb_see.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_cb_wrt.c tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_cb_wrt.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_cfgable.c curl: add --proxy-header 2014-04-04 17:03:43 +02:00
tool_cfgable.h curl: add --proxy-header 2014-04-04 17:03:43 +02:00
tool_convert.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_convert.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_dirhie.c checksrc: ban unsafe functions 2013-03-07 11:08:05 +01:00
tool_dirhie.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_doswin.c tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_doswin.h tool: Fixed line longer than 79 characters from commit 705a4cb549 2014-02-23 16:13:09 +00:00
tool_easysrc.c tool: Fixed libcurl source output for multiple operations 2014-03-02 09:44:18 +00:00
tool_easysrc.h tool: Moved --libcurl to the global config 2014-03-01 17:23:14 +00:00
tool_formparse.c tool_formparse.c: fix possible use of non-null-terminated strings 2014-04-19 00:17:47 +02:00
tool_formparse.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_getparam.c tool_getparam.c: Fixed compilation warnings 2014-05-22 21:01:51 +01:00
tool_getparam.h tool_getparam: Added initial support for --next/-: 2014-02-26 20:42:30 +00:00
tool_getpass.c getpass: fix password parsing from console 2014-01-28 13:28:00 +01:00
tool_getpass.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_help.c Remove all traces of FBOpenSSL SPNEGO support 2014-07-16 17:26:08 +02:00
tool_help.h tool_getparam: Moved version information into separate function in tool_help 2014-02-22 17:47:13 +00:00
tool_helpers.c tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_helpers.h tool: Fixed line longer than 79 characters from commit 705a4cb549 2014-02-23 16:13:09 +00:00
tool_homedir.c VMS: fix and generate the VMS build config 2013-02-05 23:08:57 +01:00
tool_homedir.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_hugehelp.c.cvs curl tool: rename hugehelp files to tool_hugehelp 2012-12-26 23:34:41 +01:00
tool_hugehelp.h tool_hugehelp: partially reverted 24e22e10 2014-02-24 21:30:36 +01:00
tool_libinfo.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_libinfo.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_main.c tool: oops, forgot to include <plarenas.h> 2014-07-03 20:36:49 +02:00
tool_main.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_metalink.c tool_metalink: Support polarssl as digest provider 2014-06-17 00:42:53 +02:00
tool_metalink.h tool_metalink.h: Fixed compilation warning 2014-03-01 20:16:33 +00:00
tool_mfiles.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_mfiles.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_msgs.c tool: Moved --stderr to the global config 2014-03-01 13:03:20 +00:00
tool_msgs.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_operate.c tool_operate.c: Fixed compilation warning 2014-05-10 09:20:49 +01:00
tool_operate.h tool_main: Moved easy handle into global config structure 2014-02-24 20:01:37 +00:00
tool_operhlp.c tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_operhlp.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_panykey.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_panykey.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_paramhlp.c tool: Moved --stderr to the global config 2014-03-01 13:03:20 +00:00
tool_paramhlp.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_parsecfg.c tool_parsecfg: Reworked error handling from commit fc59a9e1 2014-03-22 16:50:47 +00:00
tool_parsecfg.h tool_getparam: Added global config to getparameter() 2014-02-25 19:38:17 +00:00
tool_sdecls.h tool_cfgable: Renamed Configurable structure to OperationConfig 2014-02-23 13:09:20 +00:00
tool_setopt.c tool: Moved --libcurl to the global config 2014-03-01 17:23:14 +00:00
tool_setopt.h tool: Moved --libcurl to the global config 2014-03-01 17:23:14 +00:00
tool_setup.h vms_show: post VMS patch cleanup - II 2013-02-06 04:51:55 +01:00
tool_sleep.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_sleep.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_urlglob.c Fixed some "statement not reached" warnings 2014-07-12 01:45:26 +02:00
tool_urlglob.h urlglob: improved error messages and column number on bad use 2013-09-06 23:27:47 +02:00
tool_util.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_util.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_version.h curl tool: reviewed code moved to tool_*.[ch] files 2011-10-06 17:39:00 +02:00
tool_vms.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_vms.h vms_show: post VMS patch cleanup - II 2013-02-06 04:51:55 +01:00
tool_writeenv.c Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
tool_writeenv.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_writeout.c tool_writeout.c: initialize string pointer variable 2014-04-19 00:24:25 +02:00
tool_writeout.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
tool_xattr.c xattr: add support for FreeBSD xattr API 2013-10-01 22:53:47 +02:00
tool_xattr.h curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00