diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-11 16:57:04 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-24 17:26:36 +0200 |
commit | 8443f492dd53451c1c74f61c0e51ddb32c5e6ba0 (patch) | |
tree | 95dec6839ba034d337f8fddd28aedb71a25ba162 /src/curl_stream.c | |
parent | f97d5d090cfc03d02eae3d4a955d49832b4c290c (diff) | |
download | libgit2-8443f492dd53451c1c74f61c0e51ddb32c5e6ba0.tar.gz |
curl: remove the encrypted param to the constructor
We do not want libcurl to perform the TLS negotiation for us, so we
don't need to pass this option.
Diffstat (limited to 'src/curl_stream.c')
-rw-r--r-- | src/curl_stream.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/curl_stream.c b/src/curl_stream.c index 906a67f2a..6534bdbbe 100644 --- a/src/curl_stream.c +++ b/src/curl_stream.c @@ -195,7 +195,7 @@ static void curls_free(git_stream *stream) git__free(s); } -int git_curl_stream_new(git_stream **out, const char *host, const char *port, int encrypted) +int git_curl_stream_new(git_stream **out, const char *host, const char *port) { curl_stream *st; CURL *handle; @@ -213,15 +213,7 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port, in if ((error = git__strtol32(&iport, port, NULL, 10)) < 0) return error; - if (encrypted) { - git_buf buf = GIT_BUF_INIT; - git_buf_printf(&buf, "https://%s", host); - curl_easy_setopt(handle, CURLOPT_URL, buf.ptr); - git_buf_free(&buf); - } else { - curl_easy_setopt(handle, CURLOPT_URL, host); - } - + curl_easy_setopt(handle, CURLOPT_URL, host); curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, st->curl_error); curl_easy_setopt(handle, CURLOPT_PORT, iport); curl_easy_setopt(handle, CURLOPT_CONNECT_ONLY, 1); @@ -232,7 +224,7 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port, in /* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); */ st->parent.version = GIT_STREAM_VERSION; - st->parent.encrypted = encrypted; + st->parent.encrypted = 0; /* we don't encrypt ourselves */ st->parent.proxy_support = 1; st->parent.connect = curls_connect; st->parent.certificate = curls_certificate; |