@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | |
106 | 106 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
107 | 107 | |
108 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
109 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
110 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
108 | + $this->loggerInstance->debug(5, "Device-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
109 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
110 | + $this->loggerInstance->debug(5, "All low-Level Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
111 | 111 | |
112 | 112 | // now fetch and merge profile-level attributes if not already set on deeper level |
113 | 113 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | - $this->loggerInstance->debug(5, "Merged Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
140 | + $this->loggerInstance->debug(5, "Merged Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
141 | 141 | |
142 | 142 | // now, fetch and merge IdP-wide attributes |
143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | // add the internal attribute to that effect |
153 | 153 | |
154 | 154 | if (isset($this->attributes['media:openroaming_always'])) { |
155 | - $this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] )); |
|
155 | + $this->attributes = array_merge($this->attributes, $this->addInternalAttributes(["internal:openroaming" => TRUE])); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $this->loggerInstance->debug(4, "--- END Constructing new Profile object ... ---\n"); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | "row_id" => $attributeQuery->row_id, |
201 | 201 | "flag" => $optinfo['flag'], |
202 | 202 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
203 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
203 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
204 | 204 | } |
205 | 205 | return $temparray; |
206 | 206 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function setAnonymousIDSupport($shallwe) |
311 | 311 | { |
312 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
312 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** Toggle special username for realm checks |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | * @return void |
320 | 320 | */ |
321 | 321 | public function setRealmCheckUser($shallwe, $localpart = NULL) { |
322 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
322 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
323 | 323 | if ($localpart !== NULL) { |
324 | 324 | $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart); |
325 | 325 | } |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function setInputVerificationPreference($verify, $hint) |
336 | 336 | { |
337 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
338 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
337 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
338 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
339 | 339 | " WHERE profile_id = $this->identifier"); |
340 | 340 | } |
341 | 341 |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $result = $this->databaseHandle->exec($query); |
455 | 455 | $rows = $result->fetch_all(); |
456 | 456 | foreach ($rows as $row) { |
457 | - $activeProfiles[] = $row[0]; |
|
457 | + $activeProfiles[] = $row[0]; |
|
458 | 458 | } |
459 | 459 | $query = "SELECT institution.inst_id AS inst_id, profile.profile_id AS profile_id, profile_option.option_value AS cert FROM profile_option JOIN profile ON profile_option.profile_id=profile.profile_id JOIN institution ON profile.inst_id=institution.inst_id WHERE profile_option.option_name='eap:ca_file' and institution.country='".$this->tld."'"; |
460 | 460 | $result = $this->databaseHandle->exec($query); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | 'country' => strtoupper($idp->federation), |
532 | 532 | 'instance' => $idp, |
533 | 533 | 'realms' => $idpQuery->realms] |
534 | - ; |
|
534 | + ; |
|
535 | 535 | $returnarray[$idp->identifier] = $idpInfo; |
536 | 536 | } |
537 | 537 | if ($activeOnly != 0) { // we're only doing this once. |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | // for now (no OpenRoaming client certs available) only run server-side tests |
305 | 305 | foreach ($listOfIPs as $oneIP) { |
306 | 306 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
307 | - if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
307 | + if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
308 | 308 | $allHostsOkay = FALSE; |
309 | 309 | } else { |
310 | 310 | $oneHostOkay = TRUE; |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | $profileStatus = self::CERT_STATUS_OK; |
914 | 914 | foreach ($rows as $row) { |
915 | 915 | $encodedCert = $row[0]; |
916 | - $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time(); |
|
916 | + $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time(); |
|
917 | 917 | if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) { |
918 | 918 | $certStatus = self::CERT_STATUS_ERROR; |
919 | 919 | } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) { |
@@ -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 | print "$profileId\n"; |
34 | 34 | $profile = \core\ProfileFactory::instantiate($profileId); |
@@ -374,7 +374,7 @@ |
||
374 | 374 | throw new Exception("Unknown test requested: default case reached!"); |
375 | 375 | } |
376 | 376 | $returnarray['datetime'] = date("Y-m-d H:i:s"); |
377 | -if ($token!= '' && is_dir($jsonDir.'/'.$token)) { |
|
377 | +if ($token != '' && is_dir($jsonDir.'/'.$token)) { |
|
378 | 378 | @mkdir($jsonDir.'/'.$token, 0777, true); |
379 | 379 | } |
380 | 380 | $json_data = json_encode($returnarray); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $expectedName = $addr['hostname']; |
133 | 133 | $protocols = []; |
134 | 134 | if (isset($addr['protocols'])) { |
135 | - foreach($addr['protocols'] as $protocol) { |
|
135 | + foreach ($addr['protocols'] as $protocol) { |
|
136 | 136 | if ($protocol['enabled']) { |
137 | 137 | $protocols[] = $protocol['type']; |
138 | 138 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $json_data = json_encode($returnArray); |
214 | 214 | |
215 | 215 | if ($token) { |
216 | - $loggerInstance->debug(4, 'JSON data written to ' .$jsonDir.'/'.$token); |
|
216 | + $loggerInstance->debug(4, 'JSON data written to '.$jsonDir.'/'.$token); |
|
217 | 217 | file_put_contents($jsonDir.'/'.$token.'/realm', $json_data); |
218 | 218 | } |
219 | 219 | echo($json_data); |
@@ -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; |
@@ -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> |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | <td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
324 | 324 | <td id='src$hostindex' colspan=2> |
325 | 325 | "; |
326 | - $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf (_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>'; |
|
326 | + $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf(_("elapsed time: %sms."), $result->time_millisec).'<p>'.$result->message.'</p>'; |
|
327 | 327 | |
328 | 328 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
329 | 329 | foreach ($result->cert_oddities as $oddities) { |
@@ -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 _("---PPPLEASE 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/> |