CMake 文件下载获得 35;"SSL connect error"



我试着"为下面的CMakeLists.txt,但得到

状态为35;"SSL连接错误">

—Internet连接失败

但是,我可以成功运行bellow而没有错误

curl https://librealsense.intel.com/Releases/connectivity_check

请帮忙检查问题出在哪里?

下面是CMakeLists.txt

project(test)
cmake_minimum_required(VERSION 3.16)
message(STATUS "Checking internet connection...")
file(DOWNLOAD "https://librealsense.intel.com/Releases/connectivity_check" "${CMAKE_CURRENT_SOURCE_DIR}/connectivity_check" SHOW_PROGRESS TIMEOUT 5 STATUS status)
message("Status is ${status}")
list (FIND status ""No error"" _index)
if (${_index} EQUAL -1)
message(STATUS "Failed to identify Internet connection")
set(INTERNET_CONNECTION OFF)
else()
message(STATUS "Internet connection identified")
set(INTERNET_CONNECTION ON)
endif()

curl -v logs:

curl -v https://librealsense.intel.com/Releases/connectivity_check
*   Trying 10.239.120.55:913...
* TCP_NODELAY set
* Connected to myproxy.mycrop.com (10.239.120.55) port 913 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to librealsense.intel.com:443
> CONNECT librealsense.intel.com:443 HTTP/1.1
> Host: librealsense.intel.com:443
> User-Agent: curl/7.68.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CONNECT phase completed!
* CONNECT phase completed!
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=librealsense.intel.com
*  start date: Sep  8 00:00:00 2021 GMT
*  expire date: Oct  7 23:59:59 2022 GMT
*  subjectAltName: host "librealsense.intel.com" matched cert's "librealsense.intel.com"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5601ae3f82f0)
> GET /Releases/connectivity_check HTTP/2
> Host: librealsense.intel.com
> user-agent: curl/7.68.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: text/plain
< content-length: 0
< last-modified: Wed, 07 Oct 2020 11:24:40 GMT
< x-amz-meta-cb-modifiedtime: Sun, 28 Oct 2018 12:18:10 GMT
< x-amz-version-id: bjWssG7FCxy5hCp_yqMVzye_pkL8Ty5e
< accept-ranges: bytes
< server: AmazonS3
< date: Mon, 02 May 2022 02:49:25 GMT
< etag: "d41d8cd98f00b204e9800998ecf8427e"
< x-cache: RefreshHit from cloudfront
< via: 1.1 5c35539543902c678280929df206948c.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA19-C3
< x-amz-cf-id: QMe-VbE0k-UGY9R6ffhqqtHPbUFPrss-7u_a8LylcRCKOJGai0riPg==
<
* Connection #0 to host myproxy.mycrop.com left intact

强制https_proxy使用http解决问题

https_proxy = http://myproxy.mycopr.com: 913

最新更新