mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 02:35:10 +00:00
X509: select function accessibility changes
This commit is contained in:
parent
dfde088d4c
commit
6c1befa7cb
@ -576,8 +576,8 @@ class X509
|
|||||||
$map = $this->getMapping($id);
|
$map = $this->getMapping($id);
|
||||||
if (!is_bool($map)) {
|
if (!is_bool($map)) {
|
||||||
$decoder = $id == 'id-ce-nameConstraints' ?
|
$decoder = $id == 'id-ce-nameConstraints' ?
|
||||||
[$this, 'decodeNameConstraintIP'] :
|
[static::class, 'decodeNameConstraintIP'] :
|
||||||
[$this, 'decodeIP'];
|
[static::class, 'decodeIP'];
|
||||||
$mapped = ASN1::asn1map($decoded[0], $map, ['iPAddress' => $decoder]);
|
$mapped = ASN1::asn1map($decoded[0], $map, ['iPAddress' => $decoder]);
|
||||||
$value = $mapped === false ? $decoded[0] : $mapped;
|
$value = $mapped === false ? $decoded[0] : $mapped;
|
||||||
|
|
||||||
@ -661,7 +661,7 @@ class X509
|
|||||||
unset($extensions[$i]);
|
unset($extensions[$i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = ASN1::encodeDER($value, $map, ['iPAddress' => [$this, 'encodeIP']]);
|
$value = ASN1::encodeDER($value, $map, ['iPAddress' => [static::class, 'encodeIP']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1430,7 +1430,7 @@ class X509
|
|||||||
* @param int $count
|
* @param int $count
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
static function setRecurLimit($count)
|
public static function setRecurLimit($count)
|
||||||
{
|
{
|
||||||
self::$recur_limit = $count;
|
self::$recur_limit = $count;
|
||||||
}
|
}
|
||||||
@ -1440,7 +1440,7 @@ class X509
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
static function disableURLFetch()
|
public static function disableURLFetch()
|
||||||
{
|
{
|
||||||
self::$disable_url_fetch = true;
|
self::$disable_url_fetch = true;
|
||||||
}
|
}
|
||||||
@ -1450,7 +1450,7 @@ class X509
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
static function enableURLFetch()
|
public static function enableURLFetch()
|
||||||
{
|
{
|
||||||
self::$disable_url_fetch = false;
|
self::$disable_url_fetch = false;
|
||||||
}
|
}
|
||||||
@ -1464,7 +1464,7 @@ class X509
|
|||||||
* @access private
|
* @access private
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function decodeIP($ip)
|
public static function decodeIP($ip)
|
||||||
{
|
{
|
||||||
return inet_ntop($ip);
|
return inet_ntop($ip);
|
||||||
}
|
}
|
||||||
@ -1478,7 +1478,7 @@ class X509
|
|||||||
* @access private
|
* @access private
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function decodeNameConstraintIP($ip)
|
public static function decodeNameConstraintIP($ip)
|
||||||
{
|
{
|
||||||
$size = strlen($ip) >> 1;
|
$size = strlen($ip) >> 1;
|
||||||
$mask = substr($ip, $size);
|
$mask = substr($ip, $size);
|
||||||
@ -1495,7 +1495,7 @@ class X509
|
|||||||
* @access private
|
* @access private
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function encodeIP($ip)
|
public static function encodeIP($ip)
|
||||||
{
|
{
|
||||||
return is_string($ip) ?
|
return is_string($ip) ?
|
||||||
inet_pton($ip) :
|
inet_pton($ip) :
|
||||||
|
Loading…
Reference in New Issue
Block a user