On 09/30/15 10:55, Jakub Zakrzewski wrote:

I'd say that the problem is the certificate. Normally it's being issued
for particular DNS name. When you put an IP there it doesn't match thus
the failure. There are basically 3 ways to avoid the problem:

1) use DNS name

2) set the handle as insecure (not recommended)

3) server must have an additional certificate issued for the IP address
and present it to the client

The OP didn't say why they wanted to use the IP address rather than hostname - one possibility is that they want to test against a different IP address e.g. when testing a server before going live.

I think that using the hostname in the URL but then setting CURLOPT_RESOLVE to supply the IP address would have the desired effect.

--
Colin Hogben

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to