socks_gssapi.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. /***************************************************************************
  2. * _ _ ____ _
  3. * Project ___| | | | _ \| |
  4. * / __| | | | |_) | |
  5. * | (__| |_| | _ <| |___
  6. * \___|\___/|_| \_\_____|
  7. *
  8. * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
  9. *
  10. * This software is licensed as described in the file COPYING, which
  11. * you should have received as part of this distribution. The terms
  12. * are also available at http://curl.haxx.se/docs/copyright.html.
  13. *
  14. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. * copies of the Software, and permit persons to whom the Software is
  16. * furnished to do so, under the terms of the COPYING file.
  17. *
  18. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. * KIND, either express or implied.
  20. *
  21. * $Id$
  22. ***************************************************************************/
  23. #include "setup.h"
  24. #ifndef CURL_DISABLE_PROXY
  25. #ifdef HAVE_GSSAPI
  26. #ifdef HAVE_OLD_GSSMIT
  27. #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
  28. #endif
  29. #ifndef gss_nt_service_name
  30. #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
  31. #endif
  32. #include <string.h>
  33. #ifdef HAVE_STDLIB_H
  34. #include <stdlib.h>
  35. #endif
  36. #include "urldata.h"
  37. #include "sendf.h"
  38. #include "connect.h"
  39. #include "timeval.h"
  40. #include "socks.h"
  41. static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
  42. #define _MPRINTF_REPLACE /* use our functions only */
  43. #include <curl/mprintf.h>
  44. /* The last #include file should be: */
  45. #include "memdebug.h"
  46. /*
  47. * Helper gssapi error functions.
  48. */
  49. static int check_gss_err(struct SessionHandle *data,
  50. OM_uint32 major_status,
  51. OM_uint32 minor_status,
  52. const char* function)
  53. {
  54. if(GSS_ERROR(major_status)) {
  55. OM_uint32 maj_stat,min_stat;
  56. OM_uint32 msg_ctx = 0;
  57. gss_buffer_desc status_string;
  58. char buf[1024];
  59. size_t len;
  60. len = 0;
  61. msg_ctx = 0;
  62. while(!msg_ctx) {
  63. /* convert major status code (GSS-API error) to text */
  64. maj_stat = gss_display_status(&min_stat, major_status,
  65. GSS_C_GSS_CODE,
  66. GSS_C_NULL_OID,
  67. &msg_ctx, &status_string);
  68. if(maj_stat == GSS_S_COMPLETE) {
  69. if(sizeof(buf) > len + status_string.length + 1) {
  70. strcpy(buf+len, (char*) status_string.value);
  71. len += status_string.length;
  72. }
  73. gss_release_buffer(&min_stat, &status_string);
  74. break;
  75. }
  76. gss_release_buffer(&min_stat, &status_string);
  77. }
  78. if(sizeof(buf) > len + 3) {
  79. strcpy(buf+len, ".\n");
  80. len += 2;
  81. }
  82. msg_ctx = 0;
  83. while(!msg_ctx) {
  84. /* convert minor status code (underlying routine error) to text */
  85. maj_stat = gss_display_status(&min_stat, minor_status,
  86. GSS_C_MECH_CODE,
  87. GSS_C_NULL_OID,
  88. &msg_ctx, &status_string);
  89. if(maj_stat == GSS_S_COMPLETE) {
  90. if(sizeof(buf) > len + status_string.length) {
  91. strcpy(buf+len, (char*) status_string.value);
  92. len += status_string.length;
  93. }
  94. gss_release_buffer(&min_stat, &status_string);
  95. break;
  96. }
  97. gss_release_buffer(&min_stat, &status_string);
  98. }
  99. failf(data, "GSSAPI error: %s failed:\n%s\n", function, buf);
  100. return(1);
  101. }
  102. return(0);
  103. }
  104. CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
  105. struct connectdata *conn)
  106. {
  107. struct SessionHandle *data = conn->data;
  108. curl_socket_t sock = conn->sock[sockindex];
  109. CURLcode code;
  110. ssize_t actualread;
  111. ssize_t written;
  112. int result;
  113. long timeout;
  114. OM_uint32 gss_major_status, gss_minor_status, gss_status;
  115. OM_uint32 gss_ret_flags;
  116. int gss_conf_state, gss_enc;
  117. gss_buffer_desc service = GSS_C_EMPTY_BUFFER;
  118. gss_buffer_desc gss_send_token = GSS_C_EMPTY_BUFFER;
  119. gss_buffer_desc gss_recv_token = GSS_C_EMPTY_BUFFER;
  120. gss_buffer_desc gss_w_token = GSS_C_EMPTY_BUFFER;
  121. gss_buffer_desc* gss_token = GSS_C_NO_BUFFER;
  122. gss_name_t server = GSS_C_NO_NAME;
  123. gss_name_t gss_client_name = GSS_C_NO_NAME;
  124. u_short us_length;
  125. char *user=NULL;
  126. unsigned char socksreq[4]; /* room for gssapi exchange header only */
  127. char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
  128. /* get timeout */
  129. timeout = Curl_timeleft(conn, NULL, TRUE);
  130. /* GSSAPI request looks like
  131. * +----+------+-----+----------------+
  132. * |VER | MTYP | LEN | TOKEN |
  133. * +----+------+----------------------+
  134. * | 1 | 1 | 2 | up to 2^16 - 1 |
  135. * +----+------+-----+----------------+
  136. */
  137. /* prepare service name */
  138. if (strchr(serviceptr,'/')) {
  139. service.value = malloc(strlen(serviceptr));
  140. if(!service.value)
  141. return CURLE_OUT_OF_MEMORY;
  142. service.length = strlen(serviceptr);
  143. memcpy(service.value, serviceptr, service.length);
  144. gss_major_status = gss_import_name(&gss_minor_status, &service,
  145. (gss_OID) GSS_C_NULL_OID, &server);
  146. }
  147. else {
  148. service.value = malloc(strlen(serviceptr) +strlen(conn->proxy.name)+2);
  149. if(!service.value)
  150. return CURLE_OUT_OF_MEMORY;
  151. service.length = strlen(serviceptr) +strlen(conn->proxy.name)+1;
  152. snprintf(service.value, service.length+1, "%s@%s",
  153. serviceptr, conn->proxy.name);
  154. gss_major_status = gss_import_name(&gss_minor_status, &service,
  155. gss_nt_service_name, &server);
  156. }
  157. gss_release_buffer(&gss_status, &service); /* clear allocated memory */
  158. if(check_gss_err(data,gss_major_status,
  159. gss_minor_status,"gss_import_name()")) {
  160. failf(data, "Failed to create service name.");
  161. gss_release_name(&gss_status, &server);
  162. return CURLE_COULDNT_CONNECT;
  163. }
  164. /* As long as we need to keep sending some context info, and there's no */
  165. /* errors, keep sending it... */
  166. for(;;) {
  167. gss_major_status = gss_init_sec_context(&gss_minor_status,
  168. GSS_C_NO_CREDENTIAL,
  169. &gss_context, server,
  170. GSS_C_NULL_OID,
  171. GSS_C_MUTUAL_FLAG |
  172. GSS_C_REPLAY_FLAG,
  173. 0,
  174. NULL,
  175. gss_token,
  176. NULL,
  177. &gss_send_token,
  178. &gss_ret_flags,
  179. NULL);
  180. if(gss_token != GSS_C_NO_BUFFER)
  181. gss_release_buffer(&gss_status, &gss_recv_token);
  182. if(check_gss_err(data,gss_major_status,
  183. gss_minor_status,"gss_init_sec_context")) {
  184. gss_release_name(&gss_status, &server);
  185. gss_release_buffer(&gss_status, &gss_recv_token);
  186. gss_release_buffer(&gss_status, &gss_send_token);
  187. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  188. failf(data, "Failed to initial GSSAPI token.");
  189. return CURLE_COULDNT_CONNECT;
  190. }
  191. if(gss_send_token.length != 0) {
  192. socksreq[0] = 1; /* gssapi subnegotiation version */
  193. socksreq[1] = 1; /* authentication message type */
  194. us_length = htons((short)gss_send_token.length);
  195. memcpy(socksreq+2,&us_length,sizeof(short));
  196. code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
  197. if((code != CURLE_OK) || (4 != written)) {
  198. failf(data, "Failed to send GSSAPI authentication request.");
  199. gss_release_name(&gss_status, &server);
  200. gss_release_buffer(&gss_status, &gss_recv_token);
  201. gss_release_buffer(&gss_status, &gss_send_token);
  202. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  203. return CURLE_COULDNT_CONNECT;
  204. }
  205. code = Curl_write_plain(conn, sock, (char *)gss_send_token.value,
  206. gss_send_token.length, &written);
  207. if((code != CURLE_OK) || ((ssize_t)gss_send_token.length != written)) {
  208. failf(data, "Failed to send GSSAPI authentication token.");
  209. gss_release_name(&gss_status, &server);
  210. gss_release_buffer(&gss_status, &gss_recv_token);
  211. gss_release_buffer(&gss_status, &gss_send_token);
  212. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  213. return CURLE_COULDNT_CONNECT;
  214. }
  215. }
  216. gss_release_buffer(&gss_status, &gss_send_token);
  217. gss_release_buffer(&gss_status, &gss_recv_token);
  218. if(gss_major_status != GSS_S_CONTINUE_NEEDED) break;
  219. /* analyse response */
  220. /* GSSAPI response looks like
  221. * +----+------+-----+----------------+
  222. * |VER | MTYP | LEN | TOKEN |
  223. * +----+------+----------------------+
  224. * | 1 | 1 | 2 | up to 2^16 - 1 |
  225. * +----+------+-----+----------------+
  226. */
  227. result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
  228. &actualread, timeout);
  229. if(result != CURLE_OK || actualread != 4) {
  230. failf(data, "Failed to receive GSSAPI authentication response.");
  231. gss_release_name(&gss_status, &server);
  232. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  233. return CURLE_COULDNT_CONNECT;
  234. }
  235. /* ignore the first (VER) byte */
  236. if(socksreq[1] == 255) { /* status / message type */
  237. failf(data, "User was rejected by the SOCKS5 server (%d %d).",
  238. socksreq[0], socksreq[1]);
  239. gss_release_name(&gss_status, &server);
  240. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  241. return CURLE_COULDNT_CONNECT;
  242. }
  243. if(socksreq[1] != 1) { /* status / messgae type */
  244. failf(data, "Invalid GSSAPI authentication response type (%d %d).",
  245. socksreq[0], socksreq[1]);
  246. gss_release_name(&gss_status, &server);
  247. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  248. return CURLE_COULDNT_CONNECT;
  249. }
  250. memcpy(&us_length, socksreq+2, sizeof(short));
  251. us_length = ntohs(us_length);
  252. gss_recv_token.length=us_length;
  253. gss_recv_token.value=malloc(us_length);
  254. if(!gss_recv_token.value) {
  255. failf(data,
  256. "Could not allocate memory for GSSAPI authentication "
  257. "response token.");
  258. gss_release_name(&gss_status, &server);
  259. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  260. return CURLE_OUT_OF_MEMORY;
  261. }
  262. result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
  263. gss_recv_token.length,
  264. &actualread, timeout);
  265. if(result != CURLE_OK || actualread != us_length) {
  266. failf(data, "Failed to receive GSSAPI authentication token.");
  267. gss_release_name(&gss_status, &server);
  268. gss_release_buffer(&gss_status, &gss_recv_token);
  269. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  270. return CURLE_COULDNT_CONNECT;
  271. }
  272. gss_token = &gss_recv_token;
  273. }
  274. gss_release_name(&gss_status, &server);
  275. /* Everything is good so far, user was authenticated! */
  276. gss_major_status = gss_inquire_context (&gss_minor_status, gss_context,
  277. &gss_client_name, NULL, NULL, NULL,
  278. NULL, NULL, NULL);
  279. if(check_gss_err(data,gss_major_status,
  280. gss_minor_status,"gss_inquire_context")) {
  281. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  282. gss_release_name(&gss_status, &gss_client_name);
  283. failf(data, "Failed to determine user name.");
  284. return CURLE_COULDNT_CONNECT;
  285. }
  286. gss_major_status = gss_display_name(&gss_minor_status, gss_client_name,
  287. &gss_send_token, NULL);
  288. if(check_gss_err(data,gss_major_status,
  289. gss_minor_status,"gss_display_name")) {
  290. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  291. gss_release_name(&gss_status, &gss_client_name);
  292. gss_release_buffer(&gss_status, &gss_send_token);
  293. failf(data, "Failed to determine user name.");
  294. return CURLE_COULDNT_CONNECT;
  295. }
  296. user=malloc(gss_send_token.length+1);
  297. if(!user) {
  298. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  299. gss_release_name(&gss_status, &gss_client_name);
  300. gss_release_buffer(&gss_status, &gss_send_token);
  301. return CURLE_OUT_OF_MEMORY;
  302. }
  303. memcpy(user, gss_send_token.value, gss_send_token.length);
  304. user[gss_send_token.length] = '\0';
  305. gss_release_name(&gss_status, &gss_client_name);
  306. gss_release_buffer(&gss_status, &gss_send_token);
  307. infof(data, "SOCKS5 server authencticated user %s with gssapi.\n",user);
  308. free(user);
  309. user=NULL;
  310. /* Do encryption */
  311. socksreq[0] = 1; /* gssapi subnegotiation version */
  312. socksreq[1] = 2; /* encryption message type */
  313. gss_enc = 0; /* no data protection */
  314. /* do confidentiality protection if supported */
  315. if(gss_ret_flags & GSS_C_CONF_FLAG)
  316. gss_enc = 2;
  317. /* else do integrity protection */
  318. else if(gss_ret_flags & GSS_C_INTEG_FLAG)
  319. gss_enc = 1;
  320. infof(data, "SOCKS5 server supports gssapi %s data protection.\n",
  321. (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality"));
  322. /* force for the moment to no data protection */
  323. gss_enc = 0;
  324. /*
  325. * Sending the encryption type in clear seems wrong. It should be
  326. * protected with gss_seal()/gss_wrap(). See RFC1961 extract below
  327. * The NEC reference implementations on which this is based is
  328. * therefore at fault
  329. *
  330. * +------+------+------+.......................+
  331. * + ver | mtyp | len | token |
  332. * +------+------+------+.......................+
  333. * + 0x01 | 0x02 | 0x02 | up to 2^16 - 1 octets |
  334. * +------+------+------+.......................+
  335. *
  336. * Where:
  337. *
  338. * - "ver" is the protocol version number, here 1 to represent the
  339. * first version of the SOCKS/GSS-API protocol
  340. *
  341. * - "mtyp" is the message type, here 2 to represent a protection
  342. * -level negotiation message
  343. *
  344. * - "len" is the length of the "token" field in octets
  345. *
  346. * - "token" is the GSS-API encapsulated protection level
  347. *
  348. * The token is produced by encapsulating an octet containing the
  349. * required protection level using gss_seal()/gss_wrap() with conf_req
  350. * set to FALSE. The token is verified using gss_unseal()/
  351. * gss_unwrap().
  352. *
  353. */
  354. if(data->set.socks5_gssapi_nec) {
  355. us_length = htons((short)1);
  356. memcpy(socksreq+2,&us_length,sizeof(short));
  357. }
  358. else {
  359. gss_send_token.length = 1;
  360. gss_send_token.value = malloc(1);
  361. if(!gss_send_token.value) {
  362. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  363. return CURLE_OUT_OF_MEMORY;
  364. }
  365. memcpy(gss_send_token.value, &gss_enc, 1);
  366. gss_major_status = gss_wrap(&gss_minor_status, gss_context, 0,
  367. GSS_C_QOP_DEFAULT, &gss_send_token,
  368. &gss_conf_state, &gss_w_token);
  369. if(check_gss_err(data,gss_major_status,gss_minor_status,"gss_wrap")) {
  370. gss_release_buffer(&gss_status, &gss_send_token);
  371. gss_release_buffer(&gss_status, &gss_w_token);
  372. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  373. failf(data, "Failed to wrap GSSAPI encryption value into token.");
  374. return CURLE_COULDNT_CONNECT;
  375. }
  376. gss_release_buffer(&gss_status, &gss_send_token);
  377. us_length = htons((short)gss_w_token.length);
  378. memcpy(socksreq+2,&us_length,sizeof(short));
  379. }
  380. code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
  381. if((code != CURLE_OK) || (4 != written)) {
  382. failf(data, "Failed to send GSSAPI encryption request.");
  383. gss_release_buffer(&gss_status, &gss_w_token);
  384. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  385. return CURLE_COULDNT_CONNECT;
  386. }
  387. if(data->set.socks5_gssapi_nec) {
  388. memcpy(socksreq, &gss_enc, 1);
  389. code = Curl_write_plain(conn, sock, socksreq, 1, &written);
  390. if((code != CURLE_OK) || ( 1 != written)) {
  391. failf(data, "Failed to send GSSAPI encryption type.");
  392. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  393. return CURLE_COULDNT_CONNECT;
  394. }
  395. } else {
  396. code = Curl_write_plain(conn, sock, (char *)gss_w_token.value,
  397. gss_w_token.length, &written);
  398. if((code != CURLE_OK) || ((ssize_t)gss_w_token.length != written)) {
  399. failf(data, "Failed to send GSSAPI encryption type.");
  400. gss_release_buffer(&gss_status, &gss_w_token);
  401. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  402. return CURLE_COULDNT_CONNECT;
  403. }
  404. gss_release_buffer(&gss_status, &gss_w_token);
  405. }
  406. result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
  407. &actualread, timeout);
  408. if(result != CURLE_OK || actualread != 4) {
  409. failf(data, "Failed to receive GSSAPI encryption response.");
  410. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  411. return CURLE_COULDNT_CONNECT;
  412. }
  413. /* ignore the first (VER) byte */
  414. if(socksreq[1] == 255) { /* status / message type */
  415. failf(data, "User was rejected by the SOCKS5 server (%d %d).",
  416. socksreq[0], socksreq[1]);
  417. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  418. return CURLE_COULDNT_CONNECT;
  419. }
  420. if(socksreq[1] != 2) { /* status / messgae type */
  421. failf(data, "Invalid GSSAPI encryption response type (%d %d).",
  422. socksreq[0], socksreq[1]);
  423. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  424. return CURLE_COULDNT_CONNECT;
  425. }
  426. memcpy(&us_length, socksreq+2, sizeof(short));
  427. us_length = ntohs(us_length);
  428. gss_recv_token.length= us_length;
  429. gss_recv_token.value=malloc(gss_recv_token.length);
  430. if(!gss_recv_token.value) {
  431. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  432. return CURLE_OUT_OF_MEMORY;
  433. }
  434. result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
  435. gss_recv_token.length,
  436. &actualread, timeout);
  437. if(result != CURLE_OK || actualread != us_length) {
  438. failf(data, "Failed to receive GSSAPI encryptrion type.");
  439. gss_release_buffer(&gss_status, &gss_recv_token);
  440. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  441. return CURLE_COULDNT_CONNECT;
  442. }
  443. if(!data->set.socks5_gssapi_nec) {
  444. gss_major_status = gss_unwrap(&gss_minor_status, gss_context,
  445. &gss_recv_token, &gss_w_token,
  446. 0, GSS_C_QOP_DEFAULT);
  447. if(check_gss_err(data,gss_major_status,gss_minor_status,"gss_unwrap")) {
  448. gss_release_buffer(&gss_status, &gss_recv_token);
  449. gss_release_buffer(&gss_status, &gss_w_token);
  450. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  451. failf(data, "Failed to unwrap GSSAPI encryption value into token.");
  452. return CURLE_COULDNT_CONNECT;
  453. }
  454. gss_release_buffer(&gss_status, &gss_recv_token);
  455. if(gss_w_token.length != 1) {
  456. failf(data, "Invalid GSSAPI encryption response length (%d).",
  457. gss_w_token.length);
  458. gss_release_buffer(&gss_status, &gss_w_token);
  459. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  460. return CURLE_COULDNT_CONNECT;
  461. }
  462. memcpy(socksreq,gss_w_token.value,gss_w_token.length);
  463. gss_release_buffer(&gss_status, &gss_w_token);
  464. }
  465. else {
  466. if(gss_recv_token.length != 1) {
  467. failf(data, "Invalid GSSAPI encryption response length (%d).",
  468. gss_recv_token.length);
  469. gss_release_buffer(&gss_status, &gss_recv_token);
  470. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  471. return CURLE_COULDNT_CONNECT;
  472. }
  473. memcpy(socksreq,gss_recv_token.value,gss_recv_token.length);
  474. gss_release_buffer(&gss_status, &gss_recv_token);
  475. }
  476. infof(data, "SOCKS5 access with%s protection granted.\n",
  477. (socksreq[0]==0)?"out gssapi data":
  478. ((socksreq[0]==1)?" gssapi integrity":" gssapi confidentiality"));
  479. conn->socks5_gssapi_enctype = socksreq[0];
  480. if(socksreq[0] == 0)
  481. gss_delete_sec_context(&gss_status, &gss_context, NULL);
  482. return CURLE_OK;
  483. }
  484. #endif
  485. #endif /* CURL_DISABLE_PROXY */