// Get And Store DeviceCertRequest Public Key. // $Certificate = base64_decode($DeviceCert); $Certificate_Details = openssl_pkey_get_details(openssl_csr_get_public_key($Certificate)); $Certificate_PublicKey = $Certificate_Details['key']; // file_put_contents($DevicePath . DS . "DeviceCert.csr", $Certificate); file_put_contents($DevicePath . DS . "DeviceCertPublic.key", $Certificate_PublicKey); // Extra // extract($ActivationInfoDEC); // This is an extremely needed check :). // $Check_iDevice = Check_iDevice($ProductType); $Check_iDevice_Type = Check_iDevice($ProductType, true); $Check_iDevice_Name = Check_iDevice($ProductType, true, true); // // if ($Check_iDevice === true) { $Msg->Info("Check_iDevice = Look for SIMStatus\r\n", "AInfo"); $Has_SIM = true; if (array_key_exists('SIMStatus', get_defined_vars())) { $Msg->Info("SIMStatus = Checked " . $SIMStatus, "AInfo"); if (Check_SIMStatus($SIMStatus) === true) { $Msg->Info("SIMStatus = Normal " . $SIMStatus, "AInfo"); $SIM_OK = true; } else { $Msg->Info("SIMStatus = Warning " . $SIMStatus, "AInfo"); $SIM_OK = false; } } else {
} else { $activation_info = $parser->parse(Plist_Wrapper($activation_info)); } extract($activation_info); // Prepare ActivationInfoXML.plist File. $ActivationInfoDEC = base64_decode($ActivationInfoXML); file_put_contents($Request_Path . DS . "ActivationInfoXML.plist", $ActivationInfoDEC); $ActivationInfoDEC = $parser->parse($ActivationInfoDEC); extract($ActivationInfoDEC); // Get All Files Saved Correctly. unlink($Request_Path . DS . "deviceActivation_Ticket_Request.serialized"); rename($Request_Path . DS . "deviceActivation_Ticket_Request.json", $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "deviceActivation_Ticket_Request.json"); rename($Request_Path . DS . "activation-info.plist", $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "activation-info.plist"); rename($Request_Path . DS . "ActivationInfoXML.plist", $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationInfoXML.plist"); // This is an extremely needed check :). $Check_iDevice = Check_iDevice($ProductType); if ($Check_iDevice == true) { if (Get_Var_Exists('SIMStatus') == true) { if (Check_SIMStatus($SIMStatus)) { $SIM_OK = true; } else { $SIM_OK = false; } } else { $SIM_OK = false; } } else { $SIM_OK = true; } // Get Device Type. if ($DeviceClass == "iPhone" or strpos($ProductType, "iPhone") !== false) {