26 require_once(
"../class/config.php");
30 "id" => array(
"request",
"integer",
""),
38 require_once(
"ssl_list.php");
42 include_once(
"head.php");
45 echo
"<p class=\"alert alert-info\">$info</p>";
48 if (
$cert[
"status"] == $ssl::STATUS_PENDING) {
50 <h3><?php
__(
"Pending Certificate"); ?></h3>
52 <p><?php
__(
"Your <i>Certificate Request File</i> (CSR) has been created, along with its <i>private RSA Key</i> (KEY). Please find below the CSR you must send to your SSL Certificate provider."); ?></p>
54 <p><?php
__(
"Once you'll have your <i>Certificate File</i> (CRT) and a <i>Chained Certificate File</i> (CHAIN), please paste them here to finish the enrollment."); ?></p>
56 <form method=
"post" action=
"ssl_finalize.php" name=
"main" id=
"main">
58 <input type=
"hidden" name=
"id" id=
"id" value=
"<?php echo $cert["id"]; ?>"/>
59 <table border=
"1" cellspacing=
"0" cellpadding=
"4" class=
"tedit">
61 <th><label
for=
"fqdn"><?php
__(
"Fully Qualified Domain Name"); ?></label></th>
62 <td><?php echo
$cert[
"fqdn"]; ?></td>
65 <th><label
for=
"validstart"><?php
__(
"Date of the request"); ?></label></th>
66 <td><?php echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$cert[
"validstartts"])); ?></td>
69 <th><label
for=
"csr"><?php
__(
"Certificate Request File"); ?></label></th>
70 <td><textarea readonly=
"readonly" onclick=
"this.focus();
71 this.select()" class=
"int cert" name=
"csr" id=
"csr" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslcsr"]; ?></textarea></td>
74 <th><label
for=
"crt"><?php
__(
"SSL Certificate"); ?></label></th>
75 <td><textarea
class=
"int cert" name=
"crt" id=
"crt" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslcrt"]; ?></textarea></td>
78 <th><label
for=
"chain"><?php
__(
"Chained Certificate<br />(not mandatory)"); ?></label></th>
79 <td><textarea
class=
"int cert" name=
"chain" id=
"chain" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslchain"]; ?></textarea></td>
83 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Save
"); ?>"/>
84 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"document.location = 'ssl_list.php'"/>
86 <input type=
"submit" class=
"inb delete" name=
"delete" value=
"<?php __("Delete
"); ?>" onclick=
"return confirm('<?php
87 echo addslashes(_("Please confirm that you want to
delete this certificate request AND ITS PRIVATE KEY!
"));
96 if (
$cert[
"status"] == $ssl::STATUS_OK) {
98 <h3><?php
__(
"Valid Certificate"); ?></h3>
99 <p><?php
__(
"Please find below your valid certificate data."); ?></p>
103 if (
$cert[
"status"] == $ssl::STATUS_EXPIRED) {
105 <h3><?php
__(
"EXPIRED Certificate"); ?></h3>
106 <p><?php
__(
"Your certificate is EXPIRED. You should not use it for any purpose. Please find below its data."); ?></p>
112 <span
class=
"inb ok"><a href=
"ssl_list.php"><?php
__(
"Back to my SSL Certificates"); ?></a></span>
114 <table border=
"1" cellspacing=
"0" cellpadding=
"4" class=
"tedit">
116 <th><?php
__(
"Valid From:"); ?></th>
118 echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$cert[
"validstartts"]));
122 printf(_(
"(%d days ago)"),
$days);
124 $month = intval(
$days / 30);
125 printf(_(
"(%d month ago)"), $month);
130 <th><?php
__(
"Valid Until:"); ?></th>
132 echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$cert[
"validendts"]));
134 $days = intval((
$cert[
"validendts"] - time()) / 86400);
136 printf(_(
"(%d days from now)"),
$days);
138 $month = intval(
$days / 30);
139 printf(_(
"(%d month from now)"), $month);
144 <th><?php
__(
"FQDN:"); ?></th>
145 <td><?php echo
$cert[
"fqdn"]; ?></td>
148 <th><?php
__(
"Other Valid FQDN:"); ?></th>
149 <td><?php echo nl2br(
$cert[
"altnames"]); ?></td>
153 <th><label
for=
"csr"><?php
__(
"Certificate Request File"); ?></label></th>
154 <td><textarea readonly=
"readonly" onclick=
"this.focus();
155 this.select()" class=
"int cert" name=
"csr" id=
"csr" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslcsr"]; ?></textarea></td>
158 <th><label
for=
"crt"><?php
__(
"SSL Certificate"); ?></label></th>
159 <td><textarea readonly=
"readonly" onclick=
"this.focus();
160 this.select()" class=
"int cert" name=
"crt" id=
"crt" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslcrt"]; ?></textarea></td>
163 <th><label
for=
"chain"><?php
__(
"Chained Certificate<br />(not mandatory)"); ?></label></th>
164 <td><textarea readonly=
"readonly" onclick=
"this.focus();
165 this.select()" class=
"int cert" name=
"chain" id=
"chain" style=
"width: 500px; height: 120px;"><?php echo
$cert[
"sslchain"]; ?></textarea></td>
170 if ($admin->enabled) {
172 <p><?php
__(
"As an administrator you can allow any account on this server to use this certificate to host his services. <br />(This is only useful for wildcard or multi-domain certificates)."); ?></p>
175 if (
$cert[
"shared"]) {
176 echo _(
"This certificate is currently <b>shared</b>");
180 <form method=
"post" action=
"ssl_share.php">
182 <input type=
"hidden" name=
"id" id=
"id" value=
"<?php echo $cert["id"]; ?>"/>
183 <input type=
"hidden" name=
"action" id=
"action" value=
"0" />
184 <input
class=
"inb cancel" type=
"submit" name=
"unshare" value=
"<?php __("Click here to stop sharing
this certificate
"); ?>" />
189 <p><?php
__(
"You are not the owner of this certificate, only its owner can share/unshare this certificate."); ?></p>
193 echo _(
"This certificate is currently <b>NOT shared</b>");
197 <form method=
"post" action=
"ssl_share.php">
199 <input type=
"hidden" name=
"id" id=
"id" value=
"<?php echo $cert["id"]; ?>"/>
200 <input type=
"hidden" name=
"action" id=
"action" value=
"1" />
201 <input
class=
"inb ok" type=
"submit" name=
"unshare" value=
"<?php __("Click here to share
this certificate
"); ?>" />
206 <p><?php
__(
"You are not the owner of this certificate, only its owner can share/unshare this certificate."); ?></p>
214 <form method=
"post" action=
"ssl_finalize.php" name=
"main" id=
"main">
216 <input type=
"hidden" name=
"id" id=
"id" value=
"<?php echo $cert["id"]; ?>"/>
217 <input type=
"submit" class=
"inb delete" name=
"delete" value=
"<?php __("Delete
"); ?>" onclick=
"return confirm('<?php
218 echo addslashes(_("Please confirm that you want to
delete this certificate AND ITS PRIVATE KEY!
"));
230 <?php include_once(
"foot.php"); ?>
format_date($format, $date)
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
if(!isset($is_include)) if(! $key &&! $crt) $id
if(!isset($is_include)) $cert