Use SSL certificate with Stratum when provided

This commit is contained in:
pooler 2015-04-16 12:59:40 +02:00
parent ef6f5beeae
commit 02262ded0c

2
util.c
View file

@ -966,6 +966,8 @@ bool stratum_connect(struct stratum_ctx *sctx, const char *url)
if (opt_protocol)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
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_CONNECTTIMEOUT, 30);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, sctx->curl_err_str);