mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 03:19:00 +08:00
[curl] fix build (#39854)
This commit is contained in:
parent
915623e9a6
commit
81d7b12b1c
37
ports/curl/fix-mbedtls.patch
Normal file
37
ports/curl/fix-mbedtls.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
|
||||
index ec0b10dd9a9f88..98a4ea01b1830b 100644
|
||||
--- a/lib/vtls/mbedtls.c
|
||||
+++ b/lib/vtls/mbedtls.c
|
||||
@@ -902,8 +902,6 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
||||
(struct mbed_ssl_backend_data *)connssl->backend;
|
||||
struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
|
||||
const mbedtls_x509_crt *peercert;
|
||||
- char cipher_str[64];
|
||||
- uint16_t cipher_id;
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
const char * const pinnedpubkey = Curl_ssl_cf_is_proxy(cf)?
|
||||
data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY]:
|
||||
@@ -932,11 +930,18 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
- cipher_id = (uint16_t)
|
||||
- mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl);
|
||||
- mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true);
|
||||
- infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str);
|
||||
-
|
||||
+#if MBEDTLS_VERSION_NUMBER >= 0x03020000
|
||||
+ {
|
||||
+ char cipher_str[64];
|
||||
+ uint16_t cipher_id;
|
||||
+ cipher_id = (uint16_t)
|
||||
+ mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl);
|
||||
+ mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true);
|
||||
+ infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str);
|
||||
+ }
|
||||
+#else
|
||||
+ infof(data, "mbedTLS: Handshake complete");
|
||||
+#endif
|
||||
ret = mbedtls_ssl_get_verify_result(&backend->ssl);
|
||||
|
||||
if(!conn_config->verifyhost)
|
@ -13,6 +13,7 @@ vcpkg_from_github(
|
||||
export-components.patch
|
||||
dependencies.patch
|
||||
cmake-config.patch
|
||||
fix-mbedtls.patch # From https://github.com/curl/curl/commit/0c4b4c1e93c8e869af230090f32346fdfd548f21
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "curl",
|
||||
"version": "8.8.0",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "A library for transferring data with URLs",
|
||||
"homepage": "https://curl.se/",
|
||||
"license": "curl AND ISC AND BSD-3-Clause",
|
||||
|
@ -2102,7 +2102,7 @@
|
||||
},
|
||||
"curl": {
|
||||
"baseline": "8.8.0",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"curlpp": {
|
||||
"baseline": "2018-06-15",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5d79bcc154132c187557e076a5bf5e0f5736dd6a",
|
||||
"version": "8.8.0",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "2924ae75a54112be27209863ebe3d343da7541ba",
|
||||
"version": "8.8.0",
|
||||
|
Loading…
Reference in New Issue
Block a user