mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 10:45:11 +00:00
ASN1: make it so bit string's can have an optional minimum size
This commit is contained in:
parent
a478b74860
commit
c8bf68ac02
@ -972,6 +972,11 @@ class File_ASN1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($mapping['min']) && $mapping['min'] >= 1 && $size < $mapping['min'])
|
||||||
|
{
|
||||||
|
$size = $mapping['min'] - 1;
|
||||||
|
}
|
||||||
|
|
||||||
$offset = 8 - (($size + 1) & 7);
|
$offset = 8 - (($size + 1) & 7);
|
||||||
$offset = $offset !== 8 ? $offset : 0;
|
$offset = $offset !== 8 ? $offset : 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user