heliclei/cocos2d-x — pull request #32 by heliclei (2014-04-25 10:33:33+00:00)
Title: HttpClient - add static method to enable and disable ssl support

The version of libcurl included with cocos2d-x supports ssl. You can currently use curl directly to support ssl, but there doesn't seem like any reason why HttpClient shouldn't support https. Currently HttpClient disables ssl checks which creates a security vulnerability for those who are unaware. Add `?w=1` to this pull request to view without whitespace changes. These files originally included a lot of trailing spaces.

This pull request adds two functions you would use like this

auto sharedFileUtils = FileUtils::getInstance();
std::string ret = sharedFileUtils->fullPathForFilename("ca-chain.crt");

cocos2d::network::HttpClient::enableSSLCaInfo(ret); // function 1 to enable
cocos2d::network::HttpClient::disableSSLCaInfo(); // function 2 to disable

The functions are static since enable or disabling https is something you either want or do not want.