From: Junio C Hamano Date: Thu, 9 Jul 2009 08:00:36 +0000 (-0700) Subject: Merge branch 'ml/http' X-Git-Tag: v1.6.4-rc0~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c535d767f7a518b79a0f9b9a70ec746de76da97c;p=git.git Merge branch 'ml/http' * ml/http: http.c: add http.sslCertPasswordProtected option http.c: prompt for SSL client certificate password Conflicts: http.c --- c535d767f7a518b79a0f9b9a70ec746de76da97c diff --cc http.c index b04994824,1b140d381..a2720d576 --- a/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 (has_cert_password()) + curl_easy_setopt(result, CURLOPT_KEYPASSWD, ssl_cert_password); -#if LIBCURL_VERSION_NUM >= 0x070902 +#if LIBCURL_VERSION_NUM >= 0x070903 if (ssl_key != NULL) curl_easy_setopt(result, CURLOPT_SSLKEY, ssl_key); #endif