SystemCertificates.cpp 819 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "os/c-api/il2cpp-config-platforms.h"
  2. #if (IL2CPP_TARGET_LINUX || IL2CPP_TARGET_QNX) && !RUNTIME_TINY
  3. #include "os/SystemCertificates.h"
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. void* SystemCertificates::OpenSystemRootStore()
  9. {
  10. return 0;
  11. }
  12. int SystemCertificates::EnumSystemCertificates(void* certStore, void** iter, int *format, int* size, void** data)
  13. {
  14. // Default location for linux CA
  15. const char* path = "/etc/ssl/certs/ca-certificates.crt";
  16. if (*iter == 0)
  17. {
  18. *data = (void*)(path);
  19. *size = sizeof((char*)path);
  20. *format = DATATYPE_FILE;
  21. *iter = (void*)1;
  22. return 1;
  23. }
  24. return 0;
  25. }
  26. void SystemCertificates::CloseSystemRootStore(void* cStore)
  27. {
  28. }
  29. }
  30. }
  31. #endif