我已经检查了很多 StackOverflow 帖子,但仍然找不到解决方案。我正在使用 Dropbox PHP API,但我认为这无关紧要。似乎问题在于cURL 拒绝使用 CAPATH 或 Dropbox 提供的特定证书来连接 API,而只是放弃了. 经过一系列调试测试,这是我从 CURLOPT_VERBOSE 得到的输出:
* Adding handle: conn: 0x252c110
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 2 (0x252c110) send_pipe: 1, recv_pipe: 0
* About to connect() to api.dropbox.com port 443 (#2)
* Trying 108.160.167.19...
* Connected to api.dropbox.com (108.160.167.19) port 443 (#2)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* Unable to initialize NSS database
* Initializing NSS with certpath: none
* Unable to initialize NSS
* Closing connection 2
Dropbox API 代码集CURLOPT_CAINFO
和CURLOPT_CAPATH
. 我检查了 PHP 是否可以访问该目录和该文件。我不明白为什么Initializing NSS with certpath: none
当我明确提供一个时 cURL 会说...任何帮助将不胜感激。