mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 21:17:53 +00:00
Tests/X509: add CRL test
This commit is contained in:
parent
135a4decf1
commit
bd489a16dc
24
tests/Unit/File/X509/CRLTest.php
Normal file
24
tests/Unit/File/X509/CRLTest.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @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);
|
||||
}
|
||||
}
|
BIN
tests/Unit/File/X509/crl.bin
Normal file
BIN
tests/Unit/File/X509/crl.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user