-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Curl] Upgrades 2019.05.08 #6429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ras0219-msft
merged 9 commits into
microsoft:master
from
PhoebeHui:dev/Phoebe/UpgradeCurl_2019.05.08
May 26, 2019
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9e52d6d
[Curl] Upgrades 2019.05.08
e67e7b9
merge changes from master
e4502d8
Fix cpr failure
4517ce6
Fix the case issue in Linux
661b546
Update patch and portfile
e31da0f
Update the portfile that changed by my mistake
360c31f
[curl] Update to 7.65.0 to skip USE_DARWINSSL regression. Disable PER…
ras0219-msft ba97570
Rename DARWINSSL to SECTRANSP
f8c5411
Update the name and error detect
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/cpr/error.cpp b/cpr/error.cpp | ||
| index 713cb10..4143f93 100644 | ||
| --- a/cpr/error.cpp | ||
| +++ b/cpr/error.cpp | ||
| @@ -38,8 +38,6 @@ ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) { | ||
| return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR; | ||
| case CURLE_SSL_CIPHER: | ||
| return ErrorCode::GENERIC_SSL_ERROR; | ||
| - case CURLE_SSL_CACERT: | ||
| - return ErrorCode::SSL_CACERT_ERROR; | ||
| case CURLE_USE_SSL_FAILED: | ||
| return ErrorCode::GENERIC_SSL_ERROR; | ||
| case CURLE_SSL_ENGINE_INITFAILED: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| Source: cpr | ||
| Version: 1.3.0-6 | ||
| Version: 1.3.0-7 | ||
| Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. | ||
| Build-Depends: curl[core] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,13 @@ | ||
| diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake | ||
| index 84822dba7..0d6219425 100644 | ||
| --- a/CMake/FindLibSSH2.cmake | ||
| +++ b/CMake/FindLibSSH2.cmake | ||
| @@ -12,7 +12,7 @@ endif() | ||
| find_path(LIBSSH2_INCLUDE_DIR libssh2.h | ||
| ) | ||
|
|
||
| -find_library(LIBSSH2_LIBRARY NAMES ssh2 | ||
| +find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2 | ||
| ) | ||
|
|
||
| if(LIBSSH2_INCLUDE_DIR) | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index e6dbb73f1..1e2ff138e 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -1144,7 +1144,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) | ||
|
|
||
| endfunction() | ||
|
|
||
| -if(WIN32 AND NOT CYGWIN) | ||
| +if(MSVC) | ||
| + set(CURL_INSTALL_CMAKE_DIR share/curl) | ||
| +elseif(WIN32 AND NOT CYGWIN) | ||
| set(CURL_INSTALL_CMAKE_DIR CMake) | ||
| else() | ||
| set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl) | ||
| diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake | ||
| index 84822db..0d62194 100644 | ||
| --- a/CMake/FindLibSSH2.cmake | ||
| +++ b/CMake/FindLibSSH2.cmake | ||
| @@ -12,7 +12,7 @@ endif() | ||
| find_path(LIBSSH2_INCLUDE_DIR libssh2.h | ||
| ) | ||
|
|
||
| -find_library(LIBSSH2_LIBRARY NAMES ssh2 | ||
| +find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2 | ||
| ) | ||
|
|
||
| if(LIBSSH2_INCLUDE_DIR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,92 +1,90 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 7b73b98..72f6171 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -882,7 +882,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) | ||
| check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) | ||
|
|
||
| # symbol exists in win32, but function does not. | ||
| -if(WIN32) | ||
| +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
| + add_definitions(-D_WIN32_WINNT=0x0A00 -DHAVE_STRUCT_POLLFD -D_WINSOCK_DEPRECATED_NO_WARNINGS) | ||
| +elseif(WIN32) | ||
| if(ENABLE_INET_PTON) | ||
| check_function_exists(inet_pton HAVE_INET_PTON) | ||
| # _WIN32_WINNT_VISTA (0x0600) | ||
| diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c | ||
| index 8337c72..41867b2 100644 | ||
| --- a/lib/curl_gethostname.c | ||
| +++ b/lib/curl_gethostname.c | ||
| @@ -21,6 +21,7 @@ | ||
| ***************************************************************************/ | ||
|
|
||
| #include "curl_setup.h" | ||
| +#include "curl/curl.h" | ||
|
|
||
| #include "curl_gethostname.h" | ||
|
|
||
| @@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) | ||
| #ifdef DEBUGBUILD | ||
|
|
||
| /* Override host name when environment variable CURL_GETHOSTNAME is set */ | ||
| - const char *force_hostname = getenv("CURL_GETHOSTNAME"); | ||
| + char *force_hostname = curl_getenv("CURL_GETHOSTNAME"); | ||
| if(force_hostname) { | ||
| strncpy(name, force_hostname, namelen); | ||
| + free(force_hostname); | ||
| err = 0; | ||
| } | ||
| else { | ||
| diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c | ||
| index e896276..268f0ea 100644 | ||
| --- a/lib/curl_ntlm_core.c | ||
| +++ b/lib/curl_ntlm_core.c | ||
| @@ -743,9 +743,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, | ||
|
|
||
| /* Calculate the timestamp */ | ||
| #ifdef DEBUGBUILD | ||
| - char *force_timestamp = getenv("CURL_FORCETIME"); | ||
| - if(force_timestamp) | ||
| + char *force_timestamp = curl_getenv("CURL_FORCETIME"); | ||
| + if (force_timestamp) | ||
| + { | ||
| tw = CURL_OFF_T_C(11644473600) * 10000000; | ||
| + free(force_timestamp); | ||
| + } | ||
| else | ||
| #endif | ||
| tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; | ||
| diff --git a/lib/ftp.c b/lib/ftp.c | ||
| index 8042edf..3442df7 100644 | ||
| --- a/lib/ftp.c | ||
| +++ b/lib/ftp.c | ||
| @@ -4260,7 +4260,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) | ||
| /* prevpath is "raw" so we convert the input path before we compare the | ||
| strings */ | ||
| size_t dlen; | ||
| - char *path; | ||
| + char *path = NULL; | ||
| CURLcode result = | ||
| Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, TRUE); | ||
| if(result) { | ||
| diff --git a/lib/rand.c b/lib/rand.c | ||
| index 2670af9..0d18d37 100644 | ||
| --- a/lib/rand.c | ||
| +++ b/lib/rand.c | ||
| @@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) | ||
| static bool seeded = FALSE; | ||
|
|
||
| #ifdef CURLDEBUG | ||
| - char *force_entropy = getenv("CURL_ENTROPY"); | ||
| + char *force_entropy = curl_getenv("CURL_ENTROPY"); | ||
| if(force_entropy) { | ||
| if(!seeded) { | ||
| unsigned int seed = 0; | ||
| @@ -58,6 +58,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) | ||
| else | ||
| randseed++; | ||
| *rnd = randseed; | ||
| + free(force_entropy); | ||
| return CURLE_OK; | ||
| } | ||
| #endif | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index edb1cec..e7b4c68 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -894,7 +894,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) | ||
| check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) | ||
|
|
||
| # symbol exists in win32, but function does not. | ||
| -if(WIN32) | ||
| +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
| + add_definitions(-D_WIN32_WINNT=0x0A00 -DHAVE_STRUCT_POLLFD -D_WINSOCK_DEPRECATED_NO_WARNINGS) | ||
| +elseif(WIN32) | ||
| if(ENABLE_INET_PTON) | ||
| check_function_exists(inet_pton HAVE_INET_PTON) | ||
| # _WIN32_WINNT_VISTA (0x0600) | ||
| diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c | ||
| index 8337c72..41867b2 100644 | ||
| --- a/lib/curl_gethostname.c | ||
| +++ b/lib/curl_gethostname.c | ||
| @@ -21,6 +21,7 @@ | ||
| ***************************************************************************/ | ||
|
|
||
| #include "curl_setup.h" | ||
| +#include "curl/curl.h" | ||
|
|
||
| #include "curl_gethostname.h" | ||
|
|
||
| @@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) | ||
| #ifdef DEBUGBUILD | ||
|
|
||
| /* Override host name when environment variable CURL_GETHOSTNAME is set */ | ||
| - const char *force_hostname = getenv("CURL_GETHOSTNAME"); | ||
| + char *force_hostname = curl_getenv("CURL_GETHOSTNAME"); | ||
| if(force_hostname) { | ||
| strncpy(name, force_hostname, namelen); | ||
| + free(force_hostname); | ||
| err = 0; | ||
| } | ||
| else { | ||
| diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c | ||
| index e7060eb..55e3738 100644 | ||
| --- a/lib/curl_ntlm_core.c | ||
| +++ b/lib/curl_ntlm_core.c | ||
| @@ -726,10 +726,10 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, | ||
|
|
||
| /* Calculate the timestamp */ | ||
| #ifdef DEBUGBUILD | ||
| - char *force_timestamp = getenv("CURL_FORCETIME"); | ||
| + char *force_timestamp = curl_getenv("CURL_FORCETIME"); | ||
| if(force_timestamp) | ||
| tw = CURL_OFF_T_C(11644473600) * 10000000; | ||
| - else | ||
| + free(force_timestamp); | ||
| #endif | ||
| tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; | ||
|
|
||
| diff --git a/lib/ftp.c b/lib/ftp.c | ||
| index 825aaaa..3b96670 100644 | ||
| --- a/lib/ftp.c | ||
| +++ b/lib/ftp.c | ||
| @@ -4262,7 +4262,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) | ||
| /* prevpath is "raw" so we convert the input path before we compare the | ||
| strings */ | ||
| size_t dlen; | ||
| - char *path; | ||
| + char *path = NULL; | ||
| CURLcode result = | ||
| Curl_urldecode(conn->data, ftp->path, 0, &path, &dlen, TRUE); | ||
| if(result) { | ||
| diff --git a/lib/rand.c b/lib/rand.c | ||
| index 6ee45fe..b2d712d 100644 | ||
| --- a/lib/rand.c | ||
| +++ b/lib/rand.c | ||
| @@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) | ||
| static bool seeded = FALSE; | ||
|
|
||
| #ifdef CURLDEBUG | ||
| - char *force_entropy = getenv("CURL_ENTROPY"); | ||
| + char *force_entropy = curl_getenv("CURL_ENTROPY"); | ||
| if(force_entropy) { | ||
| if(!seeded) { | ||
| unsigned int seed = 0; | ||
| @@ -58,6 +58,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) | ||
| else | ||
| randseed++; | ||
| *rnd = randseed; | ||
| + free(force_entropy); | ||
| return CURLE_OK; | ||
| } | ||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.