@@ -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 | $auth = new \web\lib\admin\Authentication(); |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | $fed = $validator->existingFederation($_POST['NRO-list']); |
106 | 106 | $country = strtoupper($fed->tld); |
107 | 107 | $DN[] = "C=$country"; |
108 | - $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)]; |
|
108 | + $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)]; |
|
109 | 109 | $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld); |
110 | 110 | $serverList = explode(",", array_key_first($serverInfo)); |
111 | - $DN[] = "CN=" . $serverList[0]; |
|
111 | + $DN[] = "CN=".$serverList[0]; |
|
112 | 112 | $policies[] = "eduroam IdP"; |
113 | 113 | $policies[] = "eduroam SP"; |
114 | 114 | $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"]; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | $DN[] = "O=$ou"; |
134 | 134 | $serverList = explode(",", $serverInfo["servers"]); |
135 | - $DN[] = "CN=" . $serverList[0]; |
|
135 | + $DN[] = "CN=".$serverList[0]; |
|
136 | 136 | switch ($serverInfo["type"]) { |
137 | 137 | case core\IdP::TYPE_IDPSP: |
138 | 138 | $policies[] = "eduroam IdP"; |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | default: |
153 | 153 | throw new Exception("Sorry: Unknown level of issuance requested."); |
154 | 154 | } |
155 | - echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
|
155 | + echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties"); |
|
156 | 156 | echo "<ul>"; |
157 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
158 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
159 | - echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
|
160 | - echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
|
157 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
158 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
159 | + echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>"; |
|
160 | + echo "<li>"._("Requester Contact Details: ").$firstName." <".$firstMail.">"."</li>"; |
|
161 | 161 | echo "</ul></p>"; |
162 | 162 | |
163 | 163 | $vettedCsr = $validator->string($_POST['CSR'], true); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | "FED" => $country]; |
172 | 172 | // our certs can be good for max 5 years |
173 | 173 | $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays); |
174 | - echo "<p>" . _("The certificate was requested.") . "</p>"; |
|
174 | + echo "<p>"._("The certificate was requested.")."</p>"; |
|
175 | 175 | ?> |
176 | 176 | <form action="overview_certificates.php" method="GET"> |
177 | 177 | <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
@@ -189,23 +189,23 @@ discard block |
||
189 | 189 | switch (count($feds)) { |
190 | 190 | case 0: |
191 | 191 | echo "<div>"; |
192 | - echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
192 | + echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
193 | 193 | echo "</div>"; |
194 | 194 | break; |
195 | 195 | case 1: |
196 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
197 | - echo " <strong>" . $cat->knownFederations[$feds[0]->tld] . "</strong>"; |
|
198 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>'; |
|
196 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
197 | + echo " <strong>".$cat->knownFederations[$feds[0]->tld]."</strong>"; |
|
198 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>'; |
|
199 | 199 | break; |
200 | 200 | default: |
201 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
201 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
202 | 202 | ?> |
203 | 203 | <select name="NRO-list" id="NRO-list"> |
204 | 204 | <option value="notset"><?php echo _("---PPPLEASE CHOOSE---"); ?></option> |
205 | 205 | <?php |
206 | 206 | foreach ($feds as $oneFed) { |
207 | 207 | #echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld] . "</option>"; |
208 | - echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>"; |
|
208 | + echo '<option value="AAA'.strtoupper($oneFed->tld).'">'.$oneIdP["names"][$langObject->getLang()]."</option>"; |
|
209 | 209 | |
210 | 210 | } |
211 | 211 | ?> |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $allIdPs = []; |
216 | 216 | foreach ($allAuthorizedFeds as $oneFed) { |
217 | 217 | foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { |
218 | - $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()]; |
|
218 | + $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["names"][$langObject->getLang()]; |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | if (count($allIdPs) > 0) { |
@@ -226,14 +226,14 @@ discard block |
||
226 | 226 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
227 | 227 | <?php |
228 | 228 | foreach ($allIdPs as $id => $name) { |
229 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
229 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
230 | 230 | } |
231 | 231 | ?> |
232 | 232 | </select> |
233 | 233 | <?php |
234 | 234 | } else { |
235 | 235 | echo "<div>"; |
236 | - echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
236 | + echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
237 | 237 | echo "</div>"; |
238 | 238 | } |
239 | 239 | ?> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | <h2><?php echo _("2. CSR generation"); ?></h2> |
244 | 244 | <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
245 | 245 | <?php |
246 | - echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced"; |
|
246 | + echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced"; |
|
247 | 247 | ?> |
248 | 248 | <h2><?php echo _("3. Submission"); ?></h2> |
249 | 249 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |