Android and libCurl https

前端 未结 2 1070
自闭症患者
自闭症患者 2021-01-27 00:57

Good evening,

I need to implement libCurl into one of our Android projects. I use JNI to call the c++ class with the libCurl code. Everything works just perfect but for

相关标签:
2条回答
  • 2021-01-27 01:42

    You need compile libcurl.so with "--with-ssl"

    Which is really suffering. Refer "http://ieroot.com/2015/03/29/1728.html", may help you .

    0 讨论(0)
  • 2021-01-27 01:54

    From libcurl errors manpage:

       CURLE_UNSUPPORTED_PROTOCOL (1)
              The URL you passed to libcurl used a protocol that this  libcurl
              does  not  support.  The  support might be a compile-time option
              that you didn't use, it can be a misspelled protocol  string  or
              just a protocol libcurl has no code for.
    

    The compile-time option is the important takeaway of this. So, test the library that you're using with curl_version_info() (manpage here) to see if it contains SSL support or not. The library doc may say it has SSL support, but please confirm. If it doesn't contain SSL support, then no https.

    0 讨论(0)
提交回复
热议问题