mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 16:15:52 +00:00
X509: fix PHP4 errors
This commit is contained in:
parent
333e2e4c2b
commit
ef5e6a909f
@ -2267,7 +2267,7 @@ class File_X509
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$parent = new static();
|
$parent = new File_X509();
|
||||||
$parent->CAs = $this->CAs;
|
$parent->CAs = $this->CAs;
|
||||||
/*
|
/*
|
||||||
"Conforming applications that support HTTP or FTP for accessing
|
"Conforming applications that support HTTP or FTP for accessing
|
||||||
@ -3000,7 +3000,7 @@ class File_X509
|
|||||||
} elseif (is_object($value) && strtolower(get_class($value)) == 'file_asn1_element') {
|
} elseif (is_object($value) && strtolower(get_class($value)) == 'file_asn1_element') {
|
||||||
// @codingStandardsIgnoreStart
|
// @codingStandardsIgnoreStart
|
||||||
$callback = version_compare(PHP_VERSION, '5.3.0') >= 0 ?
|
$callback = version_compare(PHP_VERSION, '5.3.0') >= 0 ?
|
||||||
function ($x) { return "\x" . bin2hex($x[0]); } :
|
eval('return function ($x) { return "\x" . bin2hex($x[0]); };') :
|
||||||
create_function('$x', 'return "\x" . bin2hex($x[0]);');
|
create_function('$x', 'return "\x" . bin2hex($x[0]);');
|
||||||
// @codingStandardsIgnoreEnd
|
// @codingStandardsIgnoreEnd
|
||||||
$value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));
|
$value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));
|
||||||
|
Loading…
Reference in New Issue
Block a user