diff --git a/guide/cli-reference/index.html b/guide/cli-reference/index.html index b27d3eb8f..2bfa812f9 100644 --- a/guide/cli-reference/index.html +++ b/guide/cli-reference/index.html @@ -1147,6 +1147,28 @@ + + +
  • + + + + prd export PRD_PATH + + + + +
  • + +
  • + + + + prd inspect + + + +
  • @@ -2826,6 +2848,28 @@ + + +
  • + + + + prd export PRD_PATH + + + + +
  • + +
  • + + + + prd inspect + + + +
  • @@ -3885,7 +3929,7 @@ through the tunnel. It stops at the first step that fails.

    wvd dump WVD_PATHS... OUT_DIR -Extract a device's contents (metadata, private key, client ID, VMP) into OUT_DIR/<name>/. With no paths, dumps every WVD in the WVDs directory. +Extract a device's contents (metadata, private key, client ID, VMP) into OUT_DIR/<name>/. With no paths, dumps every WVD in the WVDs directory. dump skips a device whose OUT_DIR/<name>/ folder is not empty. wvd new NAME PRIVATE_KEY CLIENT_ID [FILE_HASHES] @@ -3930,11 +3974,11 @@ through the tunnel. It stops at the first step that fails.


    prd

    -

    Manage PlayReady Device (.prd) files. Devices live in the configured PRDs directory. Built on pyplayready.

    +

    Manage PlayReady Device (.prd) files. Devices live in the configured PRDs directory. Each command runs the matching pyplayready command.

    unshackle prd COMMAND [ARGS]...
     

    prd new PATHS...

    -

    Make a new .prd. Give either a single folder that contains zgpriv.dat (group key) and bgroupcert.dat (group certificate), or two file paths (group key, then group certificate).

    +

    Make a new .prd. Give either a single folder that contains zgpriv.dat (group key) and bgroupcert.dat (group certificate), or two file paths (group key, then group certificate). prd new refuses a certificate chain that has a device certificate already or that has expired.

    @@ -3953,13 +3997,13 @@ through the tunnel. It stops at the first step that fails.

    - +
    -o, --outputOutput directory or .prd file path.Output directory or .prd file path. The default is the folder that you give, else the PRDs directory.
    -

    prd new will not overwrite an existing file.

    +

    prd new does not overwrite an existing file.

    prd reprovision PRD_PATH

    -

    Reprovision an existing device by replacing its leaf certificate and keys. Only a device of version 3 or higher can do reprovisioning. Accepts the same -e / -s / -o options. By default it overwrites the device in place.

    +

    Reprovision an existing device by replacing its leaf certificate and keys. Only a provisioned device of version 3 or higher can do reprovisioning. Accepts the same -e / -s / -o options. By default it overwrites the device in place.

    prd test DEVICE

    Do a test of a device against the Microsoft PlayReady demo server and print the returned content keys.

    @@ -3983,12 +4027,19 @@ through the tunnel. It stops at the first step that fails.

    +

    If the server refuses the licence, prd test logs the server reply and exits with code 0.

    +

    prd export PRD_PATH

    +

    Write the group key (zgpriv.dat) and the group certificate (bgroupcert.dat) of a device into OUT_DIR/<name>/. -o sets OUT_DIR; the default is the current directory. A version 2 device has no group key, so export writes only the certificate. If the folder is not empty, export writes nothing.

    +

    prd inspect

    +

    Show each certificate of a certificate chain: type, security level, expiry date, name, features and keys. Give -d with a .prd file, or -c with a chain file such as bgroupcert.dat.

    Example

    unshackle prd new ./device_folder/
     unshackle prd new zgpriv.dat bgroupcert.dat -o /out/dir
     unshackle prd reprovision mydevice.prd
     unshackle prd test mydevice.prd -sl 3000 -c aescbc
    +unshackle prd export mydevice.prd -o ./out_dir
    +unshackle prd inspect -d mydevice.prd
     

    diff --git a/guide/drm-and-cdm/index.html b/guide/drm-and-cdm/index.html index 9e1e385ea..08ba58508 100644 --- a/guide/drm-and-cdm/index.html +++ b/guide/drm-and-cdm/index.html @@ -2784,7 +2784,8 @@ optional.

    $ unshackle wvd dump nexus_6p ./out

    delete removes a device (with a confirmation prompt). dump extracts a -device's contents (metadata, private key, Client ID, VMP) into a folder.

    +device's contents (metadata, private key, Client ID, VMP) into a folder. +dump does not write into a device folder that is not empty.

    @@ -2797,7 +2798,7 @@ an older format. Migrate it with pywidevine before use:

    PlayReady devices: the prd command

    The prd command group creates and maintains .prd files.

    -
    +
    $ unshackle prd new ./zgpriv.dat ./bgroupcert.dat
    @@ -2806,8 +2807,8 @@ an older format. Migrate it with pywidevine before use:

    point at a single folder that contains zgpriv.dat and bgroupcert.dat:

    $ unshackle prd new ./device_folder/
     
    -

    unshackle makes a fresh leaf certificate and writes the device to the PRDs -directory (or to -o/--output). Use -e/--encryption_key and -s/--signing_key +

    unshackle makes a fresh leaf certificate. The device goes into the folder that +you give, or into the PRDs directory when you give two files, or to -o/--output. Use -e/--encryption_key and -s/--signing_key to supply your own ECC keys instead of generating them.

    @@ -2825,6 +2826,14 @@ test server and prints the returned keys, confirming the device works. -sl/--security-level accepts 150, 2000, or 3000 (default 2000). -c/--ckt accepts aesctr or aescbc.

    +
    +
    $ unshackle prd export ./data/PRDs/mydevice.prd -o ./out
    +$ unshackle prd inspect -d ./data/PRDs/mydevice.prd
    +
    +

    export writes the group key and group certificate of a device into a folder. +inspect shows each certificate in the chain of a device (-d) or of a chain +file (-c).

    +

    Selecting which device to use: the cdm config

    @@ -2832,10 +2841,10 @@ test server and prints the returned keys, confirming the device works. for which service. That is the job of the cdm section, which maps a service tag to a device name (the file's name without extension). A default entry acts as the fallback:

    -
    unshackle.yaml
    cdm:
    -  default: nexus_6p_26830_l3
    -  EXAMPLE1: chromecdm_l3
    -  EXAMPLE2: sm_g935f_l1
    +
    unshackle.yaml
    cdm:
    +  default: nexus_6p_26830_l3
    +  EXAMPLE1: chromecdm_l3
    +  EXAMPLE2: sm_g935f_l1
     

    Lookups are case-insensitive.

    @@ -2855,29 +2864,29 @@ profile.

    unshackle compares each config key against the video height. You can use exact heights or comparisons (>=1080, >720, <=576, <480). The most specific one wins.

    -
    cdm:
    -  SOMESERVICE:
    -    ">=1080": sm_g935f_l1
    -    default: chromecdm_l3
    +
    cdm:
    +  SOMESERVICE:
    +    ">=1080": sm_g935f_l1
    +    default: chromecdm_l3
     

    Keys widevine and playready select a device per system. unshackle applies these automatically, using the widevine device for Widevine tracks and the playready device for PlayReady tracks.

    -
    cdm:
    -  SOMESERVICE:
    -    widevine: sm_g935f_l1
    -    playready: mydevice_sl3
    +
    cdm:
    +  SOMESERVICE:
    +    widevine: sm_g935f_l1
    +    playready: mydevice_sl3
     

    unshackle compares each config key against the active profile, with a default fallback.

    -
    cdm:
    -  SOMESERVICE:
    -    premium: sm_g935f_l1
    -    default: chromecdm_l3
    +
    cdm:
    +  SOMESERVICE:
    +    premium: sm_g935f_l1
    +    default: chromecdm_l3
     
    @@ -2903,17 +2912,17 @@ There are four kinds.

    Widevine remote CDM (pywidevine serve)

    With no type field and a non-PlayReady device type, unshackle treats the entry as a standard pywidevine "serve" endpoint:

    -
    unshackle.yaml
    remote_cdm:
    -  - name: my_wv_remote
    -    device_type: ANDROID
    -    system_id: 26830
    -    security_level: 3
    -    host: https://cdm.example.com
    -    secret: your-api-secret
    -    device_name: sm_g935f_l1
    -
    -cdm:
    -  default: my_wv_remote
    +
    unshackle.yaml
    remote_cdm:
    +  - name: my_wv_remote
    +    device_type: ANDROID
    +    system_id: 26830
    +    security_level: 3
    +    host: https://cdm.example.com
    +    secret: your-api-secret
    +    device_name: sm_g935f_l1
    +
    +cdm:
    +  default: my_wv_remote
     

    security_level defaults to 3000 if omitted. unshackle reads field names case-insensitively, so Device Type/device_type, System ID/system_id, and the @@ -2921,13 +2930,13 @@ other field names are all accepted.

    PlayReady remote CDM

    If the device type is PLAYREADY, unshackle routes the entry to the pyplayready remote CDM:

    -
    unshackle.yaml
    remote_cdm:
    -  - name: my_pr_remote
    -    device_type: PLAYREADY
    -    security_level: 3000
    -    host: https://cdm.example.com
    -    secret: your-api-secret
    -    device_name: mydevice_sl3
    +
    unshackle.yaml
    remote_cdm:
    +  - name: my_pr_remote
    +    device_type: PLAYREADY
    +    security_level: 3000
    +    host: https://cdm.example.com
    +    secret: your-api-secret
    +    device_name: mydevice_sl3
     

    The host must end in /playready

    @@ -2942,14 +2951,14 @@ is 404 responses from the server rather than an obvious configurati

    Decrypt Labs (hosted KeyXtractor API)

    Set type: decrypt_labs to use Decrypt Labs' hosted KeyXtractor service, which includes an intelligent key-caching layer:

    -
    unshackle.yaml
    remote_cdm:
    -  - name: decryptlabs
    -    type: decrypt_labs
    -    device_name: L1        # ChromeCDM, L1, L2, L3 (Widevine) or SL2, SL3 (PlayReady)
    -    # host: https://keyxtractor.decryptlabs.com   # optional, this is the default
    -    # secret: ...          # optional if decrypt_labs_api_key is set globally
    -
    -decrypt_labs_api_key: your-decrypt-labs-key
    +
    unshackle.yaml
    remote_cdm:
    +  - name: decryptlabs
    +    type: decrypt_labs
    +    device_name: L1        # ChromeCDM, L1, L2, L3 (Widevine) or SL2, SL3 (PlayReady)
    +    # host: https://keyxtractor.decryptlabs.com   # optional, this is the default
    +    # secret: ...          # optional if decrypt_labs_api_key is set globally
    +
    +decrypt_labs_api_key: your-decrypt-labs-key
     

    unshackle sends the API key as the decrypt-labs-api-key header. If you do not write secret on the entry, unshackle falls back to the global decrypt_labs_api_key value. @@ -2960,25 +2969,25 @@ security level 2000/3000 respectively. Widevine device

    Custom API (custom_api)

    For an arbitrary CDM HTTP API, type: custom_api provides a fully configurable client that adapts to almost any request/response shape through YAML alone. A minimal example:

    -
    unshackle.yaml
    remote_cdm:
    -  - name: my_custom
    -    type: custom_api
    -    device:
    -      name: ChromeCDM
    -      type: CHROME          # CHROME, ANDROID, or PLAYREADY
    -      system_id: 26830
    -      security_level: 3
    -    auth:
    -      type: bearer          # header, bearer, or basic
    -      key: your-token
    -    endpoints:
    -      get_request:
    -        path: /get-challenge
    -        method: POST
    -      decrypt_response:
    -        path: /get-keys
    -        method: POST
    -    timeout: 30
    +
    unshackle.yaml
    remote_cdm:
    +  - name: my_custom
    +    type: custom_api
    +    device:
    +      name: ChromeCDM
    +      type: CHROME          # CHROME, ANDROID, or PLAYREADY
    +      system_id: 26830
    +      security_level: 3
    +    auth:
    +      type: bearer          # header, bearer, or basic
    +      key: your-token
    +    endpoints:
    +      get_request:
    +        path: /get-challenge
    +        method: POST
    +      decrypt_response:
    +        path: /get-keys
    +        method: POST
    +    timeout: 30
     

    The custom_api type supports much more: request/response field remapping, transforms (base64/hex/JSON encoding, kid:key parsing), conditional parameters, @@ -3018,13 +3027,13 @@ globally, or a per-service mapping:

    -
    unshackle.yaml
    decryption: shaka
    +
    unshackle.yaml
    decryption: shaka
     
    -
    unshackle.yaml
    decryption:
    -  default: shaka
    -  SOMESERVICE: mp4decrypt
    +
    unshackle.yaml
    decryption:
    +  default: shaka
    +  SOMESERVICE: mp4decrypt
     
    @@ -3057,7 +3066,7 @@ logs one warning for the track, because the content key is possibly wrong.

    The CENC ClearKey scheme is a proper license flow, but the "license server" returns the keys as a JWK Set and not a DRM-wrapped blob. unshackle builds a W3C EME request of the form:

    -
    {"kids": ["<base64url-kid>", ...], "type": "temporary"}
    +
    {"kids": ["<base64url-kid>", ...], "type": "temporary"}
     

    It sends this to the manifest's license URL (or to whatever a service's ClearKey license hook returns) and reads the JSON Web Key set back. You do not need a device @@ -3090,7 +3099,7 @@ log and saves the encrypted file.

    per track: if a track needs a system that your loaded CDM cannot supply, it transparently switches to the appropriate device for that track using your cdm mapping. If it cannot find a matching device, it fails with a clear message such as:

    -
    Title needs a Widevine CDM but SOMESERVICE is configured with PlayReady.
    +
    Title needs a Widevine CDM but SOMESERVICE is configured with PlayReady.
     

    Use the cdm mapping's DRM-based selection to configure a device for each system. unshackle selects the right one per track @@ -3100,7 +3109,7 @@ automatically.

    Widevine and for PlayReady on each track that offers both. Use it with --skip-dl and --export to keep the content keys and the DRM init data of both systems. The two systems can list different sets of KIDs, and unshackle keeps the content keys of both.

    -
    unshackle dl --skip-dl --all-drm --export EXAMPLE 81234567
    +
    unshackle dl --skip-dl --all-drm --export EXAMPLE 81234567
     
    • The cdm mapping must name a device for each system. A single device name, or --cdm, @@ -3203,8 +3212,8 @@ control this trade-off on the dl command:

      -
      unshackle.yaml
      debug_keys: true
      -debug_requests: true
      +
      unshackle.yaml
      debug_keys: true
      +debug_requests: true
       

      Keys and paths in logs

      diff --git a/objects.inv b/objects.inv index 6c2ed215e..872e04068 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/reference/api/drm/index.html b/reference/api/drm/index.html index 8930cb5fd..9c6845f7a 100644 --- a/reference/api/drm/index.html +++ b/reference/api/drm/index.html @@ -2403,17 +2403,6 @@