diff --git a/pywidevine/cdm.py b/pywidevine/cdm.py index 45abd68..ba6cdf4 100644 --- a/pywidevine/cdm.py +++ b/pywidevine/cdm.py @@ -233,13 +233,13 @@ class Cdm: enc_key, mac_key_server, _ = self.derive_keys(*context, session_key) - license_signature = HMAC. \ + computed_signature = HMAC. \ new(mac_key_server, digestmod=SHA256). \ update(licence.SerializeToString()). \ digest() - if license_message.signature != license_signature: - raise ValueError("The License Signature doesn't match the Signature listed in the Message") + if license_message.signature != computed_signature: + raise ValueError("Signature Mismatch on License Message, rejecting license") return [ Key.from_key_container(key, enc_key)