ASN1: change how default values are processed for ints and enums

This commit is contained in:
terrafrost 2021-06-01 20:00:40 -05:00
parent d0a18020f3
commit d7c96ebfb2

View File

@ -649,18 +649,7 @@ abstract class ASN1
$map[$key] = $candidate;
$i++;
} elseif (isset($child['default'])) {
switch ($child['type']) {
case ASN1::TYPE_INTEGER:
$map[$key] = new BigInteger($child['default']);
break;
//case self::TYPE_OBJECT_IDENTIFIER:
// if (!isset(self::$reverseOIDs[$name])) {
// return null;
// }
//case ASN1::TYPE_BOOLEAN:
default:
$map[$key] = $child['default'];
}
$map[$key] = $child['default'];
} elseif (!isset($child['optional'])) {
return null; // Syntax error.
}