diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index f4a7591e..eaa47eff 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -1348,4 +1348,4 @@ class File_ASN1 } return $out; } -} \ No newline at end of file +} diff --git a/tests/Unit/File/ASN1Test.php b/tests/Unit/File/ASN1Test.php index 4565edbd..fe35f688 100644 --- a/tests/Unit/File/ASN1Test.php +++ b/tests/Unit/File/ASN1Test.php @@ -268,4 +268,13 @@ class Unit_File_ASN1Test extends PhpseclibTestCase $decoded = $asn1->decodeBER(base64_decode($str)); $this->assertCount(3, $decoded[0]['content']); } + + /** + * @group github477 + */ + public function contextSpecificNonConstructed() + { + $decoded = $asn1->decodeBER(base64_decode('MBaAFJtUo7c00HsI5EPZ4bkICfkOY2Pv')); + $this->assertInternalType('string', $decoded[0]['content'][0]['content']); + } }