1

对于能够挂载用户目录的 Web 应用程序,我想为用户提供一个选项来上传他的根证书以在 ssl 上使用 curl。

我尝试将 capath 设置为上传目录(CURLOPT_CAPATH => $capath),但仍然收到以下错误消息:

[CURL] Error while making request: SSL certificate problem, verify that the CA cert is OK

如果我尝试将证书另外设置到路径(但我更愿意设置 curl 以接受由用户提供的一堆根证书签名的所有证书)。

无论如何,如果我出于测试目的设置:

CURLOPT_CAPATH => $capath
CURLOPT_CAINFO => $capath."/myrootcert.der"

我收到此错误消息:

[CURL] Error while making request: error setting certificate verifylocations:\n  CAfile: /foo/bar/cacertroot.der\n  CApath: /foo/bar/\n (error code: 77)

任何提示我做错了什么?谢谢!

4

0 回答 0