Add one test more in certificationauthorityTest.php
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5108 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -15,6 +15,19 @@ class test_certificationauthority extends PHPUnit_Framework_TestCase
|
|||||||
"-----BEGIN CERTIFICATE----------BEGIN PRIVATE KEY-----");
|
"-----BEGIN CERTIFICATE----------BEGIN PRIVATE KEY-----");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_createCA_2 ()
|
||||||
|
{
|
||||||
|
$certificationauthority = new certificationauthority ();
|
||||||
|
$certificationauthority->createCA ("FR", "FOURNIER38", "CATEST");
|
||||||
|
$caCert = $certificationauthority->caCert ();
|
||||||
|
file_put_contents ("/tmp/test_createCA_2", $caCert);
|
||||||
|
exec ("openssl x509 -in - -text -noout < /tmp/test_createCA_2", $output);
|
||||||
|
$res = preg_match ("# CA:TRUE#",
|
||||||
|
implode ("\n", $output));
|
||||||
|
unlink ("/tmp/test_createCA_2");
|
||||||
|
$this->assertSame ($res, 1);
|
||||||
|
}
|
||||||
|
|
||||||
public function test_createPK_1 ()
|
public function test_createPK_1 ()
|
||||||
{
|
{
|
||||||
$certificationauthority = new certificationauthority ();
|
$certificationauthority = new certificationauthority ();
|
||||||
|
|||||||
Reference in New Issue
Block a user