ASN1: make it so bit string's can have an optional minimum size

This commit is contained in:
terrafrost 2014-04-05 18:07:35 -05:00
parent a478b74860
commit c8bf68ac02

View File

@ -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 = $offset !== 8 ? $offset : 0;