Forum Discussion

azure313's avatar
azure313
New member | Level 2
5 years ago

SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway

Hi, 

Our developer call API to upload file to Dropbox "https://content.dropboxapi.com/2/files/upload" using C, but it has this error:

I can you Postman or Java SDK code upload successful with the same paramter and access_token, but when our developer call curl in embedded device, it through this error.

Anybody know why it happen?

Thank you.

 

*   Trying 162.125.82.14:443...
*   Trying 2620:100:6032:14::a27d:520e:443...
* Immediate connect fail for 2620:100:6032:14::a27d:520e: Network is unreachable
* Connected to content.dropboxapi.com (162.125.82.14) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc; CN=content.dropboxapi.com
*  start date: Jan 29 00:00:00 2020 GMT
*  expire date: Mar  2 12:00:00 2022 GMT
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> POST /2/files/upload HTTP/1.1
Host: content.dropboxapi.com
Accept: */*
"Authorization: Bearer  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"Dropbox-API-Arg: {"path": "/video/upload/T20371B001/2020/11/02/08-49-20-356990607.mp4","mode": "add","autorename": true,"mute": false,"strict_conflict": false}"
"Content-Type: application/octet-stream"
Content-Length: 9356071
Content-Type: multipart/form-data; boundary=------------------------211807cf1d53183a
Expect: 100-continue

* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Content-Length: 11
< Content-Type: text/plain
< Date: Mon, 02 Nov 2020 04:29:04 GMT
< Server: envoy
< Connection: close
< 
* Failed writing body (1 != 11)
D/[11-02 04:29:03 tid:-1224] (file_trans.c cb:273)  data is Bad Request 

* Closing connection 0

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    There are a few things to note here:

     

    • "Network is unreachable" seems to indicate an issue with the network connection, but the connection appears to then actually work anyway.
    • "unable to get local issuer certificate (20), continuing anyway" seems to indicate that the client wasn't able to get the relevant certificate from its local store, but ignored this issue. (Do you have certificate verification disabled? This isn't recommended, as a matter of security.) The Dropbox API content servers are being served with valid certificates though, so you should make sure your system trusts that and enable verification.
    • You seem to be using a "Content-Type" of "multipart/form-data...", which isn't supported by the Dropbox API. The /2/files/upload endpoint expects a request of type "application/octet-stream".
    • You seem to be getting a 400 error back. You should print out the response body itself, as it should contain a more useful error. (It may be related to the incorrect "Content-Type" noted above.)
    • The "Failed writing body" seems to indicate that curl wasn't able to write the body out for some reason. I can't offer much support for that though as it seems to be related to curl itself.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 days ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!