Code

Merge branch 'ml/http'
authorJunio C Hamano <gitster@pobox.com>
Thu, 9 Jul 2009 08:00:36 +0000 (01:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Jul 2009 08:00:36 +0000 (01:00 -0700)
* ml/http:
  http.c: add http.sslCertPasswordProtected option
  http.c: prompt for SSL client certificate password

Conflicts:
http.c

1  2 
Documentation/config.txt
http.c

Simple merge
diff --cc http.c
index b0499482455e256a3c2c9b6498b21c32d328c5c9,1b140d381d576438b1445c4f62cd0d230b53911e..a2720d576d72e456b038444050f5b8de9d25d792
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -33,8 -27,18 +33,19 @@@ static int curl_ftp_no_epsv
  static const char *curl_http_proxy;
  static char *user_name, *user_pass;
  
+ #if LIBCURL_VERSION_NUM >= 0x071700
+ /* Use CURLOPT_KEYPASSWD as is */
+ #elif LIBCURL_VERSION_NUM >= 0x070903
+ #define CURLOPT_KEYPASSWD CURLOPT_SSLKEYPASSWD
+ #else
+ #define CURLOPT_KEYPASSWD CURLOPT_SSLCERTPASSWD
+ #endif
+ static char *ssl_cert_password;
+ static int ssl_cert_password_required;
  static struct curl_slist *pragma_header;
 +static struct curl_slist *no_pragma_header;
  
  static struct active_request_slot *active_queue_head;
  
@@@ -196,7 -221,9 +228,9 @@@ static CURL *get_curl_handle(void
  
        if (ssl_cert != NULL)
                curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);
 -#if LIBCURL_VERSION_NUM >= 0x070902
+       if (has_cert_password())
+               curl_easy_setopt(result, CURLOPT_KEYPASSWD, ssl_cert_password);
 +#if LIBCURL_VERSION_NUM >= 0x070903
        if (ssl_key != NULL)
                curl_easy_setopt(result, CURLOPT_SSLKEY, ssl_key);
  #endif