1

I recently went about compiling libcurl for use with Vs2013, which turned out to fairly straight forward thanks to some very useful help here on stackoverflow. After some cajoling and more online help, I've even managed to get curl to play nice inside a unique_ptr.

Standard HTTP and HTTPS transactions using curl work fine with google.com. However, a particular site using https (www.slayradio.org) unfortunately results in an 'SSL connect error'.

I have no problem connecting to the domain via https using curl in PHP. But I need it to work in C++ as well.

It seems that CURLOPT_VERBOSE is just the ticket, but turning it on seems to have no effect what so ever. I see no additional output in either the console window, nor the internal IDE output window. I messed around with the CURLOPT_STDERR option trying to specific a concrete file it should output to for a while, until I finally discovered that via the curl FAQ that passing a FILE* pointer to the libcurl DLL (which I do) causes an access violation. I know the FAQ specifically refers to CURLOPT_WRITEDATA and CURLOPT_READDATA, not CURLOPT_STDERR, but I can't imagine the same isn't the case, here.

I've discovered the CURLOPT_ERRORBUFFER setting, which a yields a slightly more helpful output:

Unknown SSL protocol error in connection to www.slayradio.org:443

But I'm still at a loss at what's causing issues.

It'd much appreciate if anyone can tell me if I shouldn't actually be seeing more output by enabling CURLOPT_VERBOSE in the console window?

I'd also be curious to hear if someone can has run into something similar before.

If I can't get Curl to be more verbose, it seems like the only option is to make use of the CURLOPT_DEBUGFUNCTION.

Community
  • 1
  • 1
Gazoo
  • 215
  • 4
  • 14

1 Answers1

0

Unfortunately this is only a half-answer.

First and foremost I did not, and have still not, gotten to the bottom of why turning on CURLOPT_VERBOSE seemingly does nothing. Setting CURLOPT_VERBOSE to 1L seems to change nothing.

However, I did manage to find the root of the problems I was experiencing. I isolated the newly compiled cUrl library to a new project, and realized that a different/older cUrl library from TwitCurl was still hanging around on my system along with some libraries for the SSL/TLS protocol. This ended up interfering with the newly compiled cUrl library, causing it to not be able to figure out which protocols were available to it.

So... I guess the best advice I can give is to further isolate the problem if possible (which I should have done from the start), and be wary of older libraries hanging about.

Gazoo
  • 215
  • 4
  • 14