mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-22 22:58:30 +00:00
Tests/ASN1: add test for OID garbage bytes
This commit is contained in:
parent
dbd210c4a7
commit
6be326e7e7
@ -405,4 +405,17 @@ class Unit_File_ASN1Test extends PhpseclibTestCase
|
||||
$decoded = $asn1->decodeBER($em);
|
||||
$this->assertFalse($decoded[0]);
|
||||
}
|
||||
|
||||
public function testOIDGarbage()
|
||||
{
|
||||
$asn1 = new File_ASN1();
|
||||
|
||||
$em = pack('H*', '3080305c065860864801650304020188888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888050004207509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9');
|
||||
$decoded = $asn1->decodeBER($em);
|
||||
$this->assertFalse($decoded[0]);
|
||||
|
||||
$em = pack('H*', '3080307f067d608648016503040201888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888804207509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9');
|
||||
$decoded = $asn1->decodeBER($em);
|
||||
$this->assertFalse($decoded[0]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user