英文:
Add certificates to Postman to connect to Go server
问题
我按照教程进行操作。所以,我将server.crt和server.key添加到服务器初始化中。
err = r.RunTLS(":8080", "/users/myuser/server.crt", "/users/myuser/server.key")
然后我尝试向Postman发送请求。为此,我将证书添加到Postman中:
主机
localhost:8080
CRT文件
/Users/myuser/client.crt
KEY文件
/Users/myuser/client.key
密码
•••••
但是当我发送请求时,我收到了以下错误 - SSL错误:无法验证第一个证书。我知道我可以禁用SSL验证,但似乎应该有一种不禁用的选项来解决这个问题。你能帮助我吗?
英文:
I followed the following tutorial. So, I added server.crt and server.key to server initialization
err = r.RunTLS(":8080", "/users/myuser/server.crt", "/users/myuser/server.key")
Then I tried to send a request to Postman. For this purpose, I added certificate to Postman:
Host
localhost:8080
CRT file
/Users/myuser/client.crt
KEY file
/Users/myuser/client.key
Passphrase
•••••
But when I send the request I got this error - SSL Error: Unable to verify the first certificate. I know that I can disable SSL verification but it seems that there should be an option to do it without disabling it. Can you please help me
答案1
得分: 1
这是一个示例网站,链接为https://untrusted-root.badssl.com/。
客户端证书用于客户端身份验证,而CA证书用于验证服务器的身份。
在SSL证书的情况下,您只需要将正确的根CA添加到Postman中。
-
打开浏览器并访问该网站。
-
点击证书错误并点击查看证书。
-
点击证书路径,然后点击根证书并点击查看。
-
现在点击详细信息并选择复制到文件。
-
浏览并给新文件命名。
-
将创建的文件添加到Postman中。
**注意:**您还可以在设置中完全禁用SSL验证。
英文:
https://untrusted-root.badssl.com/
THis an example website ,
Client certificates are used for authentication of client, while CA certificates is to authenticate the identity of the server.
Incase of ssl certificate , you just need to add the correct Root CA to postman.
-
TO do this open the website in browser:
-
Click on the certificate error and click view certificate
- CLick on cert path and click root cert and click view
- Now click details and select copy to file
- Add the created file to postman
Note: you can also disable SSL validation all together from settings
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论