Initializing SSL and libcurl and getting “out of memory”

前端 未结 2 1916
傲寒
傲寒 2021-01-22 12:06

I intend to do https requests with libcurl and openssl with a C++ program.

I initialized libcurl with curl_global_init(CURL_GLOBAL_ALL) as described in the

相关标签:
2条回答
  • 2021-01-22 12:24

    I'm not aware of any problem in libcurl that would cause this error code to get returned if indeed a memory allocation function doesn't fail. Using OpenSSL in multiple modules does not cause such a failure. (I am the lead developer of libcurl.)

    So, run your app with VERBOSE set to libcurl, or even strace to see which syscall that fails and it should give you more clues.

    0 讨论(0)
  • 2021-01-22 12:25

    As the descibed in this answer, you might need to disable SSLv3 if you are on Ubuntu 16.04 like so

    curl_easy_setopt(curl_, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2));
    

    It was disabled on Ubuntu 16.04 for security reasons, see more here.

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