Enable SSL certificate verification for PlayFab API requests - #200
Merged
Raul Gomez Rodriguez (rgomez391) merged 1 commit intoJun 26, 2026
Merged
Conversation
CURLOPT_SSL_VERIFYPEER was set to false, disabling TLS certificate verification for all PlayFab API requests and exposing the secret API key and traffic to man-in-the-middle attacks. Set it to true to match the upstream XPlatCppSdk fix. Resolves AB#62661974.
Raul Gomez Rodriguez (rgomez391)
deleted the
raulgomez/fix-ssl-verifypeer-62661974
branch
June 26, 2026 16:04
Dimitris Gkanatsios (dgkanatsios)
added a commit
that referenced
this pull request
Aug 7, 2026
Removes the vendored PlayFab REST API SDK (cpp/cppsdk/source/playfab and cpp/cppsdk/include/playfab), a fork of XPlatCppSdk frozen at 2.0.180420 (April 2018). It is dead code: not compiled by CMakeLists.txt or the Windows project, not linked into a game server even when compiled (zero PlayFabHttp symbols on either platform), and not shipped, since the NuGet package exports only gsdk.h. This also reverts #200, which set CURLOPT_SSL_VERIFYPEER to true in PlayFabHttp.cpp. Verified on both platforms that it had no effect on any shipped artifact: with the PR applied versus reverted, the library and game server binaries are byte-identical. The GSDK heartbeat to the VM Agent was never affected either way, as it uses a separate curl handle over a hardcoded plain-HTTP URL. It was not a safe no-op if that code were ever revived on Windows, though. The bundled libcurl links OpenSSL 1.1, which ignores the Windows certificate store, and no CA bundle ships with the SDK, so the request fails with curl error 60. The deleted "TODO: Replace this with a ca-bundle ref???" comment described the work still outstanding. Removing the code retires that risk rather than leaving a broken path behind. Games needing PlayFab APIs should use PlayFab/XPlatCppSdk directly. Also strips the PlayFab calls from cppLinuxTestApp, drops the now inert DISABLE_PLAYFABCLIENT_API define from the Windows test apps, and makes gsdk.h self-contained. The public header used uint32_t and tm unqualified without including the relevant headers, so it now includes both the C and C++ spellings: the C compatibility headers guarantee the global names it relies on, the C++ headers keep std::tm and std::uint32_t available to consumers. Verified on Linux (SDK, both test apps, consumer game server, gsdk.h standalone under C++11/14/17/20 with -pedantic) and Windows (shipped library, unit tests 15/15 passing), plus end-to-end runs against LocalMultiplayerAgent on both platforms showing an unchanged lifecycle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables TLS certificate verification for all PlayFab API requests in the C++ GSDK.
Previously, CURLOPT_SSL_VERIFYPEER was set to
falseinPlayFabHttp.cpp, disabling SSL certificate verification for every PlayFab API call. This exposed the developer's secret API key and all API traffic to man-in-the-middle (MITM) interception. The disabling was a temporary workaround (// TODO: Replace this with a ca-bundle ref???) that was never resolved.Fix
Set
CURLOPT_SSL_VERIFYPEERtotrue, matching the resolution already shipped in the sibling SDKPlayFab/XPlatCppSdk.CURLOPT_SSL_VERIFYHOSTremains at its secure default (2).Testing
Notes
Resolves AB#62661974