 private extension ContentProtection {
     
     /// Wrapper to use `Deferred` with `ContentProtection.open()`.
-    func open(file: File, fetcher: Fetcher, credentials: String?, allowUserInteraction: Bool, sender: Any?, onAskCredentials: OnAskCredentials?) -> Deferred<ProtectedFile?, Publication.OpeningError> {
+    func open(file: File, fetcher: Fetcher, allowUserInteraction: Bool, credentials: String?, sender: Any?) -> Deferred<ProtectedFile?, Publication.OpeningError> {
         return deferred { completion in
-            self.open(file: file, fetcher: fetcher, credentials: credentials, allowUserInteraction: allowUserInteraction, sender: sender, onAskCredentials: onAskCredentials, completion: completion)
+            self.open(file: file, fetcher: fetcher, allowUserInteraction: allowUserInteraction, credentials: credentials, sender: sender, completion: completion)
         }
     }
 

        }
    }
    
    /// Prompts the user for a password.
    private func askPassword(sender: Any?) -> Deferred<String?, Publication.OpeningError> {
        return deferred(on: .main) { success, _, cancel in
            self.onAskCredentials(sender) { password in
                if let password = password {
                    success(password)
                } else {
                    cancel()
                }
            }
        }
    }
    
    /// Unlocks any protected file with the provided Content Protections.
    private func openFile(at file: File, with fetcher: Fetcher, credentials: String?, allowUserInteraction: Bool, sender: Any?) -> Deferred<PublicationFile, Publication.OpeningError> {
        func unlock(using protections: [ContentProtection]) -> Deferred<ProtectedFile?, Publication.OpeningError> {
            return deferred {
                var protections = protections

                let fetcher = try ArchiveFetcher(url: file.url, password: password, openArchive: self.openArchive)
                return .success(fetcher)
                
            } catch ArchiveError.invalidPassword {
                return .failure(.incorrectCredentials)

            } catch {
                return .success(FileFetcher(href: "/\(file.name)", path: file.url))
