mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-19 19:55:11 +00:00
Merge branch 'moosa-1.0' into moosa-2.0
This commit is contained in:
commit
6ddc6c0c53
@ -435,6 +435,9 @@ class ASN1
|
|||||||
break;
|
break;
|
||||||
case self::TYPE_OBJECT_IDENTIFIER:
|
case self::TYPE_OBJECT_IDENTIFIER:
|
||||||
$current['content'] = $this->_decodeOID(substr($content, $content_pos));
|
$current['content'] = $this->_decodeOID(substr($content, $content_pos));
|
||||||
|
if ($current['content'] === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
/* Each character string type shall be encoded as if it had been declared:
|
/* Each character string type shall be encoded as if it had been declared:
|
||||||
[UNIVERSAL x] IMPLICIT OCTET STRING
|
[UNIVERSAL x] IMPLICIT OCTET STRING
|
||||||
@ -1127,6 +1130,11 @@ class ASN1
|
|||||||
$oid = array();
|
$oid = array();
|
||||||
$pos = 0;
|
$pos = 0;
|
||||||
$len = strlen($content);
|
$len = strlen($content);
|
||||||
|
|
||||||
|
if (ord($content[$len - 1]) & 0x80) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$n = new BigInteger();
|
$n = new BigInteger();
|
||||||
while ($pos < $len) {
|
while ($pos < $len) {
|
||||||
$temp = ord($content[$pos++]);
|
$temp = ord($content[$pos++]);
|
||||||
|
Loading…
Reference in New Issue
Block a user