3
0

AWSApiJob.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Framework/AWSApiJob.h>
  9. namespace AWSCore
  10. {
  11. namespace Platform
  12. {
  13. Aws::String GetCaCertBundlePath();
  14. }
  15. const char* AwsApiJob::COMPONENT_DISPLAY_NAME = "AWSCoreFramework";
  16. AwsApiJob::AwsApiJob(bool isAutoDelete, IConfig* config)
  17. : AZ::Job(isAutoDelete, config->GetJobContext())
  18. {
  19. }
  20. AwsApiJob::Config* AwsApiJob::GetDefaultConfig()
  21. {
  22. static AwsApiJobConfigHolder<AwsApiJob::Config> s_configHolder{};
  23. return s_configHolder.GetConfig(nullptr,
  24. [](AwsApiJobConfig& config) {
  25. config.userAgent = "/O3DE_AwsApiJob";
  26. config.requestTimeoutMs = 30000;
  27. config.connectTimeoutMs = 30000;
  28. // Instructs the HTTP client where to find the SSL certificate trust store.
  29. // It is required to copy the cacert.pem to the expected file path for running the Android client.
  30. Aws::String caFilePath = Platform::GetCaCertBundlePath();
  31. if (!caFilePath.empty())
  32. {
  33. config.caFile = caFilePath;
  34. }
  35. }
  36. );
  37. };
  38. }