We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

libcurl - SSL and GZIP

  • Hi, I'm pretty new to Onion - love the hardware, it's a really cool device 🙂

    I'm trying to get a program running and have managed to get my head around the cross-compilation process and have C code running on device and could really do with some advice please!

    The program uses a lib that in turn uses libcurl in a way that seems to cause problems. I can edit the lib source and alter the CURL options to get a bit further in the process of getting my program running, but the options themselves should be pretty standardm so I hoped there's a fairly simple answer that I just can't find.

    1. SSL - hitting a secure API gave a CURL result_code of 77 - I could see certs in /etc/ssl/certs and linked the program appropriately as far as I can tell - using -lz -lcrypto -lssl -lmbedtls -lmbedx509 -lmbedcrypto -lcurl.
      Is there some OS config, option or linking I am missing to allow libcurl and SSL?

    For now I have added curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);, but that led to the next problem...

    1. The lib has curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");
    • with this line in, the response body is never decoded - it shows in the terminal as "�" - taking it out allows me to get the body.
      I wondered if I am missing a link to a library or whether this might be an OS build option?

    Thanks in advance,

  • @Steve-Robbins
    Not sure about the second problem, but you ought to be able to solve the first one with either:

    opkg install ca-bundle


    opkg install ca-certificates

  • @cas said in libcurl - SSL and GZIP:

    opkg install ca-bundle

    Great, thanks @cas - opkg install ca-bundle sorted that first one!

Looks like your connection to Community was lost, please wait while we try to reconnect.