ASN1: add unit test for non-constructed context-specific change

This commit is contained in:
terrafrost 2014-09-22 23:03:06 -05:00
parent c6ad2b69ba
commit a2f4a2cbba
2 changed files with 10 additions and 1 deletions

View File

@ -1348,4 +1348,4 @@ class File_ASN1
}
return $out;
}
}
}

View File

@ -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']);
}
}