diff --git a/tests/Unit/File/X509/CRLTest.php b/tests/Unit/File/X509/CRLTest.php new file mode 100644 index 00000000..8c08ee60 --- /dev/null +++ b/tests/Unit/File/X509/CRLTest.php @@ -0,0 +1,24 @@ + + * @copyright 2017 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + */ + +use phpseclib\File\X509; + +class Unit_File_X509_CRLTest extends PhpseclibTestCase +{ + public function testLoadCRL() + { + $test = file_get_contents('crl.bin'); + + $x509 = new X509(); + + $x509->loadCRL($test); + + $reason = $x509->getRevokedCertificateExtension('9048354325167497831898969642461237543', 'id-ce-cRLReasons'); + + $this->assertSame('unspecified', $reason); + } +} diff --git a/tests/Unit/File/X509/crl.bin b/tests/Unit/File/X509/crl.bin new file mode 100644 index 00000000..ef6d3ee1 Binary files /dev/null and b/tests/Unit/File/X509/crl.bin differ