@@ -168,27 +168,27 @@ discard block |
||
168 | 168 | { |
169 | 169 | // it could match CN or sAN:DNS, we don't care which |
170 | 170 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) { |
171 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . |
|
172 | - " against Subject: " . $this->TLS_CA_checks_result[$host]['certdata']['subject']); |
|
171 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName. |
|
172 | + " against Subject: ".$this->TLS_CA_checks_result[$host]['certdata']['subject']); |
|
173 | 173 | // we are checking against accidental misconfig, not attacks, so loosely checking against end of string is appropriate |
174 | - if (preg_match("/CN=" . $this->expectedName . "/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
174 | + if (preg_match("/CN=".$this->expectedName."/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
175 | 175 | return TRUE; |
176 | 176 | } |
177 | 177 | } |
178 | 178 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
179 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against sANs: "); |
|
179 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against sANs: "); |
|
180 | 180 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']); |
181 | 181 | $testNames = $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
182 | 182 | if (!is_array($testNames)) { |
183 | 183 | $testNames = [$testNames]; |
184 | 184 | } |
185 | 185 | foreach ($testNames as $oneName) { |
186 | - if (preg_match("/" . $this->expectedName . "/", $oneName) === 1) { |
|
186 | + if (preg_match("/".$this->expectedName."/", $oneName) === 1) { |
|
187 | 187 | return TRUE; |
188 | 188 | } |
189 | 189 | } |
190 | 190 | } |
191 | - $this->loggerInstance->debug(3, "Tried to check expected server name " . $this->expectedName . " but neither CN nor sANs matched."); |
|
191 | + $this->loggerInstance->debug(3, "Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
192 | 192 | |
193 | 193 | $this->TLS_CA_checks_result[$host]['cert_oddity'] = RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH; |
194 | 194 | return FALSE; |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
219 | 219 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
220 | 220 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
221 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
222 | - if (!file_exists(ROOT . '/config/cli-certs/' . $cert['public']) ||!file_exists(ROOT . |
|
223 | - '/config/cli-certs/' . $cert['private'])) { |
|
221 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
222 | + if (!file_exists(ROOT.'/config/cli-certs/'.$cert['public']) || !file_exists(ROOT. |
|
223 | + '/config/cli-certs/'.$cert['private'])) { |
|
224 | 224 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['finalerror'] = 2; |
225 | 225 | continue; |
226 | 226 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | if (in_array("TLS1.3", $protocols) && count($protocols) > 1) { |
232 | 232 | $prot .= ' -no_tls1_3'; |
233 | 233 | } |
234 | - $add .= ' ' . $prot; |
|
234 | + $add .= ' '.$prot; |
|
235 | 235 | $opensslbabble = $this->execOpensslClient($host, $add, $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]); |
236 | 236 | $res = $this->opensslClientsResult($host, $opensslbabble, $this->TLS_clients_checks_result, $type, $k); |
237 | 237 | if ($cert['expected'] == 'PASS') { |
@@ -273,11 +273,11 @@ discard block |
||
273 | 273 | // but code analysers want this more explicit, so here is this extra |
274 | 274 | // call to escapeshellarg() |
275 | 275 | $escapedHost = escapeshellarg($host); |
276 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
276 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1\n"); |
|
277 | 277 | $time_start = microtime(true); |
278 | 278 | $opensslbabble = []; |
279 | 279 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
280 | - exec(\config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -CApath " . ROOT . "/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
280 | + exec(\config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -CApath ".ROOT."/config/ca-certs/$this->consortium/ $arg 2>&1", $opensslbabble, $result); |
|
281 | 281 | $time_stop = microtime(true); |
282 | 282 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
283 | 283 | $testresults['returncode'] = $result; |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | private function propertyCheckPolicy($cert) |
400 | 400 | { |
401 | 401 | $oids = []; |
402 | - if (isset($cert['extensions']['certificatePolicies']) && $cert['extensions']['certificatePolicies']) { |
|
402 | + if (isset($cert['extensions']['certificatePolicies']) && $cert['extensions']['certificatePolicies']) { |
|
403 | 403 | foreach (\config\Diagnostics::RADIUSTESTS['TLS-acceptableOIDs'] as $key => $oid) { |
404 | 404 | if (preg_match("/Policy: $oid/", $cert['extensions']['certificatePolicies'])) { |
405 | 405 | $oids[$key] = $oid; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * License: see the web/copyright.php file in the file structure |
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
11 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * The sctipt will be called from crontab |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | -while ( $row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) { |
|
31 | +while ($row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) { |
|
32 | 32 | $profileId = $row->profile_id; |
33 | 33 | $profile = \core\ProfileFactory::instantiate($profileId); |
34 | 34 | $res = $profile->openroamingRedinessTest(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * update the local copy |
25 | 25 | */ |
26 | 26 | |
27 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
27 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
28 | 28 | setlocale(LC_CTYPE, "en_US.UTF-8"); |
29 | 29 | |
30 | 30 | class updateFromMonitor { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $tmp_table = 'tmp_'.$table_name; |
114 | 114 | if ($this->tablesource[$table_name] == 'eduroam') { |
115 | 115 | $this->db_local->select_db('monitor_copy'); |
116 | - } elseif($this->tablesource[$table_name] == 'eduroamv2') { |
|
116 | + } elseif ($this->tablesource[$table_name] == 'eduroamv2') { |
|
117 | 117 | $this->db_local->select_db('eduroamv2'); |
118 | 118 | } |
119 | 119 | $this->db_local->query("CREATE TEMPORARY TABLE $tmp_table SELECT * FROM $table LIMIT 0"); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $this->db->query("SET NAMES 'utf8'"); |
123 | 123 | $this->db_local->query("SET NAMES 'utf8mb4'"); |
124 | 124 | $result = $this->db->query("SELECT * FROM $table"); |
125 | - $queryFields = implode(',', array_column($this->fields[$table_name],0)); |
|
125 | + $queryFields = implode(',', array_column($this->fields[$table_name], 0)); |
|
126 | 126 | while ($row = $result->fetch_assoc()) { |
127 | 127 | $v = []; |
128 | 128 | foreach ($this->fields[$table_name] as $field) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | } |
142 | 142 | } |
143 | - $queryValues = implode(',',$v); |
|
143 | + $queryValues = implode(',', $v); |
|
144 | 144 | $query = "INSERT INTO $tmp_table (".$queryFields.") VALUES (".$queryValues.")"; |
145 | 145 | $this->db_local->query($query); |
146 | 146 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $tmp_table = 'tmp_'.$table_name; |
153 | 153 | if ($this->tablesource[$table_name] == 'eduroam') { |
154 | 154 | $this->db_local->select_db('monitor_copy'); |
155 | - } elseif($this->tablesource[$table_name] == 'eduroamv2') { |
|
155 | + } elseif ($this->tablesource[$table_name] == 'eduroamv2') { |
|
156 | 156 | $this->db_local->select_db('eduroamv2'); |
157 | 157 | } |
158 | 158 | $this->db_local->query("SET NAMES 'utf8mb4'"); |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | private function escape($inp) { |
164 | - $out=str_replace('\\','\\\\',$inp); |
|
165 | - $out=str_replace('"','\"',$out); |
|
166 | - $out=str_replace('?','\?',$out); |
|
164 | + $out = str_replace('\\', '\\\\', $inp); |
|
165 | + $out = str_replace('"', '\"', $out); |
|
166 | + $out = str_replace('?', '\?', $out); |
|
167 | 167 | $out = 'convert(cast(convert("'.$out.'" using latin1) as binary) using utf8)'; |
168 | 168 | return($out); |
169 | 169 | } |
@@ -162,7 +162,7 @@ |
||
162 | 162 | ?> |
163 | 163 | <div id="tabs-3"> |
164 | 164 | <!--<button id="run_d_tests" onclick="run_dynamic()"><?php echo _("Repeat dynamic connectivity tests") ?></button>--> |
165 | - <?php print $realmTests->printDynamic();?> |
|
165 | + <?php print $realmTests->printDynamic(); ?> |
|
166 | 166 | |
167 | 167 | </div> |
168 | 168 | <?php |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | <table><tr> |
293 | 293 | <td class='icon_td'>"; |
294 | 294 | $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>". |
295 | - $this->globalInfo[$this->globalLevelStatic].' '. _("See the appropriate tab for details.").'</td> |
|
295 | + $this->globalInfo[$this->globalLevelStatic].' '._("See the appropriate tab for details.").'</td> |
|
296 | 296 | </tr></table>'; |
297 | 297 | if ($this->naptr > 0) { |
298 | 298 | $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | <td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
325 | 325 | <td id='src$hostindex' colspan=2> |
326 | 326 | "; |
327 | - $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf (_("elapsed time: %sms."), $result->time_millisec).'<div>'.$result->message.'</div>'; |
|
327 | + $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<div>'.$result->message.'</div>'; |
|
328 | 328 | |
329 | 329 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
330 | 330 | foreach ($result->cert_oddities as $oddities) { |
@@ -341,16 +341,16 @@ discard block |
||
341 | 341 | } |
342 | 342 | } |
343 | 343 | if ($result->server_cert->extensions) { |
344 | - $certdesc .= '<li>' . _('Extensions') . '<ul>'; |
|
344 | + $certdesc .= '<li>'._('Extensions').'<ul>'; |
|
345 | 345 | foreach ($result->server_cert->extensions as $ekey => $eval) { |
346 | - $certdesc .= '<li>' . $ekey . ': ' . $eval; |
|
346 | + $certdesc .= '<li>'.$ekey.': '.$eval; |
|
347 | 347 | } |
348 | 348 | $certdesc .= '</ul>'; |
349 | 349 | } |
350 | 350 | $certdesc .= '</ul>'; |
351 | 351 | $more .= '<span class="morecontent"><span>'.$certdesc. |
352 | 352 | '</span> <a href="" class="morelink">'._("show server certificate details").'»</a></span></td></tr>'; |
353 | - $out[] = $more . '</ul>'; |
|
353 | + $out[] = $more.'</ul>'; |
|
354 | 354 | } |
355 | 355 | $out[] = "</td></tr></table></ul>"; |
356 | 356 | } |
@@ -373,10 +373,10 @@ discard block |
||
373 | 373 | if (isset($this->protocolsMap[$capath->IP]) && $this->protocolsMap[$capath->IP] != '') { |
374 | 374 | $prots = explode(';', $this->protocolsMap[$capath->IP]); |
375 | 375 | if (!empty($prots)) { |
376 | - $capathtest[] = ' ' . _("supported TLS protocols: "); |
|
376 | + $capathtest[] = ' '._("supported TLS protocols: "); |
|
377 | 377 | $capathtest[] = implode(', ', $prots); |
378 | 378 | if (!in_array("TLS1.3", $prots)) { |
379 | - $capathtest[] = ' ' . '<font color="red">' . _("not supported: ") . 'TLS1.3</font>'; |
|
379 | + $capathtest[] = ' '.'<font color="red">'._("not supported: ").'TLS1.3</font>'; |
|
380 | 380 | } |
381 | 381 | } |
382 | 382 | } |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | if ($capath->certdata->validTo) { |
400 | 400 | $certdesc .= '<li>'.$this->certFields['validTo'].' '. |
401 | 401 | date_create_from_format('ymdGis', |
402 | - substr($capath->certdata->validTo, 0, -1))->format('Y-m-d H:i:s'). ' UTC'; |
|
402 | + substr($capath->certdata->validTo, 0, -1))->format('Y-m-d H:i:s').' UTC'; |
|
403 | 403 | } |
404 | 404 | if ($capath->certdata->extensions) { |
405 | 405 | if ($capath->certdata->extensions->subjectaltname) { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | } else { |
423 | 423 | $certdesc = '<br>'; |
424 | 424 | } |
425 | - $capathtest[] = '<div>'.($capath->message!='' ? $capath->message : _('Test failed')).'</div>'.$more; |
|
425 | + $capathtest[] = '<div>'.($capath->message != '' ? $capath->message : _('Test failed')).'</div>'.$more; |
|
426 | 426 | $capathtest[] = '</td> |
427 | 427 | </tr> |
428 | 428 | </table>'; |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | $srefused = 0; |
450 | 450 | $cliinfo = ''; |
451 | 451 | $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
452 | - '</b>'.', '.$ca->clientcertinfo->message . |
|
452 | + '</b>'.', '.$ca->clientcertinfo->message. |
|
453 | 453 | '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>'; |
454 | 454 | foreach ($ca->certificate as $certificate) { |
455 | 455 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | } else { |
516 | 516 | $cliinfo = _('Test failed'); |
517 | 517 | $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='". |
518 | - $this->stateIcons[\core\common\Entity::L_WARN]."'></td>" . |
|
518 | + $this->stateIcons[\core\common\Entity::L_WARN]."'></td>". |
|
519 | 519 | "<td id='srcclient$hostindex'>$cliinfo</td></tr></table>"; |
520 | 520 | } |
521 | 521 | } else { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $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 " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[strtoupper($fed->tld)]); |
|
108 | + $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $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=".iconv('UTF-8', 'ASCII//TRANSLIT', $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); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $loggerInstance->debug(2, $DN, "CERT DN: ", "\n"); |
174 | 174 | // our certs can be good for max 5 years |
175 | 175 | $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays); |
176 | - echo "<p>" . _("The certificate was requested.") . "</p>"; |
|
176 | + echo "<p>"._("The certificate was requested.")."</p>"; |
|
177 | 177 | ?> |
178 | 178 | <form action="overview_certificates.php" method="GET"> |
179 | 179 | <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
@@ -191,23 +191,23 @@ discard block |
||
191 | 191 | switch (count($feds)) { |
192 | 192 | case 0: |
193 | 193 | echo "<div>"; |
194 | - 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.")); |
|
194 | + 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.")); |
|
195 | 195 | echo "</div>"; |
196 | 196 | break; |
197 | 197 | case 1: |
198 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
199 | - echo " <strong>" . $cat->knownFederations[$feds[0]->tld] . "</strong>"; |
|
200 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>'; |
|
198 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
199 | + echo " <strong>".$cat->knownFederations[$feds[0]->tld]."</strong>"; |
|
200 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>'; |
|
201 | 201 | break; |
202 | 202 | default: |
203 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
203 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
204 | 204 | ?> |
205 | 205 | <select name="NRO-list" id="NRO-list"> |
206 | 206 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
207 | 207 | <?php |
208 | 208 | foreach ($feds as $oneFed) { |
209 | 209 | #echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld] . "</option>"; |
210 | - echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>"; |
|
210 | + echo '<option value="AAA'.strtoupper($oneFed->tld).'">'.$oneIdP["names"][$langObject->getLang()]."</option>"; |
|
211 | 211 | |
212 | 212 | } |
213 | 213 | ?> |
@@ -218,13 +218,13 @@ discard block |
||
218 | 218 | ?> |
219 | 219 | <script> |
220 | 220 | var instservers = []; |
221 | - var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>'; |
|
221 | + var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>'; |
|
222 | 222 | <?php |
223 | 223 | $allIdPs = []; |
224 | 224 | foreach ($allAuthorizedFeds as $oneFed) { |
225 | 225 | foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { |
226 | - $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()]; |
|
227 | - echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n"; |
|
226 | + $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["names"][$langObject->getLang()]; |
|
227 | + echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n"; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | ?> |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
253 | 253 | <?php |
254 | 254 | foreach ($allIdPs as $id => $name) { |
255 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
255 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
256 | 256 | } |
257 | 257 | ?> |
258 | 258 | </select> |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | <?php |
262 | 262 | echo _('According to the above settings you will receive') |
263 | 263 | ?> |
264 | - <span id='certlevel'><?php echo _('NRO level certificate');?></span> |
|
264 | + <span id='certlevel'><?php echo _('NRO level certificate'); ?></span> |
|
265 | 265 | |
266 | 266 | </span>for server names: |
267 | 267 | <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span> |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | <?php |
270 | 270 | } else { |
271 | 271 | echo "<div>"; |
272 | - 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); |
|
272 | + 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); |
|
273 | 273 | echo "</div>"; |
274 | 274 | } |
275 | 275 | ?> |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | <h2><?php echo _("2. CSR generation"); ?></h2> |
280 | 280 | <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
281 | 281 | <?php |
282 | - 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"; |
|
282 | + 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"; |
|
283 | 283 | ?> |
284 | 284 | <h2><?php echo _("3. Submission"); ?></h2> |
285 | 285 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |