mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
ASN1: asn1map(): fix handling of optional CHOICE and ANY children in SEQUENCE.
This commit is contained in:
parent
b05cff1320
commit
a75de60478
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user