forked from kenzuya/unshackle
fix(vaults): stop false bad-key flags from a failed decode check
Judge a vault KID only on a file whose KID map holds it, tell remote vaults of a bad pair only once another key replaces it, and let the server CDM unflag a pair it returns; the server never flags a CDM-licensed pair. Log FFmpeg stderr on a failed check and name the missing CDM when none is set.
This commit is contained in:
@@ -1045,9 +1045,11 @@ class ServerVault(Vault):
|
||||
``decrypt_verified`` needs a Vault to hold in ``Vaults.sources`` so a server-supplied
|
||||
content key gets the same decode check as a local vault key. The client never learns
|
||||
which server vault answered and can neither read nor write it, so every method returns
|
||||
nothing and a bad verdict goes to the server, which flags the row itself.
|
||||
nothing. A bad verdict goes to the server at once, so its next licence skips the pair.
|
||||
"""
|
||||
|
||||
report_now = True
|
||||
|
||||
def __init__(self, service: "RemoteService"):
|
||||
super().__init__("server_cdm", no_push=True)
|
||||
self.service = service
|
||||
@@ -1067,8 +1069,8 @@ class ServerVault(Vault):
|
||||
def get_services(self) -> Iterator[str]:
|
||||
return iter(())
|
||||
|
||||
def report_bad(self, kid: UUID, key: str) -> None:
|
||||
self.service.report_bad_key(kid, key)
|
||||
def flag_bad_key(self, service: str, kid: Union[UUID, str], key: str, source: str) -> None:
|
||||
self.service.report_bad_key(UUID(str(kid)), key)
|
||||
|
||||
|
||||
class RemoteService:
|
||||
|
||||
Reference in New Issue
Block a user