8000 Curl 请求 Https · Issue #50 · holdyounger/ScopeBlog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Curl 请求 Https #50
Open
Open
@holdyounger

Description

@holdyounger

Curl 请求 Https

使用 curl 发送 https 请求时,如下命令就会报错:

curl "https://www.baidu.com"

错误代码:

<div style="background:black;font:conloas;color:white;">
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
</div>

一般的解决办法就是下载CA证书。但是使用C++代码调用 libcurl 发送 https 请求,只需要在设置一下这个就可以关闭 ssl 验证,从而能够发送 https 请求。

curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);

blog link Curl 请求 Https

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0