diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-24 17:51:24 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-24 17:51:24 +0800 |
| commit | a2667831d91ca18b9b8d41ad1d52a721103f8750 (patch) | |
| tree | dbc5b3cac0ec139cf37a6aa79d8131999de0afb4 /client.c | |
| parent | b17f99e21de175efcf2ae460a5ca697794e29383 (diff) | |
Initialisation takes CA certificates file path
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6,7 +6,7 @@ CURL *curl = NULL; char *server_url = NULL; -bool rtclient_init(const char *url) +bool rtclient_init(const char *url, const char *certificate) { curl_global_init(CURL_GLOBAL_SSL); curl = curl_easy_init(); @@ -14,6 +14,8 @@ bool rtclient_init(const char *url) curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); curl_easy_setopt(curl, CURLOPT_REFERER, url); + if (certificate) + curl_easy_setopt(curl, CURLOPT_CAINFO, certificate); #ifdef DEBUG curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); #endif |