Passed
Push — master ( 4a7490...26f0ec )
by Tomasz
07:21 queued 15s
created
web/admin/edit_hotspot.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (!isset($_GET['deployment_id'])) {
38 38
     $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED);
39
-    header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
39
+    header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
40 40
     exit(0);
41 41
 }
42 42
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         if (in_array('OK', $response)) {
51 51
             $deployment->deactivate();
52 52
         }
53
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
53
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
54 54
         exit(0);
55 55
     }
56 56
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         if (in_array('OK', $response)) {
60 60
             $deployment->activate();
61 61
         }
62
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
62
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
63 63
         exit(0);
64 64
     }
65 65
     
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         if ($deployment->status == core\DeploymentManaged::ACTIVE) {
80 80
             $response = $deployment->setRADIUSconfig();
81 81
         }
82
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
82
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
83 83
         exit(0);
84 84
     }
85 85
 }
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
     echo $uiElements->instLevelInfoBoxes($my_inst);
108 108
     $deploymentOptions = $deployment->getAttributes();
109 109
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
110
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
110
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
111 111
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, "Profile");
112 112
     ?>
113 113
     <?php
114 114
     echo "<fieldset class='option_container' id='managedsp_override'>
115
-    <legend><strong>" . _("Options for this deployment") . "</strong></legend>";
115
+    <legend><strong>" . _("Options for this deployment")."</strong></legend>";
116 116
     ?>
117 117
     <table>
118 118
         <tr>
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             <!-- input for VLAN identifier for home users-->
131 131
             <td>
132 132
                 <span id='vlan_label'>
133
-                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
133
+                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
134 134
                 </span>
135 135
             </td>
136 136
             <td>
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     </table>
146 146
     <?php
147 147
     echo $optionDisplay->prefilledOptionTable("managedsp");
148
-    echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>" . _("Add new option") . "</button>";
148
+    echo "<button type='button' class='newoption' onclick='getXML(\"managedsp\")'>"._("Add new option")."</button>";
149 149
     echo "</fieldset>";
150 150
 
151 151
 
152
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
152
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
153 153
     echo $deco->footer();
154 154
     
Please login to merge, or discard this patch.
core/CertificationAuthorityEmbeddedECDSA.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 
16 16
 class CertificationAuthorityEmbeddedECDSA extends EntityWithDBProperties implements CertificationAuthorityInterface {
17 17
 
18
-    private const LOCATION_ROOT_CA = ROOT . "/config/SilverbulletClientCerts/rootca-ECDSA.pem";
19
-    private const LOCATION_ISSUING_CA = ROOT . "/config/SilverbulletClientCerts/real-ECDSA.pem";
20
-    private const LOCATION_ISSUING_KEY = ROOT . "/config/SilverbulletClientCerts/real-ECDSA.key";
21
-    private const LOCATION_CONFIG = ROOT . "/config/SilverbulletClientCerts/openssl-ECDSA.cnf";
18
+    private const LOCATION_ROOT_CA = ROOT."/config/SilverbulletClientCerts/rootca-ECDSA.pem";
19
+    private const LOCATION_ISSUING_CA = ROOT."/config/SilverbulletClientCerts/real-ECDSA.pem";
20
+    private const LOCATION_ISSUING_KEY = ROOT."/config/SilverbulletClientCerts/real-ECDSA.key";
21
+    private const LOCATION_CONFIG = ROOT."/config/SilverbulletClientCerts/openssl-ECDSA.cnf";
22 22
 
23 23
     /**
24 24
      * string with the PEM variant of the root CA
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
         parent::__construct();
65 65
         $this->rootPem = file_get_contents(CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA);
66 66
         if ($this->rootPem === FALSE) {
67
-            throw new Exception("Root CA PEM file not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA);
67
+            throw new Exception("Root CA PEM file not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ROOT_CA);
68 68
         }
69 69
         $this->issuingCertRaw = file_get_contents(CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA);
70 70
         if ($this->issuingCertRaw === FALSE) {
71
-            throw new Exception("Issuing CA PEM file not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA);
71
+            throw new Exception("Issuing CA PEM file not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_CA);
72 72
         }
73 73
         $rootParsed = openssl_x509_read($this->rootPem);
74 74
         $this->issuingCert = openssl_x509_read($this->issuingCertRaw);
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
             throw new Exception("At least one CA PEM file did not parse correctly!");
77 77
         }
78 78
         if (stat(CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY) === FALSE) {
79
-            throw new Exception("Private key not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY);
79
+            throw new Exception("Private key not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY);
80 80
         }
81
-        $issuingKeyTemp = openssl_pkey_get_private("file://" . CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY);
81
+        $issuingKeyTemp = openssl_pkey_get_private("file://".CertificationAuthorityEmbeddedECDSA::LOCATION_ISSUING_KEY);
82 82
         if ($issuingKeyTemp === FALSE) {
83 83
             throw new Exception("The private key did not parse correctly!");
84 84
         }
85 85
         $this->issuingKey = $issuingKeyTemp;
86 86
         if (stat(CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG) === FALSE) {
87
-            throw new Exception("openssl configuration not found: " . CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG);
87
+            throw new Exception("openssl configuration not found: ".CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG);
88 88
         }
89 89
         $this->conffile = CertificationAuthorityEmbeddedECDSA::LOCATION_CONFIG;
90 90
     }
@@ -126,27 +126,27 @@  discard block
 block discarded – undo
126 126
         // generate stub index.txt file
127 127
         $tempdirArray = \core\common\Entity::createTemporaryDirectory("test");
128 128
         $tempdir = $tempdirArray['dir'];
129
-        $nowIndexTxt = (new \DateTime())->format("ymdHis") . "Z";
130
-        $expiryIndexTxt = $originalExpiry->format("ymdHis") . "Z";
129
+        $nowIndexTxt = (new \DateTime())->format("ymdHis")."Z";
130
+        $expiryIndexTxt = $originalExpiry->format("ymdHis")."Z";
131 131
         // serials for our CA are always integers
132
-        $serialHex = strtoupper(dechex((int)$cert->serial));
132
+        $serialHex = strtoupper(dechex((int) $cert->serial));
133 133
         if (strlen($serialHex) % 2 == 1) {
134
-            $serialHex = "0" . $serialHex;
134
+            $serialHex = "0".$serialHex;
135 135
         }
136 136
 
137
-        $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$federation/CN=$cert->username\n";
137
+        $indexStatement = "$certstatus\t$expiryIndexTxt\t".($certstatus == "R" ? "$nowIndexTxt,unspecified" : "")."\t$serialHex\tunknown\t/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$federation/CN=$cert->username\n";
138 138
         $this->loggerInstance->debug(4, "index.txt contents-to-be: $indexStatement");
139
-        if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) {
139
+        if (!file_put_contents($tempdir."/index.txt", $indexStatement)) {
140 140
             $this->loggerInstance->debug(1, "Unable to write openssl index.txt file for revocation handling!");
141 141
         }
142 142
         // index.txt.attr is dull but needs to exist
143
-        file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n");
143
+        file_put_contents($tempdir."/index.txt.attr", "unique_subject = yes\n");
144 144
         // call "openssl ocsp" to manufacture our own OCSP statement
145 145
         // adding "-rmd sha1" to the following command-line makes the
146 146
         // choice of signature algorithm for the response explicit
147 147
         // but it's only available from openssl-1.1.0 (which we do not
148 148
         // want to require just for that one thing).
149
-        $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";
149
+        $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";
150 150
         $this->loggerInstance->debug(2, "Calling openssl ocsp with following cmdline: $execCmd\n");
151 151
         $output = [];
152 152
         $return = 999;
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
         if ($return !== 0) {
155 155
             throw new Exception("Non-zero return value from openssl ocsp!");
156 156
         }
157
-        $ocsp = file_get_contents($tempdir . "/$serialHex.response.der");
157
+        $ocsp = file_get_contents($tempdir."/$serialHex.response.der");
158 158
         // remove the temp dir!
159
-        unlink($tempdir . "/$serialHex.response.der");
160
-        unlink($tempdir . "/index.txt.attr");
161
-        unlink($tempdir . "/index.txt");
159
+        unlink($tempdir."/$serialHex.response.der");
160
+        unlink($tempdir."/index.txt.attr");
161
+        unlink($tempdir."/index.txt");
162 162
         rmdir($tempdir);
163 163
         $this->databaseHandle->exec("UPDATE silverbullet_certificate SET OCSP = ?, OCSP_timestamp = NOW() WHERE serial_number = ?", "si", $ocsp, $cert->serial);
164 164
         return $ocsp;
Please login to merge, or discard this patch.
core/CertificationAuthorityEduPki.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 class CertificationAuthorityEduPki extends EntityWithDBProperties implements CertificationAuthorityInterface {
18 18
 
19
-    private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
20
-    private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
21
-    private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
19
+    private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
20
+    private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
21
+    private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
22 22
     private const EDUPKI_RA_ID = 700;
23 23
     private const EDUPKI_CERT_PROFILE = "User SOAP";
24 24
     private const EDUPKI_RA_PKEY_PASSPHRASE = "...";
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
         parent::__construct();
34 34
 
35 35
         if (stat(CertificationAuthorityEduPki::LOCATION_RA_CERT) === FALSE) {
36
-            throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPki::LOCATION_RA_CERT);
36
+            throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPki::LOCATION_RA_CERT);
37 37
         }
38 38
         if (stat(CertificationAuthorityEduPki::LOCATION_RA_KEY) === FALSE) {
39
-            throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPki::LOCATION_RA_KEY);
39
+            throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPki::LOCATION_RA_KEY);
40 40
         }
41 41
         if (stat(CertificationAuthorityEduPki::LOCATION_WEBROOT) === FALSE) {
42
-            throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPki::LOCATION_WEBROOT);
42
+            throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPki::LOCATION_WEBROOT);
43 43
         }
44 44
     }
45 45
 
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
         // initialise connection to eduPKI CA / eduroam RA and send the request to them
69 69
         try {
70 70
             $altArray = [# Array mit den Subject Alternative Names
71
-                "email:" . $csr["USERNAME"]
71
+                "email:".$csr["USERNAME"]
72 72
             ];
73 73
             $soapPub = $this->initEduPKISoapSession("PUBLIC");
74 74
             $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n");
75
-            $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPki::EDUPKI_RA_ID . "\n");
76
-            $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR"] . "\n");
75
+            $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPki::EDUPKI_RA_ID."\n");
76
+            $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR"]."\n");
77 77
             $this->loggerInstance->debug(5, "PARAM_3: ");
78 78
             $this->loggerInstance->debug(5, $altArray);
79
-            $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE . "\n");
80
-            $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n");
81
-            $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n");
82
-            $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERNAME"] . "\n");
83
-            $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n");
79
+            $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE."\n");
80
+            $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n");
81
+            $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n");
82
+            $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERNAME"]."\n");
83
+            $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n");
84 84
             $this->loggerInstance->debug(5, "PARAM_9: false\n");
85 85
             $soapNewRequest = $soapPub->newRequest(
86 86
                     CertificationAuthorityEduPki::EDUPKI_RA_ID, # RA-ID
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
         } catch (Exception $e) {
103 103
             // PHP 7.1 can do this much better
104 104
             if (is_soap_fault($e)) {
105
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}:  {
105
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}:  {
106 106
                     $e->faultstring
107 107
                 }\n");
108 108
             }
109
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
109
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
110 110
         }
111 111
         try {
112 112
             $soap = $this->initEduPKISoapSession("RA");
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
                     $soapReqnum, [
119 119
                 "RaID" => CertificationAuthorityEduPki::EDUPKI_RA_ID,
120 120
                 "Role" => CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE,
121
-                "Subject" => "DC=eduroam,DC=test,DC=test,C=" . $csr["FED"] . ",O=" . \config\ConfAssistant::CONSORTIUM['name'] . ",OU=" . $csr["FED"] . ",CN=" . $csr['USERNAME'] . ",emailAddress=" . $csr['USERNAME'],
122
-                "SubjectAltNames" => ["email:" . $csr["USERNAME"]],
121
+                "Subject" => "DC=eduroam,DC=test,DC=test,C=".$csr["FED"].",O=".\config\ConfAssistant::CONSORTIUM['name'].",OU=".$csr["FED"].",CN=".$csr['USERNAME'].",emailAddress=".$csr['USERNAME'],
122
+                "SubjectAltNames" => ["email:".$csr["USERNAME"]],
123 123
                 "NotBefore" => (new \DateTime())->format('c'),
124 124
                 "NotAfter" => $expiry->format('c'),
125 125
                     ]
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
139 139
             // rather than just using the string. Grr.
140 140
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
141
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext);
141
+            file_put_contents($tempdir['dir']."/content.txt", $soapCleartext);
142 142
             // retrieve our RA cert from filesystem                    
143 143
             // the RA certificates are not needed right now because we
144 144
             // have resorted to S/MIME signatures with openssl command-line
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
151 151
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
152 152
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n  $soapCleartext\n");
153
-            $execCmd = \config\Master::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";
153
+            $execCmd = \config\Master::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";
154 154
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline:   $execCmd\n");
155 155
             $output = [];
156 156
             $return = 999;
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
                 throw new Exception("Non-zero return value from openssl smime!");
160 160
             }
161 161
             // and get the signature blob back from the filesystem
162
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
162
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
163 163
             $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n");
164
-            $this->loggerInstance->debug(5, $soapReqnum . "\n");
165
-            $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending!
166
-            $this->loggerInstance->debug(5, $detachedSig . "\n");
164
+            $this->loggerInstance->debug(5, $soapReqnum."\n");
165
+            $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending!
166
+            $this->loggerInstance->debug(5, $detachedSig."\n");
167 167
             $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig);
168
-            $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest());
169
-            $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse());
168
+            $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest());
169
+            $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse());
170 170
             if ($soapIssueCert === FALSE) {
171 171
                 throw new Exception("The locally approved request was NOT processed by the CA.");
172 172
             }
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
                 throw new Exception("CAInfo has no root certificate for us!");
204 204
             }
205 205
         } catch (SoapFault $e) {
206
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
206
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
207 207
         } catch (Exception $e) {
208
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
208
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
209 209
         }
210 210
         return [
211 211
             "CERT" => openssl_x509_read($parsedCert['pem']),
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
238 238
             // rather than just using the string. Grr.
239 239
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
240
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest);
240
+            file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest);
241 241
             // retrieve our RA cert from filesystem
242 242
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
243 243
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
244 244
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n");
245
-            $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPki::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPki::LOCATION_RA_CERT;
245
+            $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPki::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPki::LOCATION_RA_CERT;
246 246
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n");
247 247
             $output = [];
248 248
             $return = 999;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 throw new Exception("Non-zero return value from openssl smime!");
252 252
             }
253 253
             // and get the signature blob back from the filesystem
254
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
254
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
255 255
             $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig);
256 256
             if ($soapIssueRev === FALSE) {
257 257
                 throw new Exception("The locally approved revocation request was NOT processed by the CA.");
@@ -259,9 +259,9 @@  discard block
 block discarded – undo
259 259
         } catch (Exception $e) {
260 260
             // PHP 7.1 can do this much better
261 261
             if (is_soap_fault($e)) {
262
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n");
262
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n");
263 263
             }
264
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
264
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
265 265
         }
266 266
     }
267 267
 
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
      * @return string the integer as string in an XML fragment
359 359
      */
360 360
     public function soapToXmlInteger($x) {
361
-        return '<' . $x[0] . '>'
361
+        return '<'.$x[0].'>'
362 362
                 . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1)
363
-                . '</' . $x[0] . '>';
363
+                . '</'.$x[0].'>';
364 364
     }
365 365
 
366 366
     /**
@@ -378,9 +378,9 @@  discard block
 block discarded – undo
378 378
         // dump private key into directory
379 379
         $outstring = "";
380 380
         openssl_pkey_export($privateKey, $outstring);
381
-        file_put_contents($tempdir . "/pkey.pem", $outstring);
381
+        file_put_contents($tempdir."/pkey.pem", $outstring);
382 382
         // PHP can only do one DC in the Subject. But we need three.
383
-        $execCmd = \config\Master::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";
383
+        $execCmd = \config\Master::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";
384 384
         $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n");
385 385
         $output = [];
386 386
         $return = 999;
Please login to merge, or discard this patch.
core/CertificationAuthorityEmbeddedRSA.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 
16 16
 class CertificationAuthorityEmbeddedRSA extends EntityWithDBProperties implements CertificationAuthorityInterface {
17 17
 
18
-    private const LOCATION_ROOT_CA = ROOT . "/config/SilverbulletClientCerts/rootca-RSA.pem";
19
-    private const LOCATION_ISSUING_CA = ROOT . "/config/SilverbulletClientCerts/real-RSA.pem";
20
-    private const LOCATION_ISSUING_KEY = ROOT . "/config/SilverbulletClientCerts/real-RSA.key";
21
-    private const LOCATION_CONFIG = ROOT . "/config/SilverbulletClientCerts/openssl-RSA.cnf";
18
+    private const LOCATION_ROOT_CA = ROOT."/config/SilverbulletClientCerts/rootca-RSA.pem";
19
+    private const LOCATION_ISSUING_CA = ROOT."/config/SilverbulletClientCerts/real-RSA.pem";
20
+    private const LOCATION_ISSUING_KEY = ROOT."/config/SilverbulletClientCerts/real-RSA.key";
21
+    private const LOCATION_CONFIG = ROOT."/config/SilverbulletClientCerts/openssl-RSA.cnf";
22 22
 
23 23
     /**
24 24
      * string with the PEM variant of the root CA
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
         parent::__construct();
65 65
         $this->rootPem = file_get_contents(CertificationAuthorityEmbeddedRSA::LOCATION_ROOT_CA);
66 66
         if ($this->rootPem === FALSE) {
67
-            throw new Exception("Root CA PEM file not found: " . CertificationAuthorityEmbeddedRSA::LOCATION_ROOT_CA);
67
+            throw new Exception("Root CA PEM file not found: ".CertificationAuthorityEmbeddedRSA::LOCATION_ROOT_CA);
68 68
         }
69 69
         $this->issuingCertRaw = file_get_contents(CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA);
70 70
         if ($this->issuingCertRaw === FALSE) {
71
-            throw new Exception("Issuing CA PEM file not found: " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA);
71
+            throw new Exception("Issuing CA PEM file not found: ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA);
72 72
         }
73 73
         $rootParsed = openssl_x509_read($this->rootPem);
74 74
         $this->issuingCert = openssl_x509_read($this->issuingCertRaw);
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
             throw new Exception("At least one CA PEM file did not parse correctly!");
77 77
         }
78 78
         if (stat(CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY) === FALSE) {
79
-            throw new Exception("Private key not found: " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY);
79
+            throw new Exception("Private key not found: ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY);
80 80
         }
81
-        $issuingKeyTemp = openssl_pkey_get_private("file://" . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY);
81
+        $issuingKeyTemp = openssl_pkey_get_private("file://".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY);
82 82
         if ($issuingKeyTemp === FALSE) {
83 83
             throw new Exception("The private key did not parse correctly!");
84 84
         }
85 85
         $this->issuingKey = $issuingKeyTemp;
86 86
         if (stat(CertificationAuthorityEmbeddedRSA::LOCATION_CONFIG) === FALSE) {
87
-            throw new Exception("openssl configuration not found: " . CertificationAuthorityEmbeddedRSA::LOCATION_CONFIG);
87
+            throw new Exception("openssl configuration not found: ".CertificationAuthorityEmbeddedRSA::LOCATION_CONFIG);
88 88
         }
89 89
         $this->conffile = CertificationAuthorityEmbeddedRSA::LOCATION_CONFIG;
90 90
     }
@@ -126,27 +126,27 @@  discard block
 block discarded – undo
126 126
         // generate stub index.txt file
127 127
         $tempdirArray = \core\common\Entity::createTemporaryDirectory("test");
128 128
         $tempdir = $tempdirArray['dir'];
129
-        $nowIndexTxt = (new \DateTime())->format("ymdHis") . "Z";
130
-        $expiryIndexTxt = $originalExpiry->format("ymdHis") . "Z";
129
+        $nowIndexTxt = (new \DateTime())->format("ymdHis")."Z";
130
+        $expiryIndexTxt = $originalExpiry->format("ymdHis")."Z";
131 131
         // serials for our CA are always integers
132
-        $serialHex = strtoupper(dechex((int)$cert->serial));
132
+        $serialHex = strtoupper(dechex((int) $cert->serial));
133 133
         if (strlen($serialHex) % 2 == 1) {
134
-            $serialHex = "0" . $serialHex;
134
+            $serialHex = "0".$serialHex;
135 135
         }
136 136
 
137
-        $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$federation/CN=$cert->username\n";
137
+        $indexStatement = "$certstatus\t$expiryIndexTxt\t".($certstatus == "R" ? "$nowIndexTxt,unspecified" : "")."\t$serialHex\tunknown\t/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$federation/CN=$cert->username\n";
138 138
         $this->loggerInstance->debug(4, "index.txt contents-to-be: $indexStatement");
139
-        if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) {
139
+        if (!file_put_contents($tempdir."/index.txt", $indexStatement)) {
140 140
             $this->loggerInstance->debug(1, "Unable to write openssl index.txt file for revocation handling!");
141 141
         }
142 142
         // index.txt.attr is dull but needs to exist
143
-        file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n");
143
+        file_put_contents($tempdir."/index.txt.attr", "unique_subject = yes\n");
144 144
         // call "openssl ocsp" to manufacture our own OCSP statement
145 145
         // adding "-rmd sha1" to the following command-line makes the
146 146
         // choice of signature algorithm for the response explicit
147 147
         // but it's only available from openssl-1.1.0 (which we do not
148 148
         // want to require just for that one thing).
149
-        $execCmd = \config\Master::PATHS['openssl'] . " ocsp -issuer " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA . " -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA . " -rsigner " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA . " -rkey " . CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY . " -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der";
149
+        $execCmd = \config\Master::PATHS['openssl']." ocsp -issuer ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA." -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA." -rsigner ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_CA." -rkey ".CertificationAuthorityEmbeddedRSA::LOCATION_ISSUING_KEY." -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der";
150 150
         $this->loggerInstance->debug(2, "Calling openssl ocsp with following cmdline: $execCmd\n");
151 151
         $output = [];
152 152
         $return = 999;
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
         if ($return !== 0) {
155 155
             throw new Exception("Non-zero return value from openssl ocsp!");
156 156
         }
157
-        $ocsp = file_get_contents($tempdir . "/$serialHex.response.der");
157
+        $ocsp = file_get_contents($tempdir."/$serialHex.response.der");
158 158
         // remove the temp dir!
159
-        unlink($tempdir . "/$serialHex.response.der");
160
-        unlink($tempdir . "/index.txt.attr");
161
-        unlink($tempdir . "/index.txt");
159
+        unlink($tempdir."/$serialHex.response.der");
160
+        unlink($tempdir."/index.txt.attr");
161
+        unlink($tempdir."/index.txt");
162 162
         rmdir($tempdir);
163 163
         $this->databaseHandle->exec("UPDATE silverbullet_certificate SET OCSP = ?, OCSP_timestamp = NOW() WHERE serial_number = ?", "si", $ocsp, $cert->serial);
164 164
         return $ocsp;
Please login to merge, or discard this patch.
core/UserAPI.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->installerPath = $cache['path'];
84 84
         if ($this->installerPath !== NULL && $token === NULL && $password === NULL) {
85 85
             $this->loggerInstance->debug(4, "Using cached installer for: $device\n");
86
-            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor";
86
+            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor";
87 87
             $installerProperties['mime'] = $cache['mime'];
88 88
         } else {
89 89
             $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $token, $password);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done");
172 172
             $installer = $dev->writeInstaller();
173 173
             $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete");
174
-            $iPath = $dev->FPATH . '/tmp/' . $installer;
174
+            $iPath = $dev->FPATH.'/tmp/'.$installer;
175 175
             if ($iPath && is_file($iPath)) {
176 176
                 if (isset($dev->options['mime'])) {
177 177
                     $out['mime'] = $dev->options['mime'];
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
                     $info = new \finfo();
180 180
                     $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE);
181 181
                 }
182
-                $this->installerPath = $dev->FPATH . '/' . $installer;
182
+                $this->installerPath = $dev->FPATH.'/'.$installer;
183 183
                 rename($iPath, $this->installerPath);
184 184
                 $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep();
185 185
                 $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap);
186 186
                 if (\config\Master::DEBUG_LEVEL < 4) {
187
-                    \core\common\Entity::rrmdir($dev->FPATH . '/tmp');
187
+                    \core\common\Entity::rrmdir($dev->FPATH.'/tmp');
188 188
                 }
189
-                $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . "\n");
190
-                $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor";
189
+                $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap."\n");
190
+                $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor";
191 191
             } else {
192
-                $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "\n");
192
+                $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."\n");
193 193
                 $out['link'] = 0;
194 194
             }
195 195
         }
@@ -302,13 +302,13 @@  discard block
 block discarded – undo
302 302
         $file = $this->installerPath;
303 303
         $filetype = $output['mime'];
304 304
         $this->loggerInstance->debug(4, "installer MIME type:$filetype\n");
305
-        header("Content-type: " . $filetype);
305
+        header("Content-type: ".$filetype);
306 306
         if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set
307
-            header('Content-Disposition: inline; filename="' . basename($file) . '"');
307
+            header('Content-Disposition: inline; filename="'.basename($file).'"');
308 308
         } else {
309 309
             header('Content-Transfer-Encoding: base64');
310 310
         }
311
-        header('Content-Length: ' . filesize($file));
311
+        header('Content-Length: '.filesize($file));
312 312
         ob_clean();
313 313
         flush();
314 314
         readfile($file);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE);
330 330
         $offset = 60 * 60 * 24 * 30;
331 331
         // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it
332
-        $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
332
+        $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT";
333 333
         $blob = $inputImage;
334 334
 
335 335
         if ($resize === TRUE) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $filetype = 'image/png'; // default, only one code path where it can become different
385 385
         list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn);
386 386
         if ($resize) {
387
-            $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png';
387
+            $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png';
388 388
         }
389 389
         if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE
390 390
             $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n");
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             if (!isset($device['match'])) {
478 478
                 continue;
479 479
             }
480
-            if (preg_match('/' . $device['match'] . '/', $browser)) {
480
+            if (preg_match('/'.$device['match'].'/', $browser)) {
481 481
                 return $this->returnDevice($devId, $device);
482 482
             }
483 483
         }
Please login to merge, or discard this patch.
devices/PP_OSU_XML/DevicePPOSUXML.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
         <NodeName>AAAServerTrustRoot</NodeName>';
93 93
         foreach ($this->attributes['internal:CAs'][0] as $oneCert) {
94 94
             $retval .= '<Node>
95
-                         <NodeName>' . $oneCert['uuid'] . '</NodeName>
95
+                         <NodeName>' . $oneCert['uuid'].'</NodeName>
96 96
                              <Node>
97 97
                                <NodeName>CertSHA256Fingerprint</NodeName>
98
-                               <Value>' . $oneCert['sha256'] . '</Value>
98
+                               <Value>' . $oneCert['sha256'].'</Value>
99 99
                              </Node>
100 100
                        </Node>
101 101
                   ';
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $now = new \DateTime();
115 115
         return '<Node>
116 116
           <NodeName>CreationDate</NodeName>
117
-          <Value>' . $now->format("Y-m-d") . "T" . $now->format("H:i:s") . "Z" . '</Value>
117
+          <Value>' . $now->format("Y-m-d")."T".$now->format("H:i:s")."Z".'</Value>
118 118
         </Node>';
119 119
     }
120 120
 
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         <NodeName>HomeSP</NodeName>
129 129
         <Node>
130 130
           <NodeName>FriendlyName</NodeName>
131
-          <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']) . '</Value>
131
+          <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']).'</Value>
132 132
         </Node>
133 133
         <Node>
134 134
           <NodeName>FQDN</NodeName>
135
-          <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */ . '</Value>
135
+          <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */.'</Value>
136 136
         </Node>
137 137
         <Node>
138 138
           <NodeName>RoamingConsortiumOI</NodeName>
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 $oiList .= ",";
149 149
             }
150 150
         }
151
-        $retval .= $oiList . '</Value>
151
+        $retval .= $oiList.'</Value>
152 152
         </Node>
153 153
       </Node>';
154 154
         return $retval;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             <NodeName>DigitalCertificate</NodeName>
172 172
             <Node>
173 173
               <NodeName>Realm</NodeName>
174
-              <Value>' . $this->attributes['internal:realm'][0] . '</Value>
174
+              <Value>' . $this->attributes['internal:realm'][0].'</Value>
175 175
             </Node>
176 176
             <Node>
177 177
               <NodeName>CertificateType</NodeName>
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             </Node>
180 180
             <Node>
181 181
               <NodeName>CertSHA256Fingerprint</NodeName>
182
-              <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */ . '</Value>
182
+              <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */.'</Value>
183 183
             </Node>
184 184
           </Node>
185 185
       </Node>';
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         // foresee signing.
295 295
         // but if they ever change their mind, we are prepared
296 296
 
297
-        $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null");
297
+        $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null");
298 298
         if ($outputFromSigning === FALSE) {
299 299
             $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n");
300 300
         }
Please login to merge, or discard this patch.