{"thread":{"id":"29683","subject":"Allow NTLM-Authentication against a http-proxy server","startedAt":"2012-02-21T14:31:46Z","lastAt":"2012-02-21T14:31:46Z","messageCount":1,"participants":["Schmidt, Marco"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"185079","messageId":"4CDEC141B5583D408E79F2931DB7708301802C40@GSX300A.mxchg.m.corp","threadId":"29683","inReplyTo":null,"subject":"Allow NTLM-Authentication against a http-proxy server","fromName":"Schmidt, Marco","fromEmail":"marco.schmidt@cassidian.com","sentAt":"2012-02-21T14:31:46Z","receivedAt":"2012-02-21T14:31:46Z","isPatch":false,"sender":{"key":"marco.schmidt@cassidian.com","avatar":null},"body":"After some back and forward - here is my patch to support\nNTLM-authentication against a http-proxy server again. \n\nBig thanks are going to Thomas Rast for helping to fiddle the patch to a\nmore correct form and his commit message ;). \n\nMarco Schmidt\n\n\n\n \n\n\nFrom f4e112e41aef75f08532fda53a1b9021208a3774 Mon Sep 17 00:00:00 2001\nFrom: Marco Schmidt <Marco.Schmidt@cassidian.com>\nDate: Tue, 21 Feb 2012 12:30:29 +0100\nSubject: [PATCH] http/curl: let user configure \"any\" proxy authentication\n\n  Normally, curl uses only the \"basic\" authentication scheme when\n  talking to proxies, which may not be desirable (it sends the password\n  in cleartext) or sufficient (the author needs NTLM authentication for\n  his proxy).\n\n  Introduce the config setting http.proxyAuthAny.  When enabled, we tell\n  curl to use any authentication scheme supported by the proxy\n---\n http.c |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 0ffd79c..5c55efd 100644\n--- a/http.c\n+++ b/http.c\n@@ -41,6 +41,7 @@ static long curl_low_speed_limit = -1;\n static long curl_low_speed_time = -1;\n static int curl_ftp_no_epsv;\n static const char *curl_http_proxy;\n+static int curl_http_proxyauthany = 0;\n static const char *curl_cookie_file;\n static struct credential http_auth = CREDENTIAL_INIT;\n static int http_proactive_auth;\n@@ -190,6 +191,11 @@ static int http_options(const char *var, const char *value, void *cb)\n \t}\n \tif (!strcmp(\"http.proxy\", var))\n \t\treturn git_config_string(&curl_http_proxy, var, value);\n+\t\n+\tif (!strcmp(\"http.proxyauthany\", var)) {\n+\t\tcurl_http_proxyauthany = git_config_bool(var, value);\n+\t\treturn 0;\n+\t}\n \n \tif (!strcmp(\"http.cookiefile\", var))\n \t\treturn git_config_string(&curl_cookie_file, var, value);\n@@ -297,6 +303,12 @@ static CURL *get_curl_handle(void)\n \n \tif (curl_http_proxy)\n \t\tcurl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);\n+\t\n+#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY\t\n+\tif (curl_http_proxyauthany) {\n+\t\tcurl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);\n+\t}\n+#endif\n \n \treturn result;\n }\n-- \n1.7.7.1.msysgit.0\n\n"}]}