| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "update_engine/libcurl_http_fetcher.h" | 5 #include "update_engine/libcurl_http_fetcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include <base/logging.h> | 10 #include <base/logging.h> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 CHECK_EQ(curl_easy_setopt(curl_handle_, | 133 CHECK_EQ(curl_easy_setopt(curl_handle_, |
| 134 CURLOPT_CAPATH, | 134 CURLOPT_CAPATH, |
| 135 kCACertificatesPath), | 135 kCACertificatesPath), |
| 136 CURLE_OK); | 136 CURLE_OK); |
| 137 CHECK_EQ(curl_easy_setopt(curl_handle_, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS), | 137 CHECK_EQ(curl_easy_setopt(curl_handle_, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS), |
| 138 CURLE_OK); | 138 CURLE_OK); |
| 139 CHECK_EQ(curl_easy_setopt(curl_handle_, | 139 CHECK_EQ(curl_easy_setopt(curl_handle_, |
| 140 CURLOPT_REDIR_PROTOCOLS, | 140 CURLOPT_REDIR_PROTOCOLS, |
| 141 CURLPROTO_HTTPS), | 141 CURLPROTO_HTTPS), |
| 142 CURLE_OK); | 142 CURLE_OK); |
| 143 CHECK_EQ(curl_easy_setopt(curl_handle_, CURLOPT_SSL_CIPHER_LIST, "HIGH"), | 143 CHECK_EQ(curl_easy_setopt(curl_handle_, CURLOPT_SSL_CIPHER_LIST, |
| 144 "HIGH:!ADH"), |
| 144 CURLE_OK); | 145 CURLE_OK); |
| 145 } | 146 } |
| 146 | 147 |
| 147 CHECK_EQ(curl_multi_add_handle(curl_multi_handle_, curl_handle_), CURLM_OK); | 148 CHECK_EQ(curl_multi_add_handle(curl_multi_handle_, curl_handle_), CURLM_OK); |
| 148 transfer_in_progress_ = true; | 149 transfer_in_progress_ = true; |
| 149 } | 150 } |
| 150 | 151 |
| 151 // Begins the transfer, which must not have already been started. | 152 // Begins the transfer, which must not have already been started. |
| 152 void LibcurlHttpFetcher::BeginTransfer(const std::string& url) { | 153 void LibcurlHttpFetcher::BeginTransfer(const std::string& url) { |
| 153 transfer_size_ = -1; | 154 transfer_size_ = -1; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 void LibcurlHttpFetcher::GetHttpResponseCode() { | 440 void LibcurlHttpFetcher::GetHttpResponseCode() { |
| 440 long http_response_code = 0; | 441 long http_response_code = 0; |
| 441 if (curl_easy_getinfo(curl_handle_, | 442 if (curl_easy_getinfo(curl_handle_, |
| 442 CURLINFO_RESPONSE_CODE, | 443 CURLINFO_RESPONSE_CODE, |
| 443 &http_response_code) == CURLE_OK) { | 444 &http_response_code) == CURLE_OK) { |
| 444 http_response_code_ = static_cast<int>(http_response_code); | 445 http_response_code_ = static_cast<int>(http_response_code); |
| 445 } | 446 } |
| 446 } | 447 } |
| 447 | 448 |
| 448 } // namespace chromeos_update_engine | 449 } // namespace chromeos_update_engine |
| OLD | NEW |