pywidevine
pywidevine copied to clipboard
Add /load or /parse endpoint that returns the full License message
Is your feature request related to a problem? Please describe. Client code for pywidevine serve functionality currently has no way of getting information like required security level, or other misc information contained within licenses.
Describe the solution you'd like We should add a /load endpoint that parses a License Response SignedMessage and stores the parsed License message with the keys decrypted in the session.
From there /keys could load the parsed and decrypted License message from the session, and return the keys as JSON. Realistically we don't need /keys endpoint in this scenario as the code should handle the response from /load to get keys.
Describe alternatives you've considered One alternative to all this is if the client needs that information it could just parse the license message it sent to /keys itself, and then read that information as it isn't protected.
Additional context In a secure Cdm implementation, this misc information would be required. In fact, returning the keys in plain text at all, or even passing alone a decryption key would not be safe.