mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-04 18:48:24 +01:00
ASN1: change how default values are processed for ints and enums
This commit is contained in:
parent
d0a18020f3
commit
d7c96ebfb2
@ -649,18 +649,7 @@ abstract class ASN1
|
|||||||
$map[$key] = $candidate;
|
$map[$key] = $candidate;
|
||||||
$i++;
|
$i++;
|
||||||
} elseif (isset($child['default'])) {
|
} elseif (isset($child['default'])) {
|
||||||
switch ($child['type']) {
|
$map[$key] = $child['default'];
|
||||||
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'];
|
|
||||||
}
|
|
||||||
} elseif (!isset($child['optional'])) {
|
} elseif (!isset($child['optional'])) {
|
||||||
return null; // Syntax error.
|
return null; // Syntax error.
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user