mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-17 06:25:07 +00:00
feat(drm): license a track only when its own KID has no key
A vault key for the track's KID now stands in for the licence on the client and the server (PlayReady included). decrypt_verified licenses any other header KID the file uses.
This commit is contained in:
@@ -132,3 +132,12 @@ def test_a_refused_server_cdm_licence_logs_one_warning(caplog):
|
||||
|
||||
assert svc.proxy_license(b"chal", track, "widevine") == b"chal"
|
||||
assert [r.levelname for r in caplog.records if r.levelname in ("WARNING", "ERROR")] == ["WARNING"]
|
||||
|
||||
|
||||
def test_the_kid_dl_needs_goes_to_the_server():
|
||||
svc = _service("widevine", {"keys": {KID.hex: "k"}, "drm_type": "widevine"})
|
||||
track = SimpleNamespace(id="vid", drm=[_Widevine()])
|
||||
|
||||
svc.get_widevine_license(challenge=b"", title=None, track=track, kid=KID)
|
||||
|
||||
assert svc.client.posts[0]["kid"] == KID.hex
|
||||
|
||||
Reference in New Issue
Block a user