@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | class CertificationAuthorityEduPkiServer extends EntityWithDBProperties implements CertificationAuthorityInterface |
18 | 18 | { |
19 | 19 | |
20 | - private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
21 | - private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
22 | - private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
20 | + private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
21 | + private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
22 | + private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
23 | 23 | private const EDUPKI_RA_ID = 700; |
24 | 24 | private const EDUPKI_CERT_PROFILE = "Radius Server SOAP"; |
25 | 25 | private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | parent::__construct(); |
36 | 36 | |
37 | 37 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_CERT) === FALSE) { |
38 | - throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
38 | + throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
39 | 39 | } |
40 | 40 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_KEY) === FALSE) { |
41 | - throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
41 | + throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
42 | 42 | } |
43 | 43 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_WEBROOT) === FALSE) { |
44 | - throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
44 | + throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -91,19 +91,19 @@ discard block |
||
91 | 91 | // initialise connection to eduPKI CA / eduroam RA and send the request to them |
92 | 92 | try { |
93 | 93 | $altArray = [# Array mit den Subject Alternative Names |
94 | - "email:" . $csr["USERMAIL"] |
|
94 | + "email:".$csr["USERMAIL"] |
|
95 | 95 | ]; |
96 | 96 | $soapPub = $this->initEduPKISoapSession("PUBLIC"); |
97 | 97 | $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n"); |
98 | - $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPkiServer::EDUPKI_RA_ID . "\n"); |
|
99 | - $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR"] . "\n"); |
|
98 | + $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPkiServer::EDUPKI_RA_ID."\n"); |
|
99 | + $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR"]."\n"); |
|
100 | 100 | $this->loggerInstance->debug(5, "PARAM_3: "); |
101 | 101 | $this->loggerInstance->debug(5, $altArray); |
102 | - $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE . "\n"); |
|
103 | - $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n"); |
|
104 | - $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n"); |
|
105 | - $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n"); |
|
106 | - $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n"); |
|
102 | + $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE."\n"); |
|
103 | + $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n"); |
|
104 | + $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n"); |
|
105 | + $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n"); |
|
106 | + $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n"); |
|
107 | 107 | $this->loggerInstance->debug(5, "PARAM_9: false\n"); |
108 | 108 | $soapNewRequest = $soapPub->newRequest( |
109 | 109 | CertificationAuthorityEduPkiServer::EDUPKI_RA_ID, # RA-ID |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | } catch (Exception $e) { |
126 | 126 | // PHP 7.1 can do this much better |
127 | 127 | if (is_soap_fault($e)) { |
128 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: { |
|
128 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: { |
|
129 | 129 | $e->faultstring |
130 | 130 | }\n"); |
131 | 131 | } |
132 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
132 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
133 | 133 | } |
134 | 134 | try { |
135 | 135 | $soap = $this->initEduPKISoapSession("RA"); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
164 | 164 | // rather than just using the string. Grr. |
165 | 165 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
166 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext); |
|
166 | + file_put_contents($tempdir['dir']."/content.txt", $soapCleartext); |
|
167 | 167 | // retrieve our RA cert from filesystem |
168 | 168 | // the RA certificates are not needed right now because we |
169 | 169 | // have resorted to S/MIME signatures with openssl command-line |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
176 | 176 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
177 | 177 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n $soapCleartext\n"); |
178 | - $execCmd = CONFIG['PATHS']['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
178 | + $execCmd = CONFIG['PATHS']['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
179 | 179 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
180 | 180 | $output = []; |
181 | 181 | $return = 999; |
@@ -184,21 +184,21 @@ discard block |
||
184 | 184 | throw new Exception("Non-zero return value from openssl smime!"); |
185 | 185 | } |
186 | 186 | // and get the signature blob back from the filesystem |
187 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
187 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
188 | 188 | $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n"); |
189 | - $this->loggerInstance->debug(5, $soapReqnum . "\n"); |
|
190 | - $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending! |
|
191 | - $this->loggerInstance->debug(5, $detachedSig . "\n"); |
|
189 | + $this->loggerInstance->debug(5, $soapReqnum."\n"); |
|
190 | + $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending! |
|
191 | + $this->loggerInstance->debug(5, $detachedSig."\n"); |
|
192 | 192 | $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig); |
193 | - $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest()); |
|
194 | - $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse()); |
|
193 | + $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest()); |
|
194 | + $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse()); |
|
195 | 195 | if ($soapIssueCert === FALSE) { |
196 | 196 | throw new Exception("The locally approved request was NOT processed by the CA."); |
197 | 197 | } |
198 | 198 | } catch (SoapFault $e) { |
199 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
199 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
200 | 200 | } catch (Exception $e) { |
201 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
201 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
202 | 202 | } |
203 | 203 | return $soapReqnum; |
204 | 204 | } |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | throw new Exception("CAInfo has no root certificate for us!"); |
249 | 249 | } |
250 | 250 | } catch (SoapFault $e) { |
251 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
251 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
252 | 252 | } catch (Exception $e) { |
253 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
253 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
254 | 254 | } |
255 | 255 | return [ |
256 | 256 | "CERT" => openssl_x509_read($parsedCert['pem']), |
@@ -283,12 +283,12 @@ discard block |
||
283 | 283 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
284 | 284 | // rather than just using the string. Grr. |
285 | 285 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
286 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest); |
|
286 | + file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest); |
|
287 | 287 | // retrieve our RA cert from filesystem |
288 | 288 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
289 | 289 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
290 | 290 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n"); |
291 | - $execCmd = CONFIG['PATHS']['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
291 | + $execCmd = CONFIG['PATHS']['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
292 | 292 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
293 | 293 | $output = []; |
294 | 294 | $return = 999; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | throw new Exception("Non-zero return value from openssl smime!"); |
298 | 298 | } |
299 | 299 | // and get the signature blob back from the filesystem |
300 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
300 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
301 | 301 | $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig); |
302 | 302 | if ($soapIssueRev === FALSE) { |
303 | 303 | throw new Exception("The locally approved revocation request was NOT processed by the CA."); |
@@ -305,9 +305,9 @@ discard block |
||
305 | 305 | } catch (Exception $e) { |
306 | 306 | // PHP 7.1 can do this much better |
307 | 307 | if (is_soap_fault($e)) { |
308 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n"); |
|
308 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n"); |
|
309 | 309 | } |
310 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
310 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 | |
@@ -407,9 +407,9 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function soapToXmlInteger($x) |
409 | 409 | { |
410 | - return '<' . $x[0] . '>' |
|
410 | + return '<'.$x[0].'>' |
|
411 | 411 | . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1) |
412 | - . '</' . $x[0] . '>'; |
|
412 | + . '</'.$x[0].'>'; |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
@@ -428,9 +428,9 @@ discard block |
||
428 | 428 | // dump private key into directory |
429 | 429 | $outstring = ""; |
430 | 430 | openssl_pkey_export($privateKey, $outstring); |
431 | - file_put_contents($tempdir . "/pkey.pem", $outstring); |
|
431 | + file_put_contents($tempdir."/pkey.pem", $outstring); |
|
432 | 432 | // PHP can only do one DC in the Subject. But we need three. |
433 | - $execCmd = CONFIG['PATHS']['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username"; |
|
433 | + $execCmd = CONFIG['PATHS']['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username"; |
|
434 | 434 | $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n"); |
435 | 435 | $output = []; |
436 | 436 | $return = 999; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // also send user back to the overview page |
73 | 73 | if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) { |
74 | 74 | // basic sanity checks before we hand this over to openssl |
75 | - $sanitisedCsr = $validator->string($_POST['CSR'] ?? "" , TRUE); |
|
75 | + $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE); |
|
76 | 76 | if (openssl_csr_get_public_key($sanitisedCsr) === FALSE) { |
77 | 77 | throw new Exception("Sorry: Unable to parse the submitted public key - no public key inside?"); |
78 | 78 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $fed = $validator->Federation($_POST['NRO-list']); |
87 | 87 | $country = strtoupper($fed->tld); |
88 | 88 | $DN[] = "C=$country"; |
89 | - $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)]; |
|
89 | + $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)]; |
|
90 | 90 | $DN[] = "CN=comes.from.eduroam.db"; |
91 | 91 | $policies[] = "eduroam IdP"; |
92 | 92 | $policies[] = "eduroam SP"; |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | default: |
105 | 105 | throw new Exception("Sorry: Unknown level of issuance requested."); |
106 | 106 | } |
107 | - echo "<p>" . _("Requesting a certificate with the following properties"); |
|
107 | + echo "<p>"._("Requesting a certificate with the following properties"); |
|
108 | 108 | echo "<ul>"; |
109 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
110 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
111 | - echo "<li>" . _("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').") . "</li>"; |
|
109 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
110 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
111 | + echo "<li>"._("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').")."</li>"; |
|
112 | 112 | echo "</ul></p>"; |
113 | 113 | /* $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => [ "file", "/tmp/voodoo-error", "a"] ], $pipes); |
114 | 114 | if (is_resource($ossl)) { |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | throw new Exception("Calling openssl in a fancy way did not work."); |
122 | 122 | } |
123 | 123 | echo "<p>"._("This is the new CSR (return code was $retval)")."<pre>$newCsr</pre></p>"; */ |
124 | - $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN) ,"FED" => $country]; |
|
124 | + $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN), "FED" => $country]; |
|
125 | 125 | // our certs can be good for max 5 years |
126 | 126 | $fed->requestCertificate($newCsrWithMeta, 1825); |
127 | 127 | echo "<p>"._("The certificate was requested.")."</p>"; |
128 | 128 | ?> |
129 | 129 | <form action="overview_certificates.php" method="GET"> |
130 | - <button type="submit"><?php echo _("Back to Certificate Overview");?></button> |
|
130 | + <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
|
131 | 131 | </form> |
132 | 132 | <?php |
133 | 133 | echo $deco->footer(); |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | |
137 | 137 | // if we did not get a SAVE button, display UI for a fresh request instead |
138 | 138 | ?> |
139 | - <h2><?php echo _("1. Certificate Holder Details");?></h2> |
|
139 | + <h2><?php echo _("1. Certificate Holder Details"); ?></h2> |
|
140 | 140 | <form action="action_req_certificate.php" method="POST"> |
141 | 141 | <input type="radio" name="LEVEL" id="NRO" value="NRO" checked><?php printf(_("Certificate for %s role"), $uiElements->nomenclatureFed); ?></input> |
142 | 142 | <?php |
143 | 143 | if (count($feds) == 1) { |
144 | 144 | $fedObject = new \core\Federation($feds[0]['value']); |
145 | - echo " <strong>" . $cat->knownFederations[$fedObject->tld] . "</strong>"; |
|
146 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $fedObject->tld . '"/>'; |
|
145 | + echo " <strong>".$cat->knownFederations[$fedObject->tld]."</strong>"; |
|
146 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$fedObject->tld.'"/>'; |
|
147 | 147 | } else { |
148 | 148 | ?> |
149 | 149 | <select name="NRO-list" id="NRO-list"> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | <?php |
152 | 152 | foreach ($feds as $oneFed) { |
153 | 153 | $fedObject = new \core\Federation($oneFed['value']); |
154 | - echo '<option value="' . strtoupper($fedObject->tld) . '">' . $cat->knownFederations[$fedObject->tld] . "</option>"; |
|
154 | + echo '<option value="'.strtoupper($fedObject->tld).'">'.$cat->knownFederations[$fedObject->tld]."</option>"; |
|
155 | 155 | } |
156 | 156 | ?> |
157 | 157 | </select> |
@@ -171,15 +171,15 @@ discard block |
||
171 | 171 | } |
172 | 172 | } |
173 | 173 | foreach ($allIdPs as $id => $name) { |
174 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
174 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
175 | 175 | } |
176 | 176 | ?> |
177 | 177 | </select> |
178 | 178 | <br/> |
179 | - <h2><?php echo _("2. CSR generation");?></h2> |
|
180 | - <p><?php echo sprintf(_("The CSR needs to have a Distinguished Name Prefix with three specific DC components. One way to generate it is by using a <a href='%s'> special openssl.cnf file</a> and generating the request with the following command-line:"), CONFIG['PATHS']['cat_base_url']."/resources/openssl.cnf");?></p> |
|
179 | + <h2><?php echo _("2. CSR generation"); ?></h2> |
|
180 | + <p><?php echo sprintf(_("The CSR needs to have a Distinguished Name Prefix with three specific DC components. One way to generate it is by using a <a href='%s'> special openssl.cnf file</a> and generating the request with the following command-line:"), CONFIG['PATHS']['cat_base_url']."/resources/openssl.cnf"); ?></p> |
|
181 | 181 | <p># openssl req -config ./openssl.cnf -new -keyout example.key -out example.csr</p> |
182 | - <h2><?php echo _("3. Submission");?></h2> |
|
182 | + <h2><?php echo _("3. Submission"); ?></h2> |
|
183 | 183 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |
184 | 184 | <button type="submit" name="requestcert" id="requestcert" value="<?php echo \web\lib\common\FormElements::BUTTON_SAVE ?>"><?php echo _("Send request"); ?></button> |
185 | 185 | </form> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
82 | 82 | $status = $oneCert['STATUS']; |
83 | 83 | if ($status == "ISSUED") { |
84 | - $status = "<span onclick='alert(\"".str_replace("\n","\\n",$oneCert['CERT'])."\");'>$status</span>"; |
|
84 | + $status = "<span onclick='alert(\"".str_replace("\n", "\\n", $oneCert['CERT'])."\");'>$status</span>"; |
|
85 | 85 | } |
86 | 86 | echo "<tr><td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td></tr>"; |
87 | 87 | } |