-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
测试https 使用curl 验证不通过 #209
Comments
openssl版本是什么版本? |
我之前测试的好像是1.02版 |
alvin@node1:~$ openssl version |
新版本我都还没测试过 |
不确定asio是不是支持了新版本的ssl,我要确认一下 |
好的,谢谢 |
可否测试一下最新的代码呢? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#由ca 生成证书
openssl genrsa -out server.key 1024
openssl req -new -subj /CN=thgy/O=thchain/OU=keyms -key server.key -out server.csr
openssl genrsa -out ca.key 1024
openssl req -new -subj /CN=thgy/O=thchain/OU=keyms -key ca.key -out ca.csr
openssl x509 -req -in ca.csr -signkey ca.key -out ca.crt
openssl x509 -req -CA ca.crt -CAkey ca.key -CAcreateserial -in server.csr -out server.crt
openssl x509 -in ca.crt -out ca.pem -outform PEM
https 服务端 使用 server.key server.crt
客户端使用
curl --cacert ca_info.pem -H "Content-type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"encDataKey","params":["'123456'"],"id":83}' https://127.0.0.1:9001/
访问 alvin@node1:~/thkms/scripts$ curl --cacert ca_info.pem -H "Content-type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"encDataKey","params":["'123456'"],"id":83}' https://127.0.0.1:9001/
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.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.
报错,能帮忙确认下问题吗? 使用不验证对端可以访问
The text was updated successfully, but these errors were encountered: