diff --git a/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtectionModule.swift b/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtectionModule.swift index c33c465..17c9efc 100644 --- a/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtectionModule.swift +++ b/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtectionModule.swift @@ -735,9 +735,18 @@ public class RebreakProtectionModule: Module { let tmpURL = finalURL.appendingPathExtension("tmp") try data.write(to: tmpURL, options: .atomic) - // DiGA-Hardening + // DiGA-Hardening: Datei verschlüsselt at-rest. WICHTIG: + // `.completeUntilFirstUserAuthentication`, NICHT `.complete` — + // die PacketTunnel-Extension muss `blocklist.bin` auch bei + // GESPERRTEM Gerät lesen können. `startTunnel` läuft OS-getrieben + // (on-demand) auch während Lock-Phasen; `.complete` macht die Datei + // dann unlesbar → `HashList.load()` liefert 0 Hashes → Layer 1 + // blockt nichts, bis die App das nächste Mal synct. + // `.completeUntilFirstUserAuthentication` bleibt at-rest + // verschlüsselt, ist aber nach dem ersten Entsperren seit Boot + // lesbar — die korrekte Klasse für eine 24/7-NE-Datei. try? (tmpURL as NSURL).setResourceValue( - URLFileProtection.complete, + URLFileProtection.completeUntilFirstUserAuthentication, forKey: .fileProtectionKey ) var mut = tmpURL @@ -895,9 +904,11 @@ public class RebreakProtectionModule: Module { let tmpURL = finalURL.appendingPathExtension("tmp") try data.write(to: tmpURL, options: .atomic) - // DiGA-Hardening (gespiegelt von syncBlocklist). + // DiGA-Hardening (gespiegelt von syncBlocklist) — + // `.completeUntilFirstUserAuthentication`, damit die Datei auch aus + // Hintergrund-Kontexten bei gesperrtem Gerät lesbar bleibt. try? (tmpURL as NSURL).setResourceValue( - URLFileProtection.complete, + URLFileProtection.completeUntilFirstUserAuthentication, forKey: .fileProtectionKey ) var mut = tmpURL