mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
29 lines
576 B
C++
29 lines
576 B
C++
#include "curl_handle.h"
|
|
#include "Emu/System.h"
|
|
|
|
#ifdef _WIN32
|
|
#include "Utilities/StrUtil.h"
|
|
#endif
|
|
|
|
curl_handle::curl_handle(QObject* parent) : QObject(parent)
|
|
{
|
|
m_curl = curl_easy_init();
|
|
|
|
#ifdef _WIN32
|
|
// This shouldn't be needed on linux
|
|
const std::string path_to_cert = Emulator::GetExeDir() + "cacert.pem";
|
|
const std::string ansi_path = utf8_path_to_ansi_path(path_to_cert);
|
|
|
|
curl_easy_setopt(m_curl, CURLOPT_CAINFO, ansi_path.data());
|
|
#endif
|
|
}
|
|
|
|
curl_handle::~curl_handle()
|
|
{
|
|
curl_easy_cleanup(m_curl);
|
|
}
|
|
|
|
CURL* curl_handle::get_curl() const
|
|
{
|
|
return m_curl;
|
|
}
|