Windows Call API with Curl with certificates

ufj5ltwl  于 8个月前  发布在  Windows
关注(0)|答案(1)|浏览(79)

我尝试在我的windows机器上调用我的API。我尝试通过gitbash中存在的curl请求,我得到了证书错误

curl  --cert mypc\mysample.crt --key mypc\mysample.key --cacert mypc\mysample.crt https://localhost:8073/api/hello

字符串
curl:(58)schannel:无法导入证书文件mypc\mysample.crt,最后一个错误是0x80092002
Git版本:git version 2.41.0.windows.1

vktxenjb

vktxenjb1#

此错误与curl版本有关,例如8.1.2版不再支持crt使用。有两种可能的解决方案降低curl版本(安全风险)或使用pem证书。

相关问题