因此,我有一个简单的GO服务器在端口上运行8080,使用我使用以下命令创建的自签名证书:
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out local.crt -keyout local.key\nRun Code Online (Sandbox Code Playgroud)\n\n创建它时,我将字段设置为以下值:\n
\n如你所见,我跳过了除fully qualified host name我设置的之外的所有内容go-auth
local.key我使用和文件成功启动了我的 go 服务器local.crt。
我尝试像这样卷曲它:
\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)