ASN1: class is never set as key in _decode_ber

This commit is contained in:
terrafrost 2018-04-14 23:39:05 -05:00
parent 038fbb1203
commit 6dc7b3e6b9

View File

@ -666,7 +666,7 @@ class File_ASN1
$childClass = $tempClass = FILE_ASN1_CLASS_UNIVERSAL; $childClass = $tempClass = FILE_ASN1_CLASS_UNIVERSAL;
$constant = null; $constant = null;
if (isset($temp['constant'])) { if (isset($temp['constant'])) {
$tempClass = isset($temp['class']) ? $temp['class'] : FILE_ASN1_CLASS_CONTEXT_SPECIFIC; $tempClass = $temp['type'];
} }
if (isset($child['class'])) { if (isset($child['class'])) {
$childClass = $child['class']; $childClass = $child['class'];
@ -729,7 +729,7 @@ class File_ASN1
$temp = $decoded['content'][$i]; $temp = $decoded['content'][$i];
$tempClass = FILE_ASN1_CLASS_UNIVERSAL; $tempClass = FILE_ASN1_CLASS_UNIVERSAL;
if (isset($temp['constant'])) { if (isset($temp['constant'])) {
$tempClass = isset($temp['class']) ? $temp['class'] : FILE_ASN1_CLASS_CONTEXT_SPECIFIC; $tempClass = $temp['type'];
} }
foreach ($mapping['children'] as $key => $child) { foreach ($mapping['children'] as $key => $child) {