mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-26 20:35:21 +01:00
ASN1: correctly handle long tags
This commit is contained in:
parent
3d7acde183
commit
70c0a0ddf4
@ -326,9 +326,10 @@ class File_ASN1
|
|||||||
$tag = 0;
|
$tag = 0;
|
||||||
// process septets (since the eighth bit is ignored, it's not an octet)
|
// process septets (since the eighth bit is ignored, it's not an octet)
|
||||||
do {
|
do {
|
||||||
$loop = ord($encoded[0]) >> 7;
|
$temp = ord($encoded[$encoded_pos++]);
|
||||||
|
$loop = $temp >> 7;
|
||||||
$tag <<= 7;
|
$tag <<= 7;
|
||||||
$tag |= ord($encoded[$encoded_pos++]) & 0x7F;
|
$tag |= $temp & 0x7F;
|
||||||
$start++;
|
$start++;
|
||||||
} while ($loop);
|
} while ($loop);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user