LoginSignup
10
10

More than 5 years have passed since last update.

cocos2d-xのHttpClientがSSL証明書のチェックをできるようにした

Posted at

本家にプルリク出したらマージされました。
https://github.com/cocos2d/cocos2d-x/pull/8029

cocos2d-xのHttpClientは、内部で使用しているcurlのオプションでSSL証明書のチェックが無効化されていたので、これを有効化できるようにしました。

auto path = FileUtils::getInstance()->fullPathForFilename("cacert.pem");
HttpClient::getInstance()->setSSLVerification(path);

こうすると、ローカルに持っているSSLのルート証明書を使って、ちゃんと意図したサーバーに接続しようとしているかを検証できます。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10