|
|
|
@ -1496,17 +1496,22 @@
|
|
|
|
|
if($SAN != "")
|
|
|
|
|
$csrsubject .= "/subjectAltName=".$SAN;
|
|
|
|
|
|
|
|
|
|
$type="";
|
|
|
|
|
if($_REQUEST["ocspcert"]!="") $type="8";
|
|
|
|
|
|
|
|
|
|
if($_SESSION['_config']['rowid']['0'] > 0)
|
|
|
|
|
{
|
|
|
|
|
$query = "insert into `orgdomaincerts` set `CN`='".$_SESSION['_config']['rows']['0']."',
|
|
|
|
|
`orgid`='".$org['id']."',
|
|
|
|
|
`created`=NOW(),`subject`='$csrsubject',
|
|
|
|
|
`rootcert`='".$_SESSION['_config']['rootcert']."'";
|
|
|
|
|
`rootcert`='".$_SESSION['_config']['rootcert']."',
|
|
|
|
|
`type`=$type";
|
|
|
|
|
} else {
|
|
|
|
|
$query = "insert into `orgdomaincerts` set `CN`='".$_SESSION['_config']['altrows']['0']."',
|
|
|
|
|
`orgid`='".$org['id']."',
|
|
|
|
|
`created`=NOW(),`subject`='$csrsubject',
|
|
|
|
|
`rootcert`='".$_SESSION['_config']['rootcert']."'";
|
|
|
|
|
`rootcert`='".$_SESSION['_config']['rootcert']."',
|
|
|
|
|
`type`=$type";
|
|
|
|
|
}
|
|
|
|
|
mysql_query($query);
|
|
|
|
|
$CSRid = mysql_insert_id();
|
|
|
|
|