@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | class CertificationAuthorityEmbeddedECDSA extends EntityWithDBProperties implements CertificationAuthorityInterface |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - private const LOCATION_ROOT_CA = ROOT . "/config/SilverbulletClientCerts/rootca-ECDSA.pem"; |
|
| 20 | - private const LOCATION_ISSUING_CA = ROOT . "/config/SilverbulletClientCerts/real-ECDSA.pem"; |
|
| 21 | - private const LOCATION_ISSUING_KEY = ROOT . "/config/SilverbulletClientCerts/real-ECDSA.key"; |
|
| 22 | - private const LOCATION_CONFIG = ROOT . "/config/SilverbulletClientCerts/openssl-ECDSA.cnf"; |
|
| 19 | + private const LOCATION_ROOT_CA = ROOT."/config/SilverbulletClientCerts/rootca-ECDSA.pem"; |
|
| 20 | + private const LOCATION_ISSUING_CA = ROOT."/config/SilverbulletClientCerts/real-ECDSA.pem"; |
|
| 21 | + private const LOCATION_ISSUING_KEY = ROOT."/config/SilverbulletClientCerts/real-ECDSA.key"; |
|
| 22 | + private const LOCATION_CONFIG = ROOT."/config/SilverbulletClientCerts/openssl-ECDSA.cnf"; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * string with the PEM variant of the root CA |
@@ -66,29 +66,29 @@ discard block |
||
| 66 | 66 | parent::__construct(); |
| 67 | 67 | $this->rootPem = file_get_contents(CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA); |
| 68 | 68 | if ($this->rootPem === FALSE) { |
| 69 | - throw new Exception("Root CA PEM file not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA); |
|
| 69 | + throw new Exception("Root CA PEM file not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA); |
|
| 70 | 70 | } |
| 71 | 71 | $this->issuingCertRaw = file_get_contents(CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA); |
| 72 | 72 | if ($this->issuingCertRaw === FALSE) { |
| 73 | - throw new Exception("Issuing CA PEM file not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA); |
|
| 73 | + throw new Exception("Issuing CA PEM file not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA); |
|
| 74 | 74 | } |
| 75 | 75 | $rootParsed = openssl_x509_read($this->rootPem); |
| 76 | 76 | $issuingCertCandidate = openssl_x509_read($this->issuingCertRaw); |
| 77 | - if ($issuingCertCandidate === FALSE || is_resource($issuingCertCandidate)|| $rootParsed === FALSE) { |
|
| 77 | + if ($issuingCertCandidate === FALSE || is_resource($issuingCertCandidate) || $rootParsed === FALSE) { |
|
| 78 | 78 | throw new Exception("At least one CA PEM file did not parse correctly (or not a PHP8 resource)!"); |
| 79 | 79 | } |
| 80 | 80 | $this->issuingCert = $issuingCertCandidate; |
| 81 | 81 | |
| 82 | 82 | if (stat(CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY) === FALSE) { |
| 83 | - throw new Exception("Private key not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY); |
|
| 83 | + throw new Exception("Private key not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY); |
|
| 84 | 84 | } |
| 85 | - $issuingKeyTemp = openssl_pkey_get_private("file://" . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY); |
|
| 85 | + $issuingKeyTemp = openssl_pkey_get_private("file://".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY); |
|
| 86 | 86 | if ($issuingKeyTemp === FALSE || is_resource($issuingKeyTemp)) { |
| 87 | 87 | throw new Exception("The private key did not parse correctly (or not a PHP8 resource)!"); |
| 88 | 88 | } |
| 89 | 89 | $this->issuingKey = $issuingKeyTemp; |
| 90 | 90 | if (stat(CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG) === FALSE) { |
| 91 | - throw new Exception("openssl configuration not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG); |
|
| 91 | + throw new Exception("openssl configuration not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG); |
|
| 92 | 92 | } |
| 93 | 93 | $this->conffile = CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG; |
| 94 | 94 | } |
@@ -131,27 +131,27 @@ discard block |
||
| 131 | 131 | // generate stub index.txt file |
| 132 | 132 | $tempdirArray = \core\common\Entity::createTemporaryDirectory("test"); |
| 133 | 133 | $tempdir = $tempdirArray['dir']; |
| 134 | - $nowIndexTxt = (new \DateTime())->format("ymdHis") . "Z"; |
|
| 135 | - $expiryIndexTxt = $originalExpiry->format("ymdHis") . "Z"; |
|
| 134 | + $nowIndexTxt = (new \DateTime())->format("ymdHis")."Z"; |
|
| 135 | + $expiryIndexTxt = $originalExpiry->format("ymdHis")."Z"; |
|
| 136 | 136 | // serials for our CA are always integers |
| 137 | 137 | $serialHex = strtoupper(dechex((int) $cert->serial)); |
| 138 | 138 | if (strlen($serialHex) % 2 == 1) { |
| 139 | - $serialHex = "0" . $serialHex; |
|
| 139 | + $serialHex = "0".$serialHex; |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$federation/CN=$cert->username\n"; |
|
| 142 | + $indexStatement = "$certstatus\t$expiryIndexTxt\t".($certstatus == "R" ? "$nowIndexTxt,unspecified" : "")."\t$serialHex\tunknown\t/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$federation/CN=$cert->username\n"; |
|
| 143 | 143 | $this->loggerInstance->debug(4, "index.txt contents-to-be: $indexStatement"); |
| 144 | - if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) { |
|
| 144 | + if (!file_put_contents($tempdir."/index.txt", $indexStatement)) { |
|
| 145 | 145 | $this->loggerInstance->debug(1, "Unable to write openssl index.txt file for revocation handling!"); |
| 146 | 146 | } |
| 147 | 147 | // index.txt.attr is dull but needs to exist |
| 148 | - file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n"); |
|
| 148 | + file_put_contents($tempdir."/index.txt.attr", "unique_subject = yes\n"); |
|
| 149 | 149 | // call "openssl ocsp" to manufacture our own OCSP statement |
| 150 | 150 | // adding "-rmd sha1" to the following command-line makes the |
| 151 | 151 | // choice of signature algorithm for the response explicit |
| 152 | 152 | // but it's only available from openssl-1.1.0 (which we do not |
| 153 | 153 | // want to require just for that one thing). |
| 154 | - $execCmd = \config\Master::PATHS['openssl'] . " ocsp -issuer " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA . " -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA . " -rsigner " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA . " -rkey " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY . " -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der"; |
|
| 154 | + $execCmd = \config\Master::PATHS['openssl']." ocsp -issuer ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA." -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA." -rsigner ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA." -rkey ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY." -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der"; |
|
| 155 | 155 | $this->loggerInstance->debug(2, "Calling openssl ocsp with following cmdline: $execCmd\n"); |
| 156 | 156 | $output = []; |
| 157 | 157 | $return = 999; |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | if ($return !== 0) { |
| 160 | 160 | throw new Exception("Non-zero return value from openssl ocsp!"); |
| 161 | 161 | } |
| 162 | - $ocsp = file_get_contents($tempdir . "/$serialHex.response.der"); |
|
| 162 | + $ocsp = file_get_contents($tempdir."/$serialHex.response.der"); |
|
| 163 | 163 | // remove the temp dir! |
| 164 | - unlink($tempdir . "/$serialHex.response.der"); |
|
| 165 | - unlink($tempdir . "/index.txt.attr"); |
|
| 166 | - unlink($tempdir . "/index.txt"); |
|
| 164 | + unlink($tempdir."/$serialHex.response.der"); |
|
| 165 | + unlink($tempdir."/index.txt.attr"); |
|
| 166 | + unlink($tempdir."/index.txt"); |
|
| 167 | 167 | rmdir($tempdir); |
| 168 | 168 | $this->databaseHandle->exec("UPDATE silverbullet_certificate SET OCSP = ?, OCSP_timestamp = NOW() WHERE serial_number = ?", "si", $ocsp, $cert->serial); |
| 169 | 169 | return $ocsp; |
@@ -1,22 +1,22 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
| 2 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
| 3 | 3 | /** |
| 4 | 4 | * check if URL responds with 200 |
| 5 | 5 | * |
| 6 | 6 | * @param string $srv server name |
| 7 | 7 | * @return integer or NULL |
| 8 | 8 | */ |
| 9 | -function checkConfigRADIUSDaemon ($srv) { |
|
| 9 | +function checkConfigRADIUSDaemon($srv) { |
|
| 10 | 10 | $ch = curl_init(); |
| 11 | 11 | if ($ch === FALSE) { |
| 12 | 12 | return NULL; |
| 13 | 13 | } |
| 14 | 14 | $timeout = 10; |
| 15 | - curl_setopt ( $ch, CURLOPT_URL, $srv ); |
|
| 16 | - curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
| 17 | - curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout ); |
|
| 15 | + curl_setopt($ch, CURLOPT_URL, $srv); |
|
| 16 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
| 17 | + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
|
| 18 | 18 | curl_exec($ch); |
| 19 | - $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); |
|
| 19 | + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
|
| 20 | 20 | curl_close($ch); |
| 21 | 21 | if ($http_code == 200) { |
| 22 | 22 | return 1; |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | $siteStatus = array(); |
| 55 | 55 | foreach (array_keys($brokenDeployments) as $server_id) { |
| 56 | - print "check $server_id " . $radiusSite[$server_id] . "\n"; |
|
| 57 | - $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://' . $radiusSite[$server_id]); |
|
| 56 | + print "check $server_id ".$radiusSite[$server_id]."\n"; |
|
| 57 | + $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://'.$radiusSite[$server_id]); |
|
| 58 | 58 | if ($siteStatus[$server_id]) { |
| 59 | 59 | echo "\ncheck radius\n"; |
| 60 | 60 | echo \config\Diagnostics::RADIUSSPTEST['port']."\n"; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function divSilverbullet() { |
| 125 | 125 | $retval = " |
| 126 | 126 | <div id='silverbullet'>" |
| 127 | - .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
| 127 | + .$this->Gui->textTemplates->templates[user\SB_GO_AWAY]. |
|
| 128 | 128 | "</div> |
| 129 | 129 | "; |
| 130 | 130 | return $retval; |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | <div id='profiles'> <!-- this is the profile selection filled during run time --> |
| 223 | 223 | <div id='profiles_h' class='sub_h'>".$this->Gui->textTemplates->templates[user\PROFILE_SELECTION]." |
| 224 | 224 | </div>" . |
| 225 | - "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" . |
|
| 225 | + "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>". |
|
| 226 | 226 | "</div>"; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | public function divInstitution($selectButton = TRUE) { |
| 251 | 251 | $retval = "<div id='institution_name'> |
| 252 | 252 | <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" . |
| 253 | - ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "") . |
|
| 253 | + ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : ""). |
|
| 254 | 254 | "</div>"; |
| 255 | 255 | $retval .= $this->emptyImage('idp_logo', 'IdP Logo'); |
| 256 | 256 | return $retval; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | protected function setSupportedEapMethods($eapArray) |
| 87 | 87 | { |
| 88 | 88 | $this->supportedEapMethods = $eapArray; |
| 89 | - $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: "); |
|
| 89 | + $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: "); |
|
| 90 | 90 | $this->loggerInstance->debug(4, $this->supportedEapMethods); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | return $baseName.$inst.'-'.$prof; |
| 461 | 461 | } |
| 462 | 462 | } |
| 463 | - return $baseName . $inst; |
|
| 463 | + return $baseName.$inst; |
|
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | /** |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | // only add network blocks if their respective condition is met in this profile |
| 591 | 591 | if ($netDetails['condition'] === TRUE || (isset($this->attributes[$netDetails['condition']]) && $this->attributes[$netDetails['condition']] === TRUE)) { |
| 592 | 592 | $networks[$netName] = $netDetails; |
| 593 | - $this->loggerInstance->debug(5,$netName, "\nAdding network: "); |
|
| 593 | + $this->loggerInstance->debug(5, $netName, "\nAdding network: "); |
|
| 594 | 594 | } |
| 595 | 595 | } |
| 596 | 596 | // add locally defined SSIDs |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | they are from the same user group. You are not allowed to share them to an unlimited |
| 63 | 63 | audience (e.g. on a publicly accessible web server).</li> |
| 64 | 64 | <li>If You are an eduroam Identity Provider administrator, you are allowed to download and pass on the Installers to |
| 65 | -your own <?php echo \config\ConfAssistant::CONSORTIUM['nomenclature_idp'];?> end users, e.g. on the support web pages of your <?php echo \config\ConfAssistant::CONSORTIUM['nomenclature_idp'];?>, on Welcome Package CDs or USB sticks, etc.</li> |
|
| 65 | +your own <?php echo \config\ConfAssistant::CONSORTIUM['nomenclature_idp']; ?> end users, e.g. on the support web pages of your <?php echo \config\ConfAssistant::CONSORTIUM['nomenclature_idp']; ?>, on Welcome Package CDs or USB sticks, etc.</li> |
|
| 66 | 66 | <li>If You are a third-party not affiliated with eduroam, you are only allowed to download and pass on |
| 67 | 67 | the Metadata and/or the Installers after having received written permission by the eduroam Operations team.</li> |
| 68 | 68 | </ul> |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | // please run this as a cron job every hour |
| 23 | 23 | |
| 24 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
| 24 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
| 25 | 25 | |
| 26 | 26 | // iterate through all federations and see if there are recently expired |
| 27 | 27 | // invitations for any of them |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $admins = $this_fed->listFederationAdmins(); |
| 56 | 56 | $mailtext = "Hello, |
| 57 | 57 | |
| 58 | -invitation tokens for the following new ". \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] ." have recently expired: |
|
| 58 | +invitation tokens for the following new ". \config\ConfAssistant::CONSORTIUM['nomenclature_participant']." have recently expired: |
|
| 59 | 59 | |
| 60 | 60 | "; |
| 61 | 61 | foreach ($listofinstnames as $instname) { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if ($numberofexistingidps > 0) { |
| 66 | 66 | $mailtext .= " |
| 67 | 67 | |
| 68 | -Additionally, $numberofexistingidps invitations for an existing ". \config\ConfAssistant::CONSORTIUM['nomenclature_participant']." have expired. |
|
| 68 | +Additionally, $numberofexistingidps invitations for an existing ".\config\ConfAssistant::CONSORTIUM['nomenclature_participant']." have expired. |
|
| 69 | 69 | "; |
| 70 | 70 | } |
| 71 | 71 | $mailtext .= " |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | Greetings, |
| 75 | 75 | |
| 76 | -A humble " . \config\Master::APPEARANCE['productname'] . " cron job |
|
| 76 | +A humble " . \config\Master::APPEARANCE['productname']." cron job |
|
| 77 | 77 | "; |
| 78 | 78 | |
| 79 | 79 | foreach ($admins as $admin) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $delProfiles[] = $ssid; |
| 77 | 77 | } |
| 78 | 78 | if ($cipher == 'TKIP') { |
| 79 | - $delProfiles[] = $ssid . ' (TKIP)'; |
|
| 79 | + $delProfiles[] = $ssid.' (TKIP)'; |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $iterator = 0; |
| 87 | 87 | foreach ($allSSID as $ssid => $cipher) { |
| 88 | 88 | if ($cipher == 'TKIP') { |
| 89 | - $windowsProfile[$iterator] = $this->writeWLANprofile($ssid . ' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
| 89 | + $windowsProfile[$iterator] = $this->writeWLANprofile($ssid.' (TKIP)', $ssid, 'WPA', 'TKIP', $eapConfig, $iterator); |
|
| 90 | 90 | $iterator++; |
| 91 | 91 | } |
| 92 | 92 | $windowsProfile[$iterator] = $this->writeWLANprofile($ssid, $ssid, 'WPA2', 'AES', $eapConfig, $iterator); |
@@ -148,10 +148,10 @@ discard block |
||
| 148 | 148 | $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
| 149 | 149 | <EapMethod> |
| 150 | 150 | <Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' . |
| 151 | - $this->selectedEap["OUTER"] . '</Type> |
|
| 151 | + $this->selectedEap["OUTER"].'</Type> |
|
| 152 | 152 | <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> |
| 153 | 153 | <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> |
| 154 | -<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId> |
|
| 154 | +<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId> |
|
| 155 | 155 | </EapMethod> |
| 156 | 156 | '; |
| 157 | 157 | |
@@ -164,9 +164,9 @@ discard block |
||
| 164 | 164 | $profileFileCont .= ' |
| 165 | 165 | <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
| 166 | 166 | <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata"> |
| 167 | -<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID"> |
|
| 167 | +<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID"> |
|
| 168 | 168 | <ProviderInfo> |
| 169 | -<DisplayName>' . $this->translateString($attr['general:instname'][0]) . '</DisplayName> |
|
| 169 | +<DisplayName>' . $this->translateString($attr['general:instname'][0]).'</DisplayName> |
|
| 170 | 170 | </ProviderInfo> |
| 171 | 171 | <AuthenticationMethods> |
| 172 | 172 | <AuthenticationMethod> |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | if ($outerUser == '') { |
| 179 | 179 | $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
| 180 | 180 | } else { |
| 181 | - $profileFileCont .= '<AnonymousIdentity>' . $outerUser . '@' . $realm . '</AnonymousIdentity>'; |
|
| 181 | + $profileFileCont .= '<AnonymousIdentity>'.$outerUser.'@'.$realm.'</AnonymousIdentity>'; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | $profileFileCont .= '</ClientSideCredential> |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $profileFileCont .= ' |
| 197 | 197 | </ServerSideCredential> |
| 198 | 198 | <InnerAuthenticationMethod> |
| 199 | -<NonEAPAuthMethod>' .$innerMethod. '</NonEAPAuthMethod> |
|
| 199 | +<NonEAPAuthMethod>' .$innerMethod.'</NonEAPAuthMethod> |
|
| 200 | 200 | </InnerAuthenticationMethod> |
| 201 | 201 | <VendorSpecific> |
| 202 | 202 | <SessionResumption>false</SessionResumption> |
@@ -221,11 +221,11 @@ discard block |
||
| 221 | 221 | </eapTls:CredentialsSource> |
| 222 | 222 | <eapTls:ServerValidation> |
| 223 | 223 | <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation> |
| 224 | -<eapTls:ServerNames>' . $servers . '</eapTls:ServerNames>'; |
|
| 224 | +<eapTls:ServerNames>' . $servers.'</eapTls:ServerNames>'; |
|
| 225 | 225 | if ($caArray) { |
| 226 | 226 | foreach ($caArray as $certAuthority) { |
| 227 | 227 | if ($certAuthority['root']) { |
| 228 | - $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n"; |
|
| 228 | + $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n"; |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | } |
@@ -257,11 +257,11 @@ discard block |
||
| 257 | 257 | <msPeap:EapType> |
| 258 | 258 | <msPeap:ServerValidation> |
| 259 | 259 | <msPeap:DisableUserPromptForServerValidation>true</msPeap:DisableUserPromptForServerValidation> |
| 260 | -<msPeap:ServerNames>' . $servers . '</msPeap:ServerNames>'; |
|
| 260 | +<msPeap:ServerNames>' . $servers.'</msPeap:ServerNames>'; |
|
| 261 | 261 | if ($caArray) { |
| 262 | 262 | foreach ($caArray as $certAuthority) { |
| 263 | 263 | if ($certAuthority['root']) { |
| 264 | - $vistaExt .= "<msPeap:TrustedRootCA>" . $certAuthority['sha1'] . "</msPeap:TrustedRootCA>\n"; |
|
| 264 | + $vistaExt .= "<msPeap:TrustedRootCA>".$certAuthority['sha1']."</msPeap:TrustedRootCA>\n"; |
|
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | } |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | <msChapV2:UseWinLogonCredentials>false</msChapV2:UseWinLogonCredentials> |
| 275 | 275 | </msChapV2:EapType> |
| 276 | 276 | </baseEap:Eap> |
| 277 | -<msPeap:EnableQuarantineChecks>' . $nea . '</msPeap:EnableQuarantineChecks> |
|
| 277 | +<msPeap:EnableQuarantineChecks>' . $nea.'</msPeap:EnableQuarantineChecks> |
|
| 278 | 278 | <msPeap:RequireCryptoBinding>false</msPeap:RequireCryptoBinding> |
| 279 | 279 | </msPeap:EapType> |
| 280 | 280 | </baseEap:Eap> |
@@ -286,11 +286,11 @@ discard block |
||
| 286 | 286 | <EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1"> |
| 287 | 287 | <ServerValidation> |
| 288 | 288 | <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation> |
| 289 | -<ServerNames>' . $servers . '</ServerNames>'; |
|
| 289 | +<ServerNames>' . $servers.'</ServerNames>'; |
|
| 290 | 290 | if ($caArray) { |
| 291 | 291 | foreach ($caArray as $certAuthority) { |
| 292 | 292 | if ($certAuthority['root']) { |
| 293 | - $w7Ext .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n"; |
|
| 293 | + $w7Ext .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n"; |
|
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | } |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | <UseWinLogonCredentials>false</UseWinLogonCredentials> |
| 304 | 304 | </EapType> |
| 305 | 305 | </Eap> |
| 306 | -<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks> |
|
| 306 | +<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks> |
|
| 307 | 307 | <RequireCryptoBinding>false</RequireCryptoBinding> |
| 308 | 308 | '; |
| 309 | 309 | if ($useAnon) { |
| 310 | 310 | $w7Ext .= '<PeapExtensions> |
| 311 | 311 | <IdentityPrivacy xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2"> |
| 312 | 312 | <EnableIdentityPrivacy>true</EnableIdentityPrivacy> |
| 313 | -<AnonymousUserName>' . $outerUser . '</AnonymousUserName> |
|
| 313 | +<AnonymousUserName>' . $outerUser.'</AnonymousUserName> |
|
| 314 | 314 | </IdentityPrivacy> |
| 315 | 315 | </PeapExtensions> |
| 316 | 316 | '; |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | $profileFileContEnd = '</EapHostConfig></EAPConfig> |
| 329 | 329 | '; |
| 330 | 330 | $returnArray = []; |
| 331 | - $returnArray['vista'] = $profileFileCont . $vistaExt . $profileFileContEnd; |
|
| 332 | - $returnArray['w7'] = $profileFileCont . $w7Ext . $profileFileContEnd; |
|
| 331 | + $returnArray['vista'] = $profileFileCont.$vistaExt.$profileFileContEnd; |
|
| 332 | + $returnArray['w7'] = $profileFileCont.$w7Ext.$profileFileContEnd; |
|
| 333 | 333 | return $returnArray; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -348,10 +348,10 @@ discard block |
||
| 348 | 348 | private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber) { |
| 349 | 349 | $profileFileCont = '<?xml version="1.0"?> |
| 350 | 350 | <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> |
| 351 | -<name>' . $wlanProfileName . '</name> |
|
| 351 | +<name>' . $wlanProfileName.'</name> |
|
| 352 | 352 | <SSIDConfig> |
| 353 | 353 | <SSID> |
| 354 | -<name>' . $ssid . '</name> |
|
| 354 | +<name>' . $ssid.'</name> |
|
| 355 | 355 | </SSID> |
| 356 | 356 | <nonBroadcast>true</nonBroadcast> |
| 357 | 357 | </SSIDConfig> |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | <MSM> |
| 362 | 362 | <security> |
| 363 | 363 | <authEncryption> |
| 364 | -<authentication>' . $auth . '</authentication> |
|
| 365 | -<encryption>' . $encryption . '</encryption> |
|
| 364 | +<authentication>' . $auth.'</authentication> |
|
| 365 | +<encryption>' . $encryption.'</encryption> |
|
| 366 | 366 | <useOneX>true</useOneX> |
| 367 | 367 | </authEncryption> |
| 368 | 368 | '; |
@@ -392,9 +392,9 @@ discard block |
||
| 392 | 392 | mkdir('vista'); |
| 393 | 393 | } |
| 394 | 394 | $vistaFileName = "vista/wlan_prof-$profileNumber.xml"; |
| 395 | - file_put_contents($vistaFileName, $profileFileCont . $eapConfig['vista'] . $closing); |
|
| 395 | + file_put_contents($vistaFileName, $profileFileCont.$eapConfig['vista'].$closing); |
|
| 396 | 396 | $sevenFileName = "w7/wlan_prof-$profileNumber.xml"; |
| 397 | - file_put_contents($sevenFileName, $profileFileCont . $eapConfig['w7'] . $closing); |
|
| 397 | + file_put_contents($sevenFileName, $profileFileCont.$eapConfig['w7'].$closing); |
|
| 398 | 398 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
| 399 | 399 | $this->loggerInstance->debug(4, "WLAN_Profile:$wlanProfileName:$encryption\n"); |
| 400 | 400 | return("\"$wlanProfileName\" \"$encryption\""); |
@@ -431,8 +431,8 @@ discard block |
||
| 431 | 431 | mkdir('vista'); |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | - file_put_contents("vista/lan_prof.xml", $profileFileCont . $eapConfig['vista'] . $closing); |
|
| 435 | - file_put_contents("w7/lan_prof.xml", $profileFileCont . $eapConfig['w7'] . $closing); |
|
| 434 | + file_put_contents("vista/lan_prof.xml", $profileFileCont.$eapConfig['vista'].$closing); |
|
| 435 | + file_put_contents("w7/lan_prof.xml", $profileFileCont.$eapConfig['w7'].$closing); |
|
| 436 | 436 | |
| 437 | 437 | } |
| 438 | 438 | |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | private function writeMainNSH($eap, $attr) { |
| 447 | 447 | $this->loggerInstance->debug(4, "writeMainNSH"); |
| 448 | 448 | $this->loggerInstance->debug(4, $attr); |
| 449 | - $this->loggerInstance->debug(4, "MYLANG=" . $this->lang . "\n"); |
|
| 449 | + $this->loggerInstance->debug(4, "MYLANG=".$this->lang."\n"); |
|
| 450 | 450 | |
| 451 | 451 | $eapOptions = [ |
| 452 | 452 | \core\common\EAP::PEAP => ['str' => 'PEAP', 'exec' => 'user'], |
@@ -477,8 +477,8 @@ discard block |
||
| 477 | 477 | $this->loggerInstance->debug(4, "EAP_STR=$eapStr\n"); |
| 478 | 478 | $this->loggerInstance->debug(4, $eap); |
| 479 | 479 | |
| 480 | - $fcontents .= '!define ' . $eapStr; |
|
| 481 | - $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"'; |
|
| 480 | + $fcontents .= '!define '.$eapStr; |
|
| 481 | + $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"'; |
|
| 482 | 482 | $fcontents .= $this->writeNsisDefines($attr); |
| 483 | 483 | file_put_contents('main.nsh', $fcontents); |
| 484 | 484 | } |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | foreach ($caArray as $certAuthority) { |
| 509 | 509 | $store = $certAuthority['root'] ? "root" : "ca"; |
| 510 | - $contentCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n"; |
|
| 510 | + $contentCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n"; |
|
| 511 | 511 | } |
| 512 | 512 | fwrite($fileHandleCerts, $contentCerts); |
| 513 | 513 | fclose($fileHandleCerts); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | private function getCredentialSource() |
| 46 | 46 | { |
| 47 | 47 | $element = new \core\DeviceXMLmain(); |
| 48 | - $element->setChild('CertificateStore',''); |
|
| 48 | + $element->setChild('CertificateStore', ''); |
|
| 49 | 49 | return($element); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | { |
| 39 | 39 | $element = new \core\DeviceXMLmain(); |
| 40 | 40 | $element->setChild('ServerValidation', $this->getPeapServerValidation()); |
| 41 | - $element->setChild('FastReconnect','true'); |
|
| 41 | + $element->setChild('FastReconnect', 'true'); |
|
| 42 | 42 | $element->setChild('InnerEapOptional', 'false'); |
| 43 | 43 | $element->setChild('Eap', $this->getMsChapV2(), self::MS_BASEEAPCONN_NS); |
| 44 | 44 | $element->setChild('EnableQuarantineChecks', $this->nea); |