mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
Remove custom CA certs
The included collection of CA certificates has not been updated since 2021, which means it's outdated and possibly a security risk. Also it should not be necessary, as curl is able to find the system installed CA certs which is more likely to be up to date and safer.
This commit is contained in:
@@ -13,15 +13,6 @@ use Zotlabs\Web\HTTPSig;
|
||||
* @brief Network related functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns path to CA file.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function get_capath() {
|
||||
return appdirpath() . '/library/cacert.pem';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief fetches an URL.
|
||||
*
|
||||
@@ -63,7 +54,6 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
|
||||
|
||||
@curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
@curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
||||
@curl_setopt($ch, CURLOPT_CAINFO, get_capath());
|
||||
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
@curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
@curl_setopt($ch, CURLOPT_ENCODING, '');
|
||||
@@ -262,7 +252,6 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) {
|
||||
|
||||
@curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
@curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
||||
@curl_setopt($ch, CURLOPT_CAINFO, get_capath());
|
||||
@curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
@curl_setopt($ch, CURLOPT_POST,1);
|
||||
@curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
|
||||
|
||||
Reference in New Issue
Block a user