关于nginx证书的问题

一般证书上,对CRT和PEM证书没有特别做区分,故在nginx上部署了xxx.com_public.crt证书,发现curl 接口,出现如下错误:

curl 'https://xxx.com/api/campaign-names'
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

需要加上 -k 才能正确访问;若直接使用pem证书,则无需加上 -k 参数;

另外,对于curl 请求带有"[]"括号时,会提示"bad range in URL position"字样,可以使用 "-g" 或 "--globoff" 参数来解决。

Monthly Archives

Pages

Powered by Movable Type 7.9.4

About this Entry

This page contains a single entry by Cnangel published on October 23, 2023 2:57 PM.

putty私钥连接不上fedora的问题 was the previous entry in this blog.

fedora39发布了 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.