mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-04 06:55:09 +00:00
feat(drm): license a plugin DRM at the licence step and over --remote with the client's plugin device
This commit is contained in:
+12
-4
@@ -1074,8 +1074,10 @@ def every_drm() -> list:
|
||||
|
||||
|
||||
def local_plugin_drm() -> CustomDRM:
|
||||
"""A plugin DRM that a device licensed: its content key and its ticket never leave the machine."""
|
||||
drm = CustomDRM("example", kids=[VIDEO_KID], display_id="EXAMPLE-1", data={"ticket": "server only"})
|
||||
"""A plugin DRM that a device licensed: its ticket crosses as licence data, its content key and its other data never do."""
|
||||
drm = CustomDRM(
|
||||
"example", kids=[VIDEO_KID], display_id="EXAMPLE-1", data={"ticket": VIDEO_KID.hex, "secret": "server only"}
|
||||
)
|
||||
drm.content_keys[VIDEO_KID] = VIDEO_KEY
|
||||
return drm
|
||||
|
||||
@@ -1085,7 +1087,13 @@ def test_rest_drm_of_each_system(example_plugins: None) -> None:
|
||||
assert serialize_drm(drm) == [
|
||||
*REST_VIDEO["drm"],
|
||||
{"type": "other", "kids": [], "label": "OTHER", "data": {"key": HELD_KEY.hex()}},
|
||||
{"type": "example", "kids": [VIDEO_KID.hex], "label": "EXAMPLE", "display_id": "EXAMPLE-1"},
|
||||
{
|
||||
"type": "example",
|
||||
"kids": [VIDEO_KID.hex],
|
||||
"label": "EXAMPLE",
|
||||
"display_id": "EXAMPLE-1",
|
||||
"data": {"ticket": VIDEO_KID.hex},
|
||||
},
|
||||
{
|
||||
"type": "clearkeyctr",
|
||||
"key": HELD_KEY.hex(),
|
||||
@@ -1129,7 +1137,7 @@ def test_reconstruct_rest_drm(example_plugins: None) -> None:
|
||||
"label": "EXAMPLE",
|
||||
"kids": [VIDEO_KID.hex],
|
||||
"display_id": "EXAMPLE-1",
|
||||
"data": {},
|
||||
"data": {"ticket": VIDEO_KID.hex},
|
||||
},
|
||||
{"class": "ClearKeyCTR", "kids": [], "content_keys": {}},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user