小编Ric*_*nzo的帖子

使用自签名证书 cURL 本地 GO 服务器

因此,我有一个简单的GO服务器在端口上运行8080,使用我使用以下命令创建的自签名证书:

\n\n
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out local.crt -keyout local.key\n
Run Code Online (Sandbox Code Playgroud)\n\n

创建它时,我将字段设置为以下值:\n在此输入图像描述
\n如你所见,我跳过了除fully qualified host name我设置的之外的所有内容go-auth

\n\n

local.key我使用和文件成功启动了我的 go 服务器local.crt

\n\n

我尝试像这样卷曲它:

\n\n
\xe2\x9e\x9c  certs git:(master) \xe2\x9c\x97 curl --proxy-cacert local.crt https://go-auth/\ncurl: (6) Could not resolve host: go-auth\n\n\xe2\x9e\x9c  certs git:(master) \xe2\x9c\x97 curl --proxy-cacert local.crt https://localhost:8080/\ncurl: (60) SSL certificate problem: self signed certificate\nMore details here: https://curl.haxx.se/docs/sslcerts.html\n\ncurl failed to verify the legitimacy of the server …
Run Code Online (Sandbox Code Playgroud)

ssl curl tls1.2

1
推荐指数
1
解决办法
2942
查看次数

标签 统计

curl ×1

ssl ×1

tls1.2 ×1