diff options
Diffstat (limited to 'backends/cloud/box')
-rw-r--r-- | backends/cloud/box/boxstorage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backends/cloud/box/boxstorage.cpp b/backends/cloud/box/boxstorage.cpp index c2c4c6278e..58a2541a74 100644 --- a/backends/cloud/box/boxstorage.cpp +++ b/backends/cloud/box/boxstorage.cpp @@ -29,10 +29,14 @@ #include "backends/networking/curl/connectionmanager.h" #include "backends/networking/curl/curljsonrequest.h" #include "backends/networking/curl/networkreadstream.h" +#include "common/config-manager.h" #include "common/debug.h" #include "common/json.h" #include <curl/curl.h> -#include "common/config-manager.h" + +#ifdef ENABLE_RELEASE +#include "dists/clouds/cloud_keys.h" +#endif namespace Cloud { namespace Box { @@ -46,6 +50,10 @@ char *BoxStorage::KEY = nullptr; //can't use CloudConfig there yet, loading it o char *BoxStorage::SECRET = nullptr; //TODO: hide these secrets somehow void BoxStorage::loadKeyAndSecret() { +#ifdef ENABLE_RELEASE + KEY = RELEASE_BOX_KEY; + SECRET = RELEASE_BOX_SECRET; +#else Common::String k = ConfMan.get("BOX_KEY", ConfMan.kCloudDomain); KEY = new char[k.size() + 1]; memcpy(KEY, k.c_str(), k.size()); @@ -55,6 +63,7 @@ void BoxStorage::loadKeyAndSecret() { SECRET = new char[k.size() + 1]; memcpy(SECRET, k.c_str(), k.size()); SECRET[k.size()] = 0; +#endif } BoxStorage::BoxStorage(Common::String accessToken, Common::String refreshToken): |