gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / kodi-set-libcurl-ssl-parameters.patch
1 Kodi doesn't set the CAPATH and CAINFO parameters for libcurl. To make HTTPS
2 connections work we can set them based on SSL_CERT_DIR and SSL_CERT_FILE.
3
4 --- a/xbmc/filesystem/CurlFile.cpp
5 +++ b/xbmc/filesystem/CurlFile.cpp
6 @@ -626,5 +626,9 @@
7 if (!m_cipherlist.empty())
8 g_curlInterface.easy_setopt(h, CURLOPT_SSL_CIPHER_LIST, m_cipherlist.c_str());
9
10 + // Load certificate data from environment paths
11 + g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAPATH, getenv("SSL_CERT_DIR"));
12 + g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAINFO, getenv("SSL_CERT_FILE"));
13 +
14 // enable HTTP2 support. default: CURL_HTTP_VERSION_1_1. Curl >= 7.62.0 defaults to CURL_HTTP_VERSION_2TLS
15 g_curlInterface.easy_setopt(h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
16 -
17 }