ASN1: asn1map(): fix handling of optional CHOICE and ANY children in SEQUENCE.

This commit is contained in:
monnerat 2012-10-12 01:04:24 +01:00
parent b05cff1320
commit a75de60478

View File

@ -531,14 +531,9 @@ class File_ASN1 {
$temp = $decoded['content'][$i];
}
} elseif (!isset($child['constant'])) {
if ($child['type'] == FILE_ASN1_TYPE_CHOICE) {
$map[$key] = $this->asn1map($temp, $child);
$i++;
continue;
}
// we could do this, as well:
// $buffer = $this->asn1map($temp, $child); if (isset($buffer)) { $map[$key] = $buffer; }
if ($child['type'] == $temp['type']) {
if ($child['type'] == $temp['type'] || $child['type'] == FILE_ASN1_TYPE_ANY) {
$map[$key] = $this->asn1map($temp, $child);
$i++;
if (count($decoded['content']) == $i) {