Recent change in libcurl causes the certificate store file option
(CAINFO) to be set to a specific value during the compilation.
To mitigate this behavior, zero-length string is passed as option
cainfo to nbdkit curl plugin, which sets the CAINFO option to null.
Signed-off-by: Wiktor Golgowski <wiktor.golgowski(a)intel.com>
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski(a)intel.com>
---
plugins/curl/curl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index 2e823b3f..a1b0afba 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -503,8 +503,12 @@ curl_open (int readonly)
curl_easy_setopt (h->c, CURLOPT_FAILONERROR, 1L);
/* Options. */
- if (cainfo)
- curl_easy_setopt (h->c, CURLOPT_CAINFO, cainfo);
+ if (cainfo) {
+ if (strlen (cainfo) == 0)
+ curl_easy_setopt (h->c, CURLOPT_CAINFO, NULL);
+ else
+ curl_easy_setopt (h->c, CURLOPT_CAINFO, cainfo);
+ }
if (capath)
curl_easy_setopt (h->c, CURLOPT_CAPATH, capath);
if (cookie)
--
2.26.2