Initial
This commit is contained in:
83
cmpOpenSSLTests.php
Normal file
83
cmpOpenSSLTests.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
require_once("cmpOpenSSLClass.php");
|
||||
|
||||
$x = new cmpOpenSSLClass();
|
||||
|
||||
if(0) {
|
||||
$out = $x->cmpOpenSslGenDh();
|
||||
|
||||
var_export($out);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
if(1) {
|
||||
$parm = array(
|
||||
"days" => 3650 ,
|
||||
"outfile" => "test-ca-01" ,
|
||||
"commonName" => "test-ca-01" ,
|
||||
"stateOrProvinceName" => "MSK" ,
|
||||
"localityName" => "MSK" ,
|
||||
"emailAddress" => "it@example.ru" ,
|
||||
"organizationName" => "TEST" ,
|
||||
"organizationalUnitName" => "TEST-OIT" ,
|
||||
);
|
||||
|
||||
$out = array();
|
||||
|
||||
$x->createCA($parm, $out);
|
||||
|
||||
var_export($out);
|
||||
|
||||
//exit;
|
||||
}
|
||||
|
||||
if(1) {
|
||||
$parm = array(
|
||||
"days" => 3650 ,
|
||||
"outfile" => "test-srv-01" ,
|
||||
"commonName" => "test-srv-01" ,
|
||||
"stateOrProvinceName" => "MSK" ,
|
||||
"localityName" => "MSK" ,
|
||||
"emailAddress" => "it@example.ru" ,
|
||||
"organizationName" => "TEST" ,
|
||||
"organizationalUnitName" => "TEST-OIT" ,
|
||||
);
|
||||
|
||||
$x->loadFromFileCACrt("test-ca-01.crt");
|
||||
$x->loadFromFileCAPrv("test-ca-01.prv");
|
||||
|
||||
$out = array();
|
||||
|
||||
$x->createServer($parm, $out);
|
||||
|
||||
var_export($out);
|
||||
|
||||
//exit;
|
||||
}
|
||||
|
||||
if(1) {
|
||||
$parm = array(
|
||||
"days" => 365 ,
|
||||
"outfile" => "test-cli-cli01" ,
|
||||
"commonName" => "test-cli-cli01" ,
|
||||
"stateOrProvinceName" => "MSK" ,
|
||||
"localityName" => "MSK" ,
|
||||
"emailAddress" => "it@example.ru" ,
|
||||
"organizationName" => "TEST" ,
|
||||
"organizationalUnitName" => "TEST-OIT" ,
|
||||
);
|
||||
|
||||
$x->loadFromFileCACrt("test-ca-01.crt");
|
||||
$x->loadFromFileCAPrv("test-ca-01.prv");
|
||||
|
||||
$out = array();
|
||||
|
||||
$x->createClient($parm, $out);
|
||||
|
||||
var_export($out);
|
||||
|
||||
//exit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user