From d7c96ebfb2de64198b417006bef0df044fe2bead Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 1 Jun 2021 20:00:40 -0500 Subject: [PATCH] ASN1: change how default values are processed for ints and enums --- phpseclib/File/ASN1.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 0ceac5f5..1a66f28d 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -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. }