mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 19:53:25 +01:00
[AltServer] Prefers revoking existing AltStore certificate (if it exists)
This commit is contained in:
@@ -346,7 +346,8 @@ private extension ALTDeviceManager
|
|||||||
var isCancelled = false
|
var isCancelled = false
|
||||||
|
|
||||||
// Check if there is another AltStore certificate, which means AltStore has been installed with this Apple ID before.
|
// Check if there is another AltStore certificate, which means AltStore has been installed with this Apple ID before.
|
||||||
if let previousCertificate = certificates.first(where: { $0.machineName?.starts(with: "AltStore") == true })
|
let altstoreCertificate = certificates.first { $0.machineName?.starts(with: "AltStore") == true }
|
||||||
|
if let previousCertificate = altstoreCertificate
|
||||||
{
|
{
|
||||||
if FileManager.default.fileExists(atPath: certificateFileURL.path),
|
if FileManager.default.fileExists(atPath: certificateFileURL.path),
|
||||||
let data = try? Data(contentsOf: certificateFileURL),
|
let data = try? Data(contentsOf: certificateFileURL),
|
||||||
@@ -419,7 +420,7 @@ private extension ALTDeviceManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let certificate = certificates.first
|
if let certificate = altstoreCertificate ?? certificates.first
|
||||||
{
|
{
|
||||||
if team.type != .free
|
if team.type != .free
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user