cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

azure313
New member | Level 2

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

 

1 Reply 1

Greg-DB
Dropbox 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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?