Use SSL certificate with Stratum when provided
This commit is contained in:
parent
ef6f5beeae
commit
02262ded0c
1 changed files with 2 additions and 0 deletions
2
util.c
2
util.c
|
@ -966,6 +966,8 @@ bool stratum_connect(struct stratum_ctx *sctx, const char *url)
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, sctx->curl_url);
|
curl_easy_setopt(curl, CURLOPT_URL, sctx->curl_url);
|
||||||
|
if (opt_cert)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_CAINFO, opt_cert);
|
||||||
curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
|
curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
|
||||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
|
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
|
||||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, sctx->curl_err_str);
|
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, sctx->curl_err_str);
|
||||||
|
|
Loading…
Reference in a new issue