curl-library
Re: SSL "host endpoint"
Date: Fri, 26 Jun 2015 16:19:37 -0400
On 6/26/2015 3:38 PM, bch wrote:
> Hi. I want to know if there's something I can do to get this effect:
>
> curleasy_setopt_url http://192.168.1.99:443
> curleasy_setopt_effectivesslhostname www.fqdn.com <-- I want the
> endpoint cert to think this is how it was connected to.
>
> ...
>
> What I can do now is setopt_curleasy_sslverifypeer <false>, but I'd
> like to force something that should work, rather than ignoring errors
> wholesale.
Use CURLOPT_RESOLVE [1].
struct curl_slist *host_list = NULL;
host_list = curl_slist_append(NULL, "www.fqdn.com:443:192.168.1.99");
curl_easy_setopt(curl, CURLOPT_RESOLVE, host_list);
curl_easy_setopt(curl, CURLOPT_URL, "https://www.fqdn.com");
And after cleanup curl_slist_free_all(host_list); host_list = NULL;
[1]: http://curl.haxx.se/libcurl/c/CURLOPT_RESOLVE.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-26