mrtazz / restclient-cpp

C++ client for making HTTP/REST requests
http://code.mrtazz.com/restclient-cpp/
MIT License
1.55k stars 376 forks source link

How to set a list of SSL Cipher Suites #100

Open badfd opened 6 years ago

badfd commented 6 years ago

What is the functional equivalent of:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST, "TLSv1");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

using RestClient-cpp?

See: CURLOPT_SSL_CIPHER_LIST

badfd commented 6 years ago

For this wrapper library to have wide adoption, developers need access to the full power of the underlying libcurl features. i.e. The API must provide access to the CURL handle ['curlHandle'].

Rather than hack the RestClient-cpp source to give themselves libcurl access, I can imagine that developers will bypass RestClient-cpp altogether and go directly to libcurl.

mrtazz commented 6 years ago

There isn't a way to do this yet, but I agree this would be useful to have.

edwinpjacques commented 3 years ago

@badfd it would be pretty easy to add a method to the Connection for power users that wraps curl_easy_setopt, without giving the curl handle. Would that give you enough of what you need? Feel free to make a PR for that change so it can be reviewed.