Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2018-03-03 13:42:46 -06:00
commit e3a1e47824

View File

@ -313,6 +313,14 @@ class X509
*/ */
static $recur_limit = 5; static $recur_limit = 5;
/**
* URL fetch flag
*
* @var bool
* @access private
*/
var $disable_url_fetch = false;
/** /**
* Default Constructor. * Default Constructor.
* *
@ -2121,6 +2129,10 @@ class X509
*/ */
static function _fetchURL($url) static function _fetchURL($url)
{ {
if ($this->disable_url_fetch) {
return false;
}
$parts = parse_url($url); $parts = parse_url($url);
$data = ''; $data = '';
switch ($parts['scheme']) { switch ($parts['scheme']) {
@ -2429,6 +2441,26 @@ class X509
self::$recur_limit = $count; self::$recur_limit = $count;
} }
/**
* Prevents URIs from being automatically retrieved
*
* @access public
*/
function disableURLFetch()
{
$this->disable_url_fetch = true;
}
/**
* Allows URIs to be automatically retrieved
*
* @access public
*/
function enableURLFetch()
{
$this->disable_url_fetch = false;
}
/** /**
* Reformat public keys * Reformat public keys
* *