Class: Device_macosx
Source Location: /devices/apple_mac_os_x/macosx.php
Class Device_macosx
Class Overview
This is the main implementation class of the module
The class should only define one public method: writeInstaller. All other methods and properties should be private. This example sets zipInstaller method to protected, so that it can be seen in the documentation.
Located in /devices/apple_mac_os_x/macosx.php [line 33]
DeviceConfig
|
--Device_macosx
Author(s):
Information Tags:
|
Properties
|
Methods
|
Inherited Properties, Constants, and Methods
Method Summary
Device_macosx |
__construct() |
this array holds the list of EAP methods supported by this device |
void |
writeInstaller() |
prepare a zip archive containing files and settings which normally would be used inside the module to produce an installer |
Methods
Device_macosx __construct(
)
|
|
this array holds the list of EAP methods supported by this device
API Tags:
Redefinition of:
- DeviceConfig::__construct()
- device module constructor should be defined by each module, but if it is not, then here is a default one
prepare a zip archive containing files and settings which normally would be used inside the module to produce an installer
/** run innitial setup
this will:
- create the temporary directory and save its path as $this->FPATH
- process the CA certificates and store results in $this->attributes['internal:CAs'][0]
$this->attributes['internal:CAs'][0] is an array of processed CA certificates
a processed certifincate is an array
'pem' points to pem feromat certificate
'der' points to der format certificate
'md5' points to md5 fingerprint
'sha1' points to sha1 fingerprint
'name' points to the certificate subject
- save the info_file (if exists) and put the name in $this->attributes['internal:info_file_name'][0]
*/
$dom = textdomain(NULL);
textdomain("devices");
debug(4,"macosx Module Installer start\n");
// $this->setup($profile);
if (isset ($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset ($this->attributes['internal:realm']))
$use_realm = $this->attributes['internal:realm'][0];
else
$use_realm = 0;
$filename = $this->attributes['general:instname'][0]. "-". $this->attributes['profile:name'][0]. ".networkConnect";
debug(4,"filename is going to be". $filename. "\n");
$xml_f = fopen($filename,'w');
$raw_document = "";
$server_names = $this->attributes['eap:server_name'];
$uuid_list = $this->list_ca_uuids($this->attributes['internal:CAs'][0]);
$raw_document .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"
\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>8021X</key>
<dict>
<key>UserProfiles</key>
<array>";
$raw_document .= $this->all_wlan($ssid_list,$uuid_list,$eap_type, $use_realm, $ca_list, $server_names);
//$raw_document .= $this->all_ca($this->attributes['internal:CAs'][0]);
//$raw_document .= $this->all_server_names($server_names);
$raw_document .= "
</dict>
</dict>
</plist>";
$tidy_config = array(
'input-xml' => true,
'indent' => true,
'output-xml' => true,
'tabsize' => 4,
'wrap' => 83);
// Tidy
$tidy = new tidy;
$tidy->parseString($raw_document, $tidy_config, 'utf8');
$tidy->cleanRepair();
$e = 'signed-'.$filename;
$o = system($this->sign. " $filename $e > /dev/null");
}
else
$e = $filename;
textdomain($dom);
return $e;
}
API Tags:
Redefinition of:
- DeviceConfig::writeInstaller()
- placeholder for the main device method
|
|