From 86d1a677fd310d7d90d6f7545c02a4bd68e1d955 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Wed, 4 Jun 2025 09:49:23 +0300 Subject: libcurl: update to 8.14.0 --- libs/libcurl/src/vtls/schannel_verify.c | 41 +++++++++++++++++---------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'libs/libcurl/src/vtls/schannel_verify.c') diff --git a/libs/libcurl/src/vtls/schannel_verify.c b/libs/libcurl/src/vtls/schannel_verify.c index 26b3805cc6..69d79182cf 100644 --- a/libs/libcurl/src/vtls/schannel_verify.c +++ b/libs/libcurl/src/vtls/schannel_verify.c @@ -29,7 +29,7 @@ * only be invoked by code in schannel.c. */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SCHANNEL #ifndef USE_WINDOWS_SSPI @@ -39,19 +39,20 @@ #include "schannel.h" #include "schannel_int.h" -#include "inet_pton.h" +#include "../curlx/inet_pton.h" #include "vtls.h" #include "vtls_int.h" -#include "sendf.h" -#include "strerror.h" -#include "curl_multibyte.h" -#include "curl_printf.h" +#include "../sendf.h" +#include "../strerror.h" +#include "../curlx/winapi.h" +#include "../curlx/multibyte.h" +#include "../curl_printf.h" #include "hostcheck.h" -#include "version_win32.h" +#include "../curlx/version_win32.h" /* The last #include file should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #define BACKEND ((struct schannel_ssl_backend_data *)connssl->backend) @@ -174,7 +175,7 @@ static CURLcode add_certs_data_to_store(HCERTSTORE trust_store, NULL, NULL, (const void **)&cert_context)) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to extract certificate from CA file " "'%s': %s", @@ -203,7 +204,7 @@ static CURLcode add_certs_data_to_store(HCERTSTORE trust_store, NULL); CertFreeCertificateContext(cert_context); if(!add_cert_result) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to add certificate from CA file '%s' " "to certificate store: %s", @@ -251,7 +252,7 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store, ca_file_tstr = curlx_convert_UTF8_to_tchar(ca_file); if(!ca_file_tstr) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: invalid path name for CA file '%s': %s", ca_file, @@ -273,7 +274,7 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store, FILE_ATTRIBUTE_NORMAL, NULL); if(ca_file_handle == INVALID_HANDLE_VALUE) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to open CA file '%s': %s", ca_file, @@ -283,7 +284,7 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store, } if(!GetFileSizeEx(ca_file_handle, &file_size)) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to determine size of CA file '%s': %s", ca_file, @@ -313,7 +314,7 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store, if(!ReadFile(ca_file_handle, ca_file_buffer + total_bytes_read, bytes_to_read, &bytes_read, NULL)) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to read from CA file '%s': %s", ca_file, @@ -614,7 +615,7 @@ CURLcode Curl_verify_host(struct Curl_cfilter *cf, &pCertContextServer); if((sspi_status != SEC_E_OK) || !pCertContextServer) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: Failed to read remote certificate context: %s", Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); goto cleanup; @@ -770,7 +771,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf, &pCertContextServer); if((sspi_status != SEC_E_OK) || !pCertContextServer) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: Failed to read remote certificate context: %s", Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); result = CURLE_PEER_FAILED_VERIFICATION; @@ -806,7 +807,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf, CERT_STORE_CREATE_NEW_FLAG, NULL); if(!trust_store) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to create certificate store: %s", curlx_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); result = CURLE_SSL_CACERT_BADFILE; @@ -853,7 +854,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf, CertCreateCertificateChainEngine( (CERT_CHAIN_ENGINE_CONFIG *)&engine_config, &cert_chain_engine); if(!create_engine_result) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: failed to create certificate chain engine: %s", curlx_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); @@ -878,7 +879,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf, CERT_CHAIN_REVOCATION_CHECK_CHAIN), NULL, &pChainContext)) { - char buffer[STRERROR_LEN]; + char buffer[WINAPI_ERROR_LEN]; failf(data, "schannel: CertGetCertificateChain failed: %s", curlx_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); pChainContext = NULL; -- cgit v1.2.3