0

I've checked quite a few StackOverflow posts, and still can't find a solution. I'm working with the Dropbox PHP API, but I believe that is irrelevant. What seems to be the issue is that cURL refuses to use the CAPATH or specific certificate provided by Dropbox for connecting to the API, and just gives up. After a series of debugging tests, this is what I got for output from 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

The dropbox API code sets CURLOPT_CAINFO and CURLOPT_CAPATH. I have checked that PHP can access the directory, and that file. I don't understand why cURL says Initializing NSS with certpath: none when I explicitly provided one... Any help would be appreciated.

ahamilton9
  • 134
  • 10

1 Answers1

1

I had this problem on Amazon ec2 instance (Amazon linux), restarting apache fixed it.

restarting using apachectl was not helpful

so do this using

/etc/init.d/httpd restart
inaK
  • 11
  • 2