Code Duplication    Length = 15-15 lines in 2 locations

devices/ms/Device_W8_10.php 2 locations

@@ 125-139 (lines=15) @@
122
        return($profileFileCont);
123
    }
124
125
    private function tlsServerValidation() {
126
        $profileFileCont = '
127
<eapTls:ServerValidation>
128
<eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation>
129
';
130
        $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>';
131
        foreach ($this->caArray as $certAuthority) {
132
            if ($certAuthority['root']) {
133
                $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n";
134
            }
135
        }
136
        $profileFileCont .= '</eapTls:ServerValidation>
137
';
138
        return($profileFileCont);
139
    }
140
    
141
    private function msTtlsServerValidation() {
142
        $profileFileCont = '
@@ 141-155 (lines=15) @@
138
        return($profileFileCont);
139
    }
140
    
141
    private function msTtlsServerValidation() {
142
        $profileFileCont = '
143
        <ServerValidation>
144
';
145
        $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> ';
146
        foreach ($this->caArray as $certAuthority) {
147
            if ($certAuthority['root']) {
148
                $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n";
149
            }
150
        }
151
        $profileFileCont .= '<DisablePrompt>true</DisablePrompt>
152
</ServerValidation>
153
';
154
        return($profileFileCont);
155
    }
156
    
157
    private function glTtlsServerValidation() {
158
        $servers = implode('</ServerName><ServerName>', $this->attributes['eap:server_name']);