From 8b1c06840460da0d38b48e061e0183271797ec43 Mon Sep 17 00:00:00 2001 From: larley <121249322+DevLARLEY@users.noreply.github.com> Date: Wed, 20 Aug 2025 20:23:45 +0200 Subject: [PATCH] + Updated License Protocol + Removed 'partial parse' for VmpData and ClientId --- README.md | 40 +- pyproject.toml | 4 +- pywidevine/__init__.py | 2 +- pywidevine/device.py | 34 +- pywidevine/license_protocol.proto | 52 +- pywidevine/license_protocol_pb2.py | 58 +- pywidevine/license_protocol_pb2.pyi | 1068 +++++++++++++++------------ pywidevine/main.py | 14 +- 8 files changed, 689 insertions(+), 583 deletions(-) diff --git a/README.md b/README.md index 1efa2ae..2ba7def 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,7 @@ from pywidevine.pssh import PSSH import requests # prepare pssh -pssh = PSSH("AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa" - "7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==") +pssh = PSSH("AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==") # load device device = Device.load("C:/Path/To/A/Provision.wvd") @@ -93,42 +92,6 @@ cdm.close(session_id) 5. All efforts in this project have been the result of Reverse-Engineering, Publicly available research, and Trial & Error. -## Key and Output Security - -*Licenses, Content Keys, and Decrypted Data is not secure in this CDM implementation.* - -The Content Decryption Module is meant to do all downloading, decrypting, and decoding of content, not just license -acquisition. This Python implementation only does License Acquisition within the CDM. - -The section of which a 'Decrypt Frame' call is made would be more of a 'Decrypt File' in this implementation. Just -returning the original file in plain text defeats the point of the DRM. Even if 'Decrypt File' was somehow secure, the -Content Keys used to decrypt the files are already exposed to the caller anyway, allowing them to manually decrypt. - -An attack on a 'Decrypt Frame' system would be analogous to doing an HDMI capture or similar attack. This is because it -would require re-encoding the video by splicing each individual frame with the right frame-rate, syncing to audio, and -more. - -While a 'Decrypt Video' system would be analogous to downloading a Video and passing it through a script. Not much of -an attack if at all. The only protection against a system like this would be monitoring the provision and acquisitions -of licenses and prevent them. This can be done by revoking the device provision, or the user or their authorization to -the service. - -There isn't any immediate way to secure either Key or Decrypted information within a Python environment that is not -Hardware backed. Even if obfuscation or some other form of Security by Obscurity was used, this is a Software-based -Content Protection Module (in Python no less) with no hardware backed security. It would be incredibly trivial to break -any sort of protection against retrieving the original video data. - -Though, it's not impossible. Google's Chrome Browser CDM is a simple library extension file programmed in C++ that has -been improving its security using math and obscurity for years. It's getting harder and harder to break with its latest -versions only being beaten by Brute-force style methods. However, they have a huge team of very skilled workers, and -making a CDM in C++ has immediate security benefits and a lot of methods to obscure and obfuscate the code. - -## Contributors - - - - - ## Licensing This software is licensed under the terms of [GNU General Public License, Version 3.0](LICENSE). @@ -140,3 +103,4 @@ You can find a copy of the license in the LICENSE file in the root folder. * * * © rlaphoenix 2022-2023 +DevLARLEY 2025-2025 diff --git a/pyproject.toml b/pyproject.toml index 7698ed2..f11f844 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pywidevine" -version = "1.8.0" +version = "1.8.1" description = "Widevine CDM (Content Decryption Module) implementation in Python." license = "GPL-3.0-only" authors = ["rlaphoenix ", "DevLARLEY"] @@ -32,7 +32,7 @@ include = [ [tool.poetry.dependencies] python = ">=3.8" -protobuf = "^4.25.1" +protobuf = "^6.32.0" pymp4 = "^1.4.0" pycryptodome = "^3.19.0" click = "^8.1.7" diff --git a/pywidevine/__init__.py b/pywidevine/__init__.py index 659ea25..42a255f 100644 --- a/pywidevine/__init__.py +++ b/pywidevine/__init__.py @@ -5,4 +5,4 @@ from .pssh import * from .remotecdm import * from .session import * -__version__ = "1.8.0" +__version__ = "1.8.1" diff --git a/pywidevine/device.py b/pywidevine/device.py index afa438b..c62f5df 100644 --- a/pywidevine/device.py +++ b/pywidevine/device.py @@ -14,7 +14,7 @@ from construct import Padded, Padding, Struct, this from Crypto.PublicKey import RSA from google.protobuf.message import DecodeError -from pywidevine.license_protocol_pb2 import ClientIdentification, DrmCertificate, FileHashes, SignedDrmCertificate +from pywidevine.license_protocol_pb2 import ClientIdentification, DrmCertificate, VmpData, SignedDrmCertificate class DeviceTypes(Enum): @@ -107,21 +107,11 @@ class Device: self.flags = flags or {} self.private_key = RSA.importKey(private_key) self.client_id = ClientIdentification() - try: - self.client_id.ParseFromString(client_id) - if self.client_id.SerializeToString() != client_id: - raise DecodeError("partial parse") - except DecodeError as e: - raise DecodeError(f"Failed to parse client_id as a ClientIdentification, {e}") + self.client_id.ParseFromString(client_id) - self.vmp = FileHashes() + self.vmp = VmpData() if self.client_id.vmp_data: - try: - self.vmp.ParseFromString(self.client_id.vmp_data) - if self.vmp.SerializeToString() != self.client_id.vmp_data: - raise DecodeError("partial parse") - except DecodeError as e: - raise DecodeError(f"Failed to parse Client ID's VMP data as a FileHashes, {e}") + self.vmp.ParseFromString(self.client_id.vmp_data) signed_drm_certificate = SignedDrmCertificate() drm_certificate = DrmCertificate() @@ -202,23 +192,13 @@ class Device: v1_struct.version = 2 # update version to 2 to allow loading v1_struct.flags = Container() # blank flags that may have been used in v1 - vmp = FileHashes() + vmp = VmpData() if v1_struct.vmp: - try: - vmp.ParseFromString(v1_struct.vmp) - if vmp.SerializeToString() != v1_struct.vmp: - raise DecodeError("partial parse") - except DecodeError as e: - raise DecodeError(f"Failed to parse VMP data as FileHashes, {e}") + vmp.ParseFromString(v1_struct.vmp) v1_struct.vmp = vmp client_id = ClientIdentification() - try: - client_id.ParseFromString(v1_struct.client_id) - if client_id.SerializeToString() != v1_struct.client_id: - raise DecodeError("partial parse") - except DecodeError as e: - raise DecodeError(f"Failed to parse VMP data as FileHashes, {e}") + client_id.ParseFromString(v1_struct.client_id) new_vmp_data = v1_struct.vmp.SerializeToString() if client_id.vmp_data and client_id.vmp_data != new_vmp_data: diff --git a/pywidevine/license_protocol.proto b/pywidevine/license_protocol.proto index cd2fe4f..f417bf3 100644 --- a/pywidevine/license_protocol.proto +++ b/pywidevine/license_protocol.proto @@ -5,8 +5,6 @@ package pywidevine_license_protocol; // need this if we are using libprotobuf-cpp-2.3.0-lite option optimize_for = LITE_RUNTIME; -option java_package = "com.rlaphoenix.pywidevine.protos"; - enum LicenseType { STREAMING = 1; OFFLINE = 2; @@ -738,15 +736,45 @@ message WidevinePsshData { optional bytes grouped_license = 8 [deprecated = true]; } -// File Hashes for Verified Media Path (VMP) support. -message FileHashes { - message Signature { - optional string filename = 1; - optional bool test_signing = 2; //0 - release, 1 - testing - optional bytes SHA512Hash = 3; - optional bool main_exe = 4; //0 for dlls, 1 for exe, this is field 3 in file +// VmpData for Verified Media Path (VMP) support. +message VmpData { + message SignedBinaryInfo { + enum HashAlgorithmProto { + // Unspecified hash algorithm: SHA_256 shall be used for ECC based algorithms + // and SHA_1 shall be used otherwise. + HASH_ALGORITHM_UNSPECIFIED = 0; + HASH_ALGORITHM_SHA_1 = 1; + HASH_ALGORITHM_SHA_256 = 2; + HASH_ALGORITHM_SHA_384 = 3; + } + + // File name of the binary. Required. + optional string file_name = 1; + // Index into |certificates| for the code signing certificate used to sign + // this binary. Required if the binary is signed. + optional uint32 certificate_index = 2; + // SHA-512 digest of signed binary. Required if the file was present. + optional bytes binary_hash = 3; + // Flags from signature file, if any. Required if signed. + optional uint32 flags = 4; + // Signature of the binary. Required if signed. optional bytes signature = 5; + // Optional field that indicates the hash algorithm used in signature + // scheme. + optional HashAlgorithmProto hash_algorithm = 6; } - optional bytes signer = 1; - repeated Signature signatures = 2; -} + + // Distinct certificates used in binary code signing. No certificate should + // be present more than once. + repeated bytes certificates = 1; + // Info about each signed binary. + repeated SignedBinaryInfo signed_binary_info = 2; + + repeated SignedBinaryInfo cdm_host_files = 3; + repeated SignedBinaryInfo cdm_call_chain_files = 4; + optional SignedBinaryInfo current_process_file = 5; + + repeated uint32 host_file_indexes = 6; + repeated uint32 call_chain_file_indexes = 7; + repeated uint32 current_process_file_index = 8; +} \ No newline at end of file diff --git a/pywidevine/license_protocol_pb2.py b/pywidevine/license_protocol_pb2.py index 92ae262..92bc481 100644 --- a/pywidevine/license_protocol_pb2.py +++ b/pywidevine/license_protocol_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: license_protocol.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'license_protocol.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -14,34 +24,34 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16license_protocol.proto\x12\x1bpywidevine_license_protocol\"\xbd\x01\n\x15LicenseIdentification\x12\x12\n\nrequest_id\x18\x01 \x01(\x0c\x12\x12\n\nsession_id\x18\x02 \x01(\x0c\x12\x13\n\x0bpurchase_id\x18\x03 \x01(\x0c\x12\x36\n\x04type\x18\x04 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x0f\n\x07version\x18\x05 \x01(\x05\x12\x1e\n\x16provider_session_token\x18\x06 \x01(\x0c\"\xf1\x18\n\x07License\x12>\n\x02id\x18\x01 \x01(\x0b\x32\x32.pywidevine_license_protocol.LicenseIdentification\x12;\n\x06policy\x18\x02 \x01(\x0b\x32+.pywidevine_license_protocol.License.Policy\x12>\n\x03key\x18\x03 \x03(\x0b\x32\x31.pywidevine_license_protocol.License.KeyContainer\x12\x1a\n\x12license_start_time\x18\x04 \x01(\x03\x12*\n\x1bremote_attestation_verified\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x15provider_client_token\x18\x06 \x01(\x0c\x12\x19\n\x11protection_scheme\x18\x07 \x01(\r\x12\x17\n\x0fsrm_requirement\x18\x08 \x01(\x0c\x12\x12\n\nsrm_update\x18\t \x01(\x0c\x12w\n\x1cplatform_verification_status\x18\n \x01(\x0e\x32\x37.pywidevine_license_protocol.PlatformVerificationStatus:\x18PLATFORM_NO_VERIFICATION\x12\x11\n\tgroup_ids\x18\x0b \x03(\x0c\x1a\xae\x04\n\x06Policy\x12\x17\n\x08\x63\x61n_play\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x63\x61n_persist\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tcan_renew\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\"\n\x17rental_duration_seconds\x18\x04 \x01(\x03:\x01\x30\x12$\n\x19playback_duration_seconds\x18\x05 \x01(\x03:\x01\x30\x12#\n\x18license_duration_seconds\x18\x06 \x01(\x03:\x01\x30\x12,\n!renewal_recovery_duration_seconds\x18\x07 \x01(\x03:\x01\x30\x12\x1a\n\x12renewal_server_url\x18\x08 \x01(\t\x12 \n\x15renewal_delay_seconds\x18\t \x01(\x03:\x01\x30\x12)\n\x1erenewal_retry_interval_seconds\x18\n \x01(\x03:\x01\x30\x12\x1f\n\x10renew_with_usage\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\'\n\x18\x61lways_include_client_id\x18\x0c \x01(\x08:\x05\x66\x61lse\x12*\n\x1fplay_start_grace_period_seconds\x18\r \x01(\x03:\x01\x30\x12-\n\x1esoft_enforce_playback_duration\x18\x0e \x01(\x08:\x05\x66\x61lse\x12*\n\x1csoft_enforce_rental_duration\x18\x0f \x01(\x08:\x04true\x1a\xbc\x10\n\x0cKeyContainer\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\n\n\x02iv\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12G\n\x04type\x18\x04 \x01(\x0e\x32\x39.pywidevine_license_protocol.License.KeyContainer.KeyType\x12`\n\x05level\x18\x05 \x01(\x0e\x32?.pywidevine_license_protocol.License.KeyContainer.SecurityLevel:\x10SW_SECURE_CRYPTO\x12_\n\x13required_protection\x18\x06 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x12`\n\x14requested_protection\x18\x07 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x12Q\n\x0bkey_control\x18\x08 \x01(\x0b\x32<.pywidevine_license_protocol.License.KeyContainer.KeyControl\x12y\n operator_session_key_permissions\x18\t \x01(\x0b\x32O.pywidevine_license_protocol.License.KeyContainer.OperatorSessionKeyPermissions\x12q\n\x1cvideo_resolution_constraints\x18\n \x03(\x0b\x32K.pywidevine_license_protocol.License.KeyContainer.VideoResolutionConstraint\x12(\n\x19\x61nti_rollback_usage_table\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x13\n\x0btrack_label\x18\x0c \x01(\t\x1a\x33\n\nKeyControl\x12\x19\n\x11key_control_block\x18\x01 \x01(\x0c\x12\n\n\x02iv\x18\x02 \x01(\x0c\x1a\x9c\x05\n\x10OutputProtection\x12`\n\x04hdcp\x18\x01 \x01(\x0e\x32G.pywidevine_license_protocol.License.KeyContainer.OutputProtection.HDCP:\tHDCP_NONE\x12\x66\n\ncgms_flags\x18\x02 \x01(\x0e\x32G.pywidevine_license_protocol.License.KeyContainer.OutputProtection.CGMS:\tCGMS_NONE\x12y\n\rhdcp_srm_rule\x18\x03 \x01(\x0e\x32N.pywidevine_license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule:\x12HDCP_SRM_RULE_NONE\x12$\n\x15\x64isable_analog_output\x18\x04 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x64isable_digital_output\x18\x05 \x01(\x08:\x05\x66\x61lse\"y\n\x04HDCP\x12\r\n\tHDCP_NONE\x10\x00\x12\x0b\n\x07HDCP_V1\x10\x01\x12\x0b\n\x07HDCP_V2\x10\x02\x12\r\n\tHDCP_V2_1\x10\x03\x12\r\n\tHDCP_V2_2\x10\x04\x12\r\n\tHDCP_V2_3\x10\x05\x12\x1b\n\x16HDCP_NO_DIGITAL_OUTPUT\x10\xff\x01\"C\n\x04\x43GMS\x12\r\n\tCGMS_NONE\x10*\x12\r\n\tCOPY_FREE\x10\x00\x12\r\n\tCOPY_ONCE\x10\x02\x12\x0e\n\nCOPY_NEVER\x10\x03\"6\n\x0bHdcpSrmRule\x12\x16\n\x12HDCP_SRM_RULE_NONE\x10\x00\x12\x0f\n\x0b\x43URRENT_SRM\x10\x01\x1a\xba\x01\n\x19VideoResolutionConstraint\x12\x1d\n\x15min_resolution_pixels\x18\x01 \x01(\r\x12\x1d\n\x15max_resolution_pixels\x18\x02 \x01(\r\x12_\n\x13required_protection\x18\x03 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x1a\x9d\x01\n\x1dOperatorSessionKeyPermissions\x12\x1c\n\rallow_encrypt\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1c\n\rallow_decrypt\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\nallow_sign\x18\x03 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x61llow_signature_verify\x18\x04 \x01(\x08:\x05\x66\x61lse\"l\n\x07KeyType\x12\x0b\n\x07SIGNING\x10\x01\x12\x0b\n\x07\x43ONTENT\x10\x02\x12\x0f\n\x0bKEY_CONTROL\x10\x03\x12\x14\n\x10OPERATOR_SESSION\x10\x04\x12\x0f\n\x0b\x45NTITLEMENT\x10\x05\x12\x0f\n\x0bOEM_CONTENT\x10\x06\"z\n\rSecurityLevel\x12\x14\n\x10SW_SECURE_CRYPTO\x10\x01\x12\x14\n\x10SW_SECURE_DECODE\x10\x02\x12\x14\n\x10HW_SECURE_CRYPTO\x10\x03\x12\x14\n\x10HW_SECURE_DECODE\x10\x04\x12\x11\n\rHW_SECURE_ALL\x10\x05\"\xbd\r\n\x0eLicenseRequest\x12\x44\n\tclient_id\x18\x01 \x01(\x0b\x32\x31.pywidevine_license_protocol.ClientIdentification\x12U\n\ncontent_id\x18\x02 \x01(\x0b\x32\x41.pywidevine_license_protocol.LicenseRequest.ContentIdentification\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x37.pywidevine_license_protocol.LicenseRequest.RequestType\x12\x14\n\x0crequest_time\x18\x04 \x01(\x03\x12$\n\x1ckey_control_nonce_deprecated\x18\x05 \x01(\x0c\x12S\n\x10protocol_version\x18\x06 \x01(\x0e\x32,.pywidevine_license_protocol.ProtocolVersion:\x0bVERSION_2_0\x12\x19\n\x11key_control_nonce\x18\x07 \x01(\r\x12W\n\x13\x65ncrypted_client_id\x18\x08 \x01(\x0b\x32:.pywidevine_license_protocol.EncryptedClientIdentification\x1a\x8f\t\n\x15\x43ontentIdentification\x12p\n\x12widevine_pssh_data\x18\x01 \x01(\x0b\x32R.pywidevine_license_protocol.LicenseRequest.ContentIdentification.WidevinePsshDataH\x00\x12\x62\n\x0bwebm_key_id\x18\x02 \x01(\x0b\x32K.pywidevine_license_protocol.LicenseRequest.ContentIdentification.WebmKeyIdH\x00\x12m\n\x10\x65xisting_license\x18\x03 \x01(\x0b\x32Q.pywidevine_license_protocol.LicenseRequest.ContentIdentification.ExistingLicenseH\x00\x12_\n\tinit_data\x18\x04 \x01(\x0b\x32J.pywidevine_license_protocol.LicenseRequest.ContentIdentification.InitDataH\x00\x1ay\n\x10WidevinePsshData\x12\x11\n\tpssh_data\x18\x01 \x03(\x0c\x12>\n\x0clicense_type\x18\x02 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x03 \x01(\x0c\x1ao\n\tWebmKeyId\x12\x0e\n\x06header\x18\x01 \x01(\x0c\x12>\n\x0clicense_type\x18\x02 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x03 \x01(\x0c\x1a\xbe\x01\n\x0f\x45xistingLicense\x12\x46\n\nlicense_id\x18\x01 \x01(\x0b\x32\x32.pywidevine_license_protocol.LicenseIdentification\x12\x1d\n\x15seconds_since_started\x18\x02 \x01(\x03\x12!\n\x19seconds_since_last_played\x18\x03 \x01(\x03\x12!\n\x19session_usage_table_entry\x18\x04 \x01(\x0c\x1a\x8c\x02\n\x08InitData\x12u\n\x0einit_data_type\x18\x01 \x01(\x0e\x32W.pywidevine_license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType:\x04\x43\x45NC\x12\x11\n\tinit_data\x18\x02 \x01(\x0c\x12>\n\x0clicense_type\x18\x03 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x04 \x01(\x0c\"\"\n\x0cInitDataType\x12\x08\n\x04\x43\x45NC\x10\x01\x12\x08\n\x04WEBM\x10\x02\x42\x14\n\x12\x63ontent_id_variant\"0\n\x0bRequestType\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07RENEWAL\x10\x02\x12\x0b\n\x07RELEASE\x10\x03\"\xf3\x01\n\nMetricData\x12\x12\n\nstage_name\x18\x01 \x01(\t\x12\x46\n\x0bmetric_data\x18\x02 \x03(\x0b\x32\x31.pywidevine_license_protocol.MetricData.TypeValue\x1a_\n\tTypeValue\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.pywidevine_license_protocol.MetricData.MetricType\x12\x10\n\x05value\x18\x02 \x01(\x03:\x01\x30\"(\n\nMetricType\x12\x0b\n\x07LATENCY\x10\x01\x12\r\n\tTIMESTAMP\x10\x02\"K\n\x0bVersionInfo\x12\x1b\n\x13license_sdk_version\x18\x01 \x01(\t\x12\x1f\n\x17license_service_version\x18\x02 \x01(\t\"\xf6\x05\n\rSignedMessage\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.pywidevine_license_protocol.SignedMessage.MessageType\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\x13\n\x0bsession_key\x18\x04 \x01(\x0c\x12\x1a\n\x12remote_attestation\x18\x05 \x01(\x0c\x12<\n\x0bmetric_data\x18\x06 \x03(\x0b\x32\'.pywidevine_license_protocol.MetricData\x12\x46\n\x14service_version_info\x18\x07 \x01(\x0b\x32(.pywidevine_license_protocol.VersionInfo\x12\x64\n\x10session_key_type\x18\x08 \x01(\x0e\x32\x39.pywidevine_license_protocol.SignedMessage.SessionKeyType:\x0fWRAPPED_AES_KEY\x12\x1e\n\x16oemcrypto_core_message\x18\t \x01(\x0c\"\xec\x01\n\x0bMessageType\x12\x13\n\x0fLICENSE_REQUEST\x10\x01\x12\x0b\n\x07LICENSE\x10\x02\x12\x12\n\x0e\x45RROR_RESPONSE\x10\x03\x12\x1f\n\x1bSERVICE_CERTIFICATE_REQUEST\x10\x04\x12\x17\n\x13SERVICE_CERTIFICATE\x10\x05\x12\x0f\n\x0bSUB_LICENSE\x10\x06\x12\x17\n\x13\x43\x41S_LICENSE_REQUEST\x10\x07\x12\x0f\n\x0b\x43\x41S_LICENSE\x10\x08\x12\x1c\n\x18\x45XTERNAL_LICENSE_REQUEST\x10\t\x12\x14\n\x10\x45XTERNAL_LICENSE\x10\n\"S\n\x0eSessionKeyType\x12\r\n\tUNDEFINED\x10\x00\x12\x13\n\x0fWRAPPED_AES_KEY\x10\x01\x12\x1d\n\x19\x45PHERMERAL_ECC_PUBLIC_KEY\x10\x02\"\xc7\x0e\n\x14\x43lientIdentification\x12Q\n\x04type\x18\x01 \x01(\x0e\x32;.pywidevine_license_protocol.ClientIdentification.TokenType:\x06KEYBOX\x12\r\n\x05token\x18\x02 \x01(\x0c\x12P\n\x0b\x63lient_info\x18\x03 \x03(\x0b\x32;.pywidevine_license_protocol.ClientIdentification.NameValue\x12\x1d\n\x15provider_client_token\x18\x04 \x01(\x0c\x12\x17\n\x0flicense_counter\x18\x05 \x01(\r\x12\x61\n\x13\x63lient_capabilities\x18\x06 \x01(\x0b\x32\x44.pywidevine_license_protocol.ClientIdentification.ClientCapabilities\x12\x10\n\x08vmp_data\x18\x07 \x01(\x0c\x12_\n\x12\x64\x65vice_credentials\x18\x08 \x03(\x0b\x32\x43.pywidevine_license_protocol.ClientIdentification.ClientCredentials\x1a(\n\tNameValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a\xd6\x08\n\x12\x43lientCapabilities\x12\x1b\n\x0c\x63lient_token\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1c\n\rsession_token\x18\x02 \x01(\x08:\x05\x66\x61lse\x12+\n\x1cvideo_resolution_constraints\x18\x03 \x01(\x08:\x05\x66\x61lse\x12u\n\x10max_hdcp_version\x18\x04 \x01(\x0e\x32P.pywidevine_license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion:\tHDCP_NONE\x12\x1e\n\x16oem_crypto_api_version\x18\x05 \x01(\r\x12(\n\x19\x61nti_rollback_usage_table\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x13\n\x0bsrm_version\x18\x07 \x01(\r\x12\x1d\n\x0e\x63\x61n_update_srm\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\x7f\n\x1esupported_certificate_key_type\x18\t \x03(\x0e\x32W.pywidevine_license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType\x12\x98\x01\n\x1a\x61nalog_output_capabilities\x18\n \x01(\x0e\x32].pywidevine_license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities:\x15\x41NALOG_OUTPUT_UNKNOWN\x12(\n\x19\x63\x61n_disable_analog_output\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x14resource_rating_tier\x18\x0c \x01(\r:\x01\x30\"\x80\x01\n\x0bHdcpVersion\x12\r\n\tHDCP_NONE\x10\x00\x12\x0b\n\x07HDCP_V1\x10\x01\x12\x0b\n\x07HDCP_V2\x10\x02\x12\r\n\tHDCP_V2_1\x10\x03\x12\r\n\tHDCP_V2_2\x10\x04\x12\r\n\tHDCP_V2_3\x10\x05\x12\x1b\n\x16HDCP_NO_DIGITAL_OUTPUT\x10\xff\x01\"i\n\x12\x43\x65rtificateKeyType\x12\x0c\n\x08RSA_2048\x10\x00\x12\x0c\n\x08RSA_3072\x10\x01\x12\x11\n\rECC_SECP256R1\x10\x02\x12\x11\n\rECC_SECP384R1\x10\x03\x12\x11\n\rECC_SECP521R1\x10\x04\"\x8d\x01\n\x18\x41nalogOutputCapabilities\x12\x19\n\x15\x41NALOG_OUTPUT_UNKNOWN\x10\x00\x12\x16\n\x12\x41NALOG_OUTPUT_NONE\x10\x01\x12\x1b\n\x17\x41NALOG_OUTPUT_SUPPORTED\x10\x02\x12!\n\x1d\x41NALOG_OUTPUT_SUPPORTS_CGMS_A\x10\x03\x1au\n\x11\x43lientCredentials\x12Q\n\x04type\x18\x01 \x01(\x0e\x32;.pywidevine_license_protocol.ClientIdentification.TokenType:\x06KEYBOX\x12\r\n\x05token\x18\x02 \x01(\x0c\"s\n\tTokenType\x12\n\n\x06KEYBOX\x10\x00\x12\x1a\n\x16\x44RM_DEVICE_CERTIFICATE\x10\x01\x12\"\n\x1eREMOTE_ATTESTATION_CERTIFICATE\x10\x02\x12\x1a\n\x16OEM_DEVICE_CERTIFICATE\x10\x03\"\xbb\x01\n\x1d\x45ncryptedClientIdentification\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12)\n!service_certificate_serial_number\x18\x02 \x01(\x0c\x12\x1b\n\x13\x65ncrypted_client_id\x18\x03 \x01(\x0c\x12\x1e\n\x16\x65ncrypted_client_id_iv\x18\x04 \x01(\x0c\x12\x1d\n\x15\x65ncrypted_privacy_key\x18\x05 \x01(\x0c\"\xba\x07\n\x0e\x44rmCertificate\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.pywidevine_license_protocol.DrmCertificate.Type\x12\x15\n\rserial_number\x18\x02 \x01(\x0c\x12\x1d\n\x15\x63reation_time_seconds\x18\x03 \x01(\r\x12\x1f\n\x17\x65xpiration_time_seconds\x18\x0c \x01(\r\x12\x12\n\npublic_key\x18\x04 \x01(\x0c\x12\x11\n\tsystem_id\x18\x05 \x01(\r\x12\"\n\x16test_device_deprecated\x18\x06 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0bprovider_id\x18\x07 \x01(\t\x12N\n\rservice_types\x18\x08 \x03(\x0e\x32\x37.pywidevine_license_protocol.DrmCertificate.ServiceType\x12M\n\talgorithm\x18\t \x01(\x0e\x32\x35.pywidevine_license_protocol.DrmCertificate.Algorithm:\x03RSA\x12\x0e\n\x06rot_id\x18\n \x01(\x0c\x12Q\n\x0e\x65ncryption_key\x18\x0b \x01(\x0b\x32\x39.pywidevine_license_protocol.DrmCertificate.EncryptionKey\x1ar\n\rEncryptionKey\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12M\n\talgorithm\x18\x02 \x01(\x0e\x32\x35.pywidevine_license_protocol.DrmCertificate.Algorithm:\x03RSA\"L\n\x04Type\x12\x08\n\x04ROOT\x10\x00\x12\x10\n\x0c\x44\x45VICE_MODEL\x10\x01\x12\n\n\x06\x44\x45VICE\x10\x02\x12\x0b\n\x07SERVICE\x10\x03\x12\x0f\n\x0bPROVISIONER\x10\x04\"\x86\x01\n\x0bServiceType\x12\x18\n\x14UNKNOWN_SERVICE_TYPE\x10\x00\x12\x16\n\x12LICENSE_SERVER_SDK\x10\x01\x12\x1c\n\x18LICENSE_SERVER_PROXY_SDK\x10\x02\x12\x14\n\x10PROVISIONING_SDK\x10\x03\x12\x11\n\rCAS_PROXY_SDK\x10\x04\"d\n\tAlgorithm\x12\x15\n\x11UNKNOWN_ALGORITHM\x10\x00\x12\x07\n\x03RSA\x10\x01\x12\x11\n\rECC_SECP256R1\x10\x02\x12\x11\n\rECC_SECP384R1\x10\x03\x12\x11\n\rECC_SECP521R1\x10\x04\"\xce\x01\n\x14SignedDrmCertificate\x12\x17\n\x0f\x64rm_certificate\x18\x01 \x01(\x0c\x12\x11\n\tsignature\x18\x02 \x01(\x0c\x12\x41\n\x06signer\x18\x03 \x01(\x0b\x32\x31.pywidevine_license_protocol.SignedDrmCertificate\x12G\n\x0ehash_algorithm\x18\x04 \x01(\x0e\x32/.pywidevine_license_protocol.HashAlgorithmProto\"\xf6\x05\n\x10WidevinePsshData\x12\x0f\n\x07key_ids\x18\x02 \x03(\x0c\x12\x12\n\ncontent_id\x18\x04 \x01(\x0c\x12\x1b\n\x13\x63rypto_period_index\x18\x07 \x01(\r\x12\x19\n\x11protection_scheme\x18\t \x01(\r\x12\x1d\n\x15\x63rypto_period_seconds\x18\n \x01(\r\x12H\n\x04type\x18\x0b \x01(\x0e\x32\x32.pywidevine_license_protocol.WidevinePsshData.Type:\x06SINGLE\x12\x14\n\x0ckey_sequence\x18\x0c \x01(\r\x12\x11\n\tgroup_ids\x18\r \x03(\x0c\x12P\n\rentitled_keys\x18\x0e \x03(\x0b\x32\x39.pywidevine_license_protocol.WidevinePsshData.EntitledKey\x12\x15\n\rvideo_feature\x18\x0f \x01(\t\x12N\n\talgorithm\x18\x01 \x01(\x0e\x32\x37.pywidevine_license_protocol.WidevinePsshData.AlgorithmB\x02\x18\x01\x12\x14\n\x08provider\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\ntrack_type\x18\x05 \x01(\tB\x02\x18\x01\x12\x12\n\x06policy\x18\x06 \x01(\tB\x02\x18\x01\x12\x1b\n\x0fgrouped_license\x18\x08 \x01(\x0c\x42\x02\x18\x01\x1az\n\x0b\x45ntitledKey\x12\x1a\n\x12\x65ntitlement_key_id\x18\x01 \x01(\x0c\x12\x0e\n\x06key_id\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\n\n\x02iv\x18\x04 \x01(\x0c\x12&\n\x1a\x65ntitlement_key_size_bytes\x18\x05 \x01(\r:\x02\x33\x32\"5\n\x04Type\x12\n\n\x06SINGLE\x10\x00\x12\x0f\n\x0b\x45NTITLEMENT\x10\x01\x12\x10\n\x0c\x45NTITLED_KEY\x10\x02\"(\n\tAlgorithm\x12\x0f\n\x0bUNENCRYPTED\x10\x00\x12\n\n\x06\x41\x45SCTR\x10\x01\"\xd1\x01\n\nFileHashes\x12\x0e\n\x06signer\x18\x01 \x01(\x0c\x12\x45\n\nsignatures\x18\x02 \x03(\x0b\x32\x31.pywidevine_license_protocol.FileHashes.Signature\x1al\n\tSignature\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x14\n\x0ctest_signing\x18\x02 \x01(\x08\x12\x12\n\nSHA512Hash\x18\x03 \x01(\x0c\x12\x10\n\x08main_exe\x18\x04 \x01(\x08\x12\x11\n\tsignature\x18\x05 \x01(\x0c*8\n\x0bLicenseType\x12\r\n\tSTREAMING\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x12\r\n\tAUTOMATIC\x10\x03*\xd9\x01\n\x1aPlatformVerificationStatus\x12\x17\n\x13PLATFORM_UNVERIFIED\x10\x00\x12\x15\n\x11PLATFORM_TAMPERED\x10\x01\x12\x1e\n\x1aPLATFORM_SOFTWARE_VERIFIED\x10\x02\x12\x1e\n\x1aPLATFORM_HARDWARE_VERIFIED\x10\x03\x12\x1c\n\x18PLATFORM_NO_VERIFICATION\x10\x04\x12-\n)PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED\x10\x05*D\n\x0fProtocolVersion\x12\x0f\n\x0bVERSION_2_0\x10\x14\x12\x0f\n\x0bVERSION_2_1\x10\x15\x12\x0f\n\x0bVERSION_2_2\x10\x16*\x86\x01\n\x12HashAlgorithmProto\x12\x1e\n\x1aHASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x18\n\x14HASH_ALGORITHM_SHA_1\x10\x01\x12\x1a\n\x16HASH_ALGORITHM_SHA_256\x10\x02\x12\x1a\n\x16HASH_ALGORITHM_SHA_384\x10\x03\x42$\n com.rlaphoenix.pywidevine.protosH\x03') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16license_protocol.proto\x12\x1bpywidevine_license_protocol\"\xbd\x01\n\x15LicenseIdentification\x12\x12\n\nrequest_id\x18\x01 \x01(\x0c\x12\x12\n\nsession_id\x18\x02 \x01(\x0c\x12\x13\n\x0bpurchase_id\x18\x03 \x01(\x0c\x12\x36\n\x04type\x18\x04 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x0f\n\x07version\x18\x05 \x01(\x05\x12\x1e\n\x16provider_session_token\x18\x06 \x01(\x0c\"\xf1\x18\n\x07License\x12>\n\x02id\x18\x01 \x01(\x0b\x32\x32.pywidevine_license_protocol.LicenseIdentification\x12;\n\x06policy\x18\x02 \x01(\x0b\x32+.pywidevine_license_protocol.License.Policy\x12>\n\x03key\x18\x03 \x03(\x0b\x32\x31.pywidevine_license_protocol.License.KeyContainer\x12\x1a\n\x12license_start_time\x18\x04 \x01(\x03\x12*\n\x1bremote_attestation_verified\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x15provider_client_token\x18\x06 \x01(\x0c\x12\x19\n\x11protection_scheme\x18\x07 \x01(\r\x12\x17\n\x0fsrm_requirement\x18\x08 \x01(\x0c\x12\x12\n\nsrm_update\x18\t \x01(\x0c\x12w\n\x1cplatform_verification_status\x18\n \x01(\x0e\x32\x37.pywidevine_license_protocol.PlatformVerificationStatus:\x18PLATFORM_NO_VERIFICATION\x12\x11\n\tgroup_ids\x18\x0b \x03(\x0c\x1a\xae\x04\n\x06Policy\x12\x17\n\x08\x63\x61n_play\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x63\x61n_persist\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tcan_renew\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\"\n\x17rental_duration_seconds\x18\x04 \x01(\x03:\x01\x30\x12$\n\x19playback_duration_seconds\x18\x05 \x01(\x03:\x01\x30\x12#\n\x18license_duration_seconds\x18\x06 \x01(\x03:\x01\x30\x12,\n!renewal_recovery_duration_seconds\x18\x07 \x01(\x03:\x01\x30\x12\x1a\n\x12renewal_server_url\x18\x08 \x01(\t\x12 \n\x15renewal_delay_seconds\x18\t \x01(\x03:\x01\x30\x12)\n\x1erenewal_retry_interval_seconds\x18\n \x01(\x03:\x01\x30\x12\x1f\n\x10renew_with_usage\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\'\n\x18\x61lways_include_client_id\x18\x0c \x01(\x08:\x05\x66\x61lse\x12*\n\x1fplay_start_grace_period_seconds\x18\r \x01(\x03:\x01\x30\x12-\n\x1esoft_enforce_playback_duration\x18\x0e \x01(\x08:\x05\x66\x61lse\x12*\n\x1csoft_enforce_rental_duration\x18\x0f \x01(\x08:\x04true\x1a\xbc\x10\n\x0cKeyContainer\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\n\n\x02iv\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12G\n\x04type\x18\x04 \x01(\x0e\x32\x39.pywidevine_license_protocol.License.KeyContainer.KeyType\x12`\n\x05level\x18\x05 \x01(\x0e\x32?.pywidevine_license_protocol.License.KeyContainer.SecurityLevel:\x10SW_SECURE_CRYPTO\x12_\n\x13required_protection\x18\x06 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x12`\n\x14requested_protection\x18\x07 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x12Q\n\x0bkey_control\x18\x08 \x01(\x0b\x32<.pywidevine_license_protocol.License.KeyContainer.KeyControl\x12y\n operator_session_key_permissions\x18\t \x01(\x0b\x32O.pywidevine_license_protocol.License.KeyContainer.OperatorSessionKeyPermissions\x12q\n\x1cvideo_resolution_constraints\x18\n \x03(\x0b\x32K.pywidevine_license_protocol.License.KeyContainer.VideoResolutionConstraint\x12(\n\x19\x61nti_rollback_usage_table\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x13\n\x0btrack_label\x18\x0c \x01(\t\x1a\x33\n\nKeyControl\x12\x19\n\x11key_control_block\x18\x01 \x01(\x0c\x12\n\n\x02iv\x18\x02 \x01(\x0c\x1a\x9c\x05\n\x10OutputProtection\x12`\n\x04hdcp\x18\x01 \x01(\x0e\x32G.pywidevine_license_protocol.License.KeyContainer.OutputProtection.HDCP:\tHDCP_NONE\x12\x66\n\ncgms_flags\x18\x02 \x01(\x0e\x32G.pywidevine_license_protocol.License.KeyContainer.OutputProtection.CGMS:\tCGMS_NONE\x12y\n\rhdcp_srm_rule\x18\x03 \x01(\x0e\x32N.pywidevine_license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule:\x12HDCP_SRM_RULE_NONE\x12$\n\x15\x64isable_analog_output\x18\x04 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x64isable_digital_output\x18\x05 \x01(\x08:\x05\x66\x61lse\"y\n\x04HDCP\x12\r\n\tHDCP_NONE\x10\x00\x12\x0b\n\x07HDCP_V1\x10\x01\x12\x0b\n\x07HDCP_V2\x10\x02\x12\r\n\tHDCP_V2_1\x10\x03\x12\r\n\tHDCP_V2_2\x10\x04\x12\r\n\tHDCP_V2_3\x10\x05\x12\x1b\n\x16HDCP_NO_DIGITAL_OUTPUT\x10\xff\x01\"C\n\x04\x43GMS\x12\r\n\tCGMS_NONE\x10*\x12\r\n\tCOPY_FREE\x10\x00\x12\r\n\tCOPY_ONCE\x10\x02\x12\x0e\n\nCOPY_NEVER\x10\x03\"6\n\x0bHdcpSrmRule\x12\x16\n\x12HDCP_SRM_RULE_NONE\x10\x00\x12\x0f\n\x0b\x43URRENT_SRM\x10\x01\x1a\xba\x01\n\x19VideoResolutionConstraint\x12\x1d\n\x15min_resolution_pixels\x18\x01 \x01(\r\x12\x1d\n\x15max_resolution_pixels\x18\x02 \x01(\r\x12_\n\x13required_protection\x18\x03 \x01(\x0b\x32\x42.pywidevine_license_protocol.License.KeyContainer.OutputProtection\x1a\x9d\x01\n\x1dOperatorSessionKeyPermissions\x12\x1c\n\rallow_encrypt\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1c\n\rallow_decrypt\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\nallow_sign\x18\x03 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x61llow_signature_verify\x18\x04 \x01(\x08:\x05\x66\x61lse\"l\n\x07KeyType\x12\x0b\n\x07SIGNING\x10\x01\x12\x0b\n\x07\x43ONTENT\x10\x02\x12\x0f\n\x0bKEY_CONTROL\x10\x03\x12\x14\n\x10OPERATOR_SESSION\x10\x04\x12\x0f\n\x0b\x45NTITLEMENT\x10\x05\x12\x0f\n\x0bOEM_CONTENT\x10\x06\"z\n\rSecurityLevel\x12\x14\n\x10SW_SECURE_CRYPTO\x10\x01\x12\x14\n\x10SW_SECURE_DECODE\x10\x02\x12\x14\n\x10HW_SECURE_CRYPTO\x10\x03\x12\x14\n\x10HW_SECURE_DECODE\x10\x04\x12\x11\n\rHW_SECURE_ALL\x10\x05\"\xbd\r\n\x0eLicenseRequest\x12\x44\n\tclient_id\x18\x01 \x01(\x0b\x32\x31.pywidevine_license_protocol.ClientIdentification\x12U\n\ncontent_id\x18\x02 \x01(\x0b\x32\x41.pywidevine_license_protocol.LicenseRequest.ContentIdentification\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x37.pywidevine_license_protocol.LicenseRequest.RequestType\x12\x14\n\x0crequest_time\x18\x04 \x01(\x03\x12$\n\x1ckey_control_nonce_deprecated\x18\x05 \x01(\x0c\x12S\n\x10protocol_version\x18\x06 \x01(\x0e\x32,.pywidevine_license_protocol.ProtocolVersion:\x0bVERSION_2_0\x12\x19\n\x11key_control_nonce\x18\x07 \x01(\r\x12W\n\x13\x65ncrypted_client_id\x18\x08 \x01(\x0b\x32:.pywidevine_license_protocol.EncryptedClientIdentification\x1a\x8f\t\n\x15\x43ontentIdentification\x12p\n\x12widevine_pssh_data\x18\x01 \x01(\x0b\x32R.pywidevine_license_protocol.LicenseRequest.ContentIdentification.WidevinePsshDataH\x00\x12\x62\n\x0bwebm_key_id\x18\x02 \x01(\x0b\x32K.pywidevine_license_protocol.LicenseRequest.ContentIdentification.WebmKeyIdH\x00\x12m\n\x10\x65xisting_license\x18\x03 \x01(\x0b\x32Q.pywidevine_license_protocol.LicenseRequest.ContentIdentification.ExistingLicenseH\x00\x12_\n\tinit_data\x18\x04 \x01(\x0b\x32J.pywidevine_license_protocol.LicenseRequest.ContentIdentification.InitDataH\x00\x1ay\n\x10WidevinePsshData\x12\x11\n\tpssh_data\x18\x01 \x03(\x0c\x12>\n\x0clicense_type\x18\x02 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x03 \x01(\x0c\x1ao\n\tWebmKeyId\x12\x0e\n\x06header\x18\x01 \x01(\x0c\x12>\n\x0clicense_type\x18\x02 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x03 \x01(\x0c\x1a\xbe\x01\n\x0f\x45xistingLicense\x12\x46\n\nlicense_id\x18\x01 \x01(\x0b\x32\x32.pywidevine_license_protocol.LicenseIdentification\x12\x1d\n\x15seconds_since_started\x18\x02 \x01(\x03\x12!\n\x19seconds_since_last_played\x18\x03 \x01(\x03\x12!\n\x19session_usage_table_entry\x18\x04 \x01(\x0c\x1a\x8c\x02\n\x08InitData\x12u\n\x0einit_data_type\x18\x01 \x01(\x0e\x32W.pywidevine_license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType:\x04\x43\x45NC\x12\x11\n\tinit_data\x18\x02 \x01(\x0c\x12>\n\x0clicense_type\x18\x03 \x01(\x0e\x32(.pywidevine_license_protocol.LicenseType\x12\x12\n\nrequest_id\x18\x04 \x01(\x0c\"\"\n\x0cInitDataType\x12\x08\n\x04\x43\x45NC\x10\x01\x12\x08\n\x04WEBM\x10\x02\x42\x14\n\x12\x63ontent_id_variant\"0\n\x0bRequestType\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07RENEWAL\x10\x02\x12\x0b\n\x07RELEASE\x10\x03\"\xf3\x01\n\nMetricData\x12\x12\n\nstage_name\x18\x01 \x01(\t\x12\x46\n\x0bmetric_data\x18\x02 \x03(\x0b\x32\x31.pywidevine_license_protocol.MetricData.TypeValue\x1a_\n\tTypeValue\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.pywidevine_license_protocol.MetricData.MetricType\x12\x10\n\x05value\x18\x02 \x01(\x03:\x01\x30\"(\n\nMetricType\x12\x0b\n\x07LATENCY\x10\x01\x12\r\n\tTIMESTAMP\x10\x02\"K\n\x0bVersionInfo\x12\x1b\n\x13license_sdk_version\x18\x01 \x01(\t\x12\x1f\n\x17license_service_version\x18\x02 \x01(\t\"\xf6\x05\n\rSignedMessage\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.pywidevine_license_protocol.SignedMessage.MessageType\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\x13\n\x0bsession_key\x18\x04 \x01(\x0c\x12\x1a\n\x12remote_attestation\x18\x05 \x01(\x0c\x12<\n\x0bmetric_data\x18\x06 \x03(\x0b\x32\'.pywidevine_license_protocol.MetricData\x12\x46\n\x14service_version_info\x18\x07 \x01(\x0b\x32(.pywidevine_license_protocol.VersionInfo\x12\x64\n\x10session_key_type\x18\x08 \x01(\x0e\x32\x39.pywidevine_license_protocol.SignedMessage.SessionKeyType:\x0fWRAPPED_AES_KEY\x12\x1e\n\x16oemcrypto_core_message\x18\t \x01(\x0c\"\xec\x01\n\x0bMessageType\x12\x13\n\x0fLICENSE_REQUEST\x10\x01\x12\x0b\n\x07LICENSE\x10\x02\x12\x12\n\x0e\x45RROR_RESPONSE\x10\x03\x12\x1f\n\x1bSERVICE_CERTIFICATE_REQUEST\x10\x04\x12\x17\n\x13SERVICE_CERTIFICATE\x10\x05\x12\x0f\n\x0bSUB_LICENSE\x10\x06\x12\x17\n\x13\x43\x41S_LICENSE_REQUEST\x10\x07\x12\x0f\n\x0b\x43\x41S_LICENSE\x10\x08\x12\x1c\n\x18\x45XTERNAL_LICENSE_REQUEST\x10\t\x12\x14\n\x10\x45XTERNAL_LICENSE\x10\n\"S\n\x0eSessionKeyType\x12\r\n\tUNDEFINED\x10\x00\x12\x13\n\x0fWRAPPED_AES_KEY\x10\x01\x12\x1d\n\x19\x45PHERMERAL_ECC_PUBLIC_KEY\x10\x02\"\xc7\x0e\n\x14\x43lientIdentification\x12Q\n\x04type\x18\x01 \x01(\x0e\x32;.pywidevine_license_protocol.ClientIdentification.TokenType:\x06KEYBOX\x12\r\n\x05token\x18\x02 \x01(\x0c\x12P\n\x0b\x63lient_info\x18\x03 \x03(\x0b\x32;.pywidevine_license_protocol.ClientIdentification.NameValue\x12\x1d\n\x15provider_client_token\x18\x04 \x01(\x0c\x12\x17\n\x0flicense_counter\x18\x05 \x01(\r\x12\x61\n\x13\x63lient_capabilities\x18\x06 \x01(\x0b\x32\x44.pywidevine_license_protocol.ClientIdentification.ClientCapabilities\x12\x10\n\x08vmp_data\x18\x07 \x01(\x0c\x12_\n\x12\x64\x65vice_credentials\x18\x08 \x03(\x0b\x32\x43.pywidevine_license_protocol.ClientIdentification.ClientCredentials\x1a(\n\tNameValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a\xd6\x08\n\x12\x43lientCapabilities\x12\x1b\n\x0c\x63lient_token\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1c\n\rsession_token\x18\x02 \x01(\x08:\x05\x66\x61lse\x12+\n\x1cvideo_resolution_constraints\x18\x03 \x01(\x08:\x05\x66\x61lse\x12u\n\x10max_hdcp_version\x18\x04 \x01(\x0e\x32P.pywidevine_license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion:\tHDCP_NONE\x12\x1e\n\x16oem_crypto_api_version\x18\x05 \x01(\r\x12(\n\x19\x61nti_rollback_usage_table\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x13\n\x0bsrm_version\x18\x07 \x01(\r\x12\x1d\n\x0e\x63\x61n_update_srm\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\x7f\n\x1esupported_certificate_key_type\x18\t \x03(\x0e\x32W.pywidevine_license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType\x12\x98\x01\n\x1a\x61nalog_output_capabilities\x18\n \x01(\x0e\x32].pywidevine_license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities:\x15\x41NALOG_OUTPUT_UNKNOWN\x12(\n\x19\x63\x61n_disable_analog_output\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x14resource_rating_tier\x18\x0c \x01(\r:\x01\x30\"\x80\x01\n\x0bHdcpVersion\x12\r\n\tHDCP_NONE\x10\x00\x12\x0b\n\x07HDCP_V1\x10\x01\x12\x0b\n\x07HDCP_V2\x10\x02\x12\r\n\tHDCP_V2_1\x10\x03\x12\r\n\tHDCP_V2_2\x10\x04\x12\r\n\tHDCP_V2_3\x10\x05\x12\x1b\n\x16HDCP_NO_DIGITAL_OUTPUT\x10\xff\x01\"i\n\x12\x43\x65rtificateKeyType\x12\x0c\n\x08RSA_2048\x10\x00\x12\x0c\n\x08RSA_3072\x10\x01\x12\x11\n\rECC_SECP256R1\x10\x02\x12\x11\n\rECC_SECP384R1\x10\x03\x12\x11\n\rECC_SECP521R1\x10\x04\"\x8d\x01\n\x18\x41nalogOutputCapabilities\x12\x19\n\x15\x41NALOG_OUTPUT_UNKNOWN\x10\x00\x12\x16\n\x12\x41NALOG_OUTPUT_NONE\x10\x01\x12\x1b\n\x17\x41NALOG_OUTPUT_SUPPORTED\x10\x02\x12!\n\x1d\x41NALOG_OUTPUT_SUPPORTS_CGMS_A\x10\x03\x1au\n\x11\x43lientCredentials\x12Q\n\x04type\x18\x01 \x01(\x0e\x32;.pywidevine_license_protocol.ClientIdentification.TokenType:\x06KEYBOX\x12\r\n\x05token\x18\x02 \x01(\x0c\"s\n\tTokenType\x12\n\n\x06KEYBOX\x10\x00\x12\x1a\n\x16\x44RM_DEVICE_CERTIFICATE\x10\x01\x12\"\n\x1eREMOTE_ATTESTATION_CERTIFICATE\x10\x02\x12\x1a\n\x16OEM_DEVICE_CERTIFICATE\x10\x03\"\xbb\x01\n\x1d\x45ncryptedClientIdentification\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12)\n!service_certificate_serial_number\x18\x02 \x01(\x0c\x12\x1b\n\x13\x65ncrypted_client_id\x18\x03 \x01(\x0c\x12\x1e\n\x16\x65ncrypted_client_id_iv\x18\x04 \x01(\x0c\x12\x1d\n\x15\x65ncrypted_privacy_key\x18\x05 \x01(\x0c\"\xba\x07\n\x0e\x44rmCertificate\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.pywidevine_license_protocol.DrmCertificate.Type\x12\x15\n\rserial_number\x18\x02 \x01(\x0c\x12\x1d\n\x15\x63reation_time_seconds\x18\x03 \x01(\r\x12\x1f\n\x17\x65xpiration_time_seconds\x18\x0c \x01(\r\x12\x12\n\npublic_key\x18\x04 \x01(\x0c\x12\x11\n\tsystem_id\x18\x05 \x01(\r\x12\"\n\x16test_device_deprecated\x18\x06 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0bprovider_id\x18\x07 \x01(\t\x12N\n\rservice_types\x18\x08 \x03(\x0e\x32\x37.pywidevine_license_protocol.DrmCertificate.ServiceType\x12M\n\talgorithm\x18\t \x01(\x0e\x32\x35.pywidevine_license_protocol.DrmCertificate.Algorithm:\x03RSA\x12\x0e\n\x06rot_id\x18\n \x01(\x0c\x12Q\n\x0e\x65ncryption_key\x18\x0b \x01(\x0b\x32\x39.pywidevine_license_protocol.DrmCertificate.EncryptionKey\x1ar\n\rEncryptionKey\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12M\n\talgorithm\x18\x02 \x01(\x0e\x32\x35.pywidevine_license_protocol.DrmCertificate.Algorithm:\x03RSA\"L\n\x04Type\x12\x08\n\x04ROOT\x10\x00\x12\x10\n\x0c\x44\x45VICE_MODEL\x10\x01\x12\n\n\x06\x44\x45VICE\x10\x02\x12\x0b\n\x07SERVICE\x10\x03\x12\x0f\n\x0bPROVISIONER\x10\x04\"\x86\x01\n\x0bServiceType\x12\x18\n\x14UNKNOWN_SERVICE_TYPE\x10\x00\x12\x16\n\x12LICENSE_SERVER_SDK\x10\x01\x12\x1c\n\x18LICENSE_SERVER_PROXY_SDK\x10\x02\x12\x14\n\x10PROVISIONING_SDK\x10\x03\x12\x11\n\rCAS_PROXY_SDK\x10\x04\"d\n\tAlgorithm\x12\x15\n\x11UNKNOWN_ALGORITHM\x10\x00\x12\x07\n\x03RSA\x10\x01\x12\x11\n\rECC_SECP256R1\x10\x02\x12\x11\n\rECC_SECP384R1\x10\x03\x12\x11\n\rECC_SECP521R1\x10\x04\"\xce\x01\n\x14SignedDrmCertificate\x12\x17\n\x0f\x64rm_certificate\x18\x01 \x01(\x0c\x12\x11\n\tsignature\x18\x02 \x01(\x0c\x12\x41\n\x06signer\x18\x03 \x01(\x0b\x32\x31.pywidevine_license_protocol.SignedDrmCertificate\x12G\n\x0ehash_algorithm\x18\x04 \x01(\x0e\x32/.pywidevine_license_protocol.HashAlgorithmProto\"\xf6\x05\n\x10WidevinePsshData\x12\x0f\n\x07key_ids\x18\x02 \x03(\x0c\x12\x12\n\ncontent_id\x18\x04 \x01(\x0c\x12\x1b\n\x13\x63rypto_period_index\x18\x07 \x01(\r\x12\x19\n\x11protection_scheme\x18\t \x01(\r\x12\x1d\n\x15\x63rypto_period_seconds\x18\n \x01(\r\x12H\n\x04type\x18\x0b \x01(\x0e\x32\x32.pywidevine_license_protocol.WidevinePsshData.Type:\x06SINGLE\x12\x14\n\x0ckey_sequence\x18\x0c \x01(\r\x12\x11\n\tgroup_ids\x18\r \x03(\x0c\x12P\n\rentitled_keys\x18\x0e \x03(\x0b\x32\x39.pywidevine_license_protocol.WidevinePsshData.EntitledKey\x12\x15\n\rvideo_feature\x18\x0f \x01(\t\x12N\n\talgorithm\x18\x01 \x01(\x0e\x32\x37.pywidevine_license_protocol.WidevinePsshData.AlgorithmB\x02\x18\x01\x12\x14\n\x08provider\x18\x03 \x01(\tB\x02\x18\x01\x12\x16\n\ntrack_type\x18\x05 \x01(\tB\x02\x18\x01\x12\x12\n\x06policy\x18\x06 \x01(\tB\x02\x18\x01\x12\x1b\n\x0fgrouped_license\x18\x08 \x01(\x0c\x42\x02\x18\x01\x1az\n\x0b\x45ntitledKey\x12\x1a\n\x12\x65ntitlement_key_id\x18\x01 \x01(\x0c\x12\x0e\n\x06key_id\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\n\n\x02iv\x18\x04 \x01(\x0c\x12&\n\x1a\x65ntitlement_key_size_bytes\x18\x05 \x01(\r:\x02\x33\x32\"5\n\x04Type\x12\n\n\x06SINGLE\x10\x00\x12\x0f\n\x0b\x45NTITLEMENT\x10\x01\x12\x10\n\x0c\x45NTITLED_KEY\x10\x02\"(\n\tAlgorithm\x12\x0f\n\x0bUNENCRYPTED\x10\x00\x12\n\n\x06\x41\x45SCTR\x10\x01\"\xb0\x06\n\x07VmpData\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0c\x12Q\n\x12signed_binary_info\x18\x02 \x03(\x0b\x32\x35.pywidevine_license_protocol.VmpData.SignedBinaryInfo\x12M\n\x0e\x63\x64m_host_files\x18\x03 \x03(\x0b\x32\x35.pywidevine_license_protocol.VmpData.SignedBinaryInfo\x12S\n\x14\x63\x64m_call_chain_files\x18\x04 \x03(\x0b\x32\x35.pywidevine_license_protocol.VmpData.SignedBinaryInfo\x12S\n\x14\x63urrent_process_file\x18\x05 \x01(\x0b\x32\x35.pywidevine_license_protocol.VmpData.SignedBinaryInfo\x12\x19\n\x11host_file_indexes\x18\x06 \x03(\r\x12\x1f\n\x17\x63\x61ll_chain_file_indexes\x18\x07 \x03(\r\x12\"\n\x1a\x63urrent_process_file_index\x18\x08 \x03(\r\x1a\xe2\x02\n\x10SignedBinaryInfo\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\x19\n\x11\x63\x65rtificate_index\x18\x02 \x01(\r\x12\x13\n\x0b\x62inary_hash\x18\x03 \x01(\x0c\x12\r\n\x05\x66lags\x18\x04 \x01(\r\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12`\n\x0ehash_algorithm\x18\x06 \x01(\x0e\x32H.pywidevine_license_protocol.VmpData.SignedBinaryInfo.HashAlgorithmProto\"\x86\x01\n\x12HashAlgorithmProto\x12\x1e\n\x1aHASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x18\n\x14HASH_ALGORITHM_SHA_1\x10\x01\x12\x1a\n\x16HASH_ALGORITHM_SHA_256\x10\x02\x12\x1a\n\x16HASH_ALGORITHM_SHA_384\x10\x03*8\n\x0bLicenseType\x12\r\n\tSTREAMING\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x12\r\n\tAUTOMATIC\x10\x03*\xd9\x01\n\x1aPlatformVerificationStatus\x12\x17\n\x13PLATFORM_UNVERIFIED\x10\x00\x12\x15\n\x11PLATFORM_TAMPERED\x10\x01\x12\x1e\n\x1aPLATFORM_SOFTWARE_VERIFIED\x10\x02\x12\x1e\n\x1aPLATFORM_HARDWARE_VERIFIED\x10\x03\x12\x1c\n\x18PLATFORM_NO_VERIFICATION\x10\x04\x12-\n)PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED\x10\x05*D\n\x0fProtocolVersion\x12\x0f\n\x0bVERSION_2_0\x10\x14\x12\x0f\n\x0bVERSION_2_1\x10\x15\x12\x0f\n\x0bVERSION_2_2\x10\x16*\x86\x01\n\x12HashAlgorithmProto\x12\x1e\n\x1aHASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x18\n\x14HASH_ALGORITHM_SHA_1\x10\x01\x12\x1a\n\x16HASH_ALGORITHM_SHA_256\x10\x02\x12\x1a\n\x16HASH_ALGORITHM_SHA_384\x10\x03\x42\x02H\x03') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'license_protocol_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n com.rlaphoenix.pywidevine.protosH\003' - _globals['_DRMCERTIFICATE'].fields_by_name['test_device_deprecated']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'H\003' + _globals['_DRMCERTIFICATE'].fields_by_name['test_device_deprecated']._loaded_options = None _globals['_DRMCERTIFICATE'].fields_by_name['test_device_deprecated']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['algorithm']._options = None + _globals['_WIDEVINEPSSHDATA'].fields_by_name['algorithm']._loaded_options = None _globals['_WIDEVINEPSSHDATA'].fields_by_name['algorithm']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['provider']._options = None + _globals['_WIDEVINEPSSHDATA'].fields_by_name['provider']._loaded_options = None _globals['_WIDEVINEPSSHDATA'].fields_by_name['provider']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['track_type']._options = None + _globals['_WIDEVINEPSSHDATA'].fields_by_name['track_type']._loaded_options = None _globals['_WIDEVINEPSSHDATA'].fields_by_name['track_type']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['policy']._options = None + _globals['_WIDEVINEPSSHDATA'].fields_by_name['policy']._loaded_options = None _globals['_WIDEVINEPSSHDATA'].fields_by_name['policy']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['grouped_license']._options = None + _globals['_WIDEVINEPSSHDATA'].fields_by_name['grouped_license']._loaded_options = None _globals['_WIDEVINEPSSHDATA'].fields_by_name['grouped_license']._serialized_options = b'\030\001' - _globals['_LICENSETYPE']._serialized_start=10442 - _globals['_LICENSETYPE']._serialized_end=10498 - _globals['_PLATFORMVERIFICATIONSTATUS']._serialized_start=10501 - _globals['_PLATFORMVERIFICATIONSTATUS']._serialized_end=10718 - _globals['_PROTOCOLVERSION']._serialized_start=10720 - _globals['_PROTOCOLVERSION']._serialized_end=10788 - _globals['_HASHALGORITHMPROTO']._serialized_start=10791 - _globals['_HASHALGORITHMPROTO']._serialized_end=10925 + _globals['_LICENSETYPE']._serialized_start=11049 + _globals['_LICENSETYPE']._serialized_end=11105 + _globals['_PLATFORMVERIFICATIONSTATUS']._serialized_start=11108 + _globals['_PLATFORMVERIFICATIONSTATUS']._serialized_end=11325 + _globals['_PROTOCOLVERSION']._serialized_start=11327 + _globals['_PROTOCOLVERSION']._serialized_end=11395 + _globals['_HASHALGORITHMPROTO']._serialized_start=10913 + _globals['_HASHALGORITHMPROTO']._serialized_end=11047 _globals['_LICENSEIDENTIFICATION']._serialized_start=56 _globals['_LICENSEIDENTIFICATION']._serialized_end=245 _globals['_LICENSE']._serialized_start=248 @@ -136,8 +146,10 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['_WIDEVINEPSSHDATA_TYPE']._serialized_end=10186 _globals['_WIDEVINEPSSHDATA_ALGORITHM']._serialized_start=10188 _globals['_WIDEVINEPSSHDATA_ALGORITHM']._serialized_end=10228 - _globals['_FILEHASHES']._serialized_start=10231 - _globals['_FILEHASHES']._serialized_end=10440 - _globals['_FILEHASHES_SIGNATURE']._serialized_start=10332 - _globals['_FILEHASHES_SIGNATURE']._serialized_end=10440 + _globals['_VMPDATA']._serialized_start=10231 + _globals['_VMPDATA']._serialized_end=11047 + _globals['_VMPDATA_SIGNEDBINARYINFO']._serialized_start=10693 + _globals['_VMPDATA_SIGNEDBINARYINFO']._serialized_end=11047 + _globals['_VMPDATA_SIGNEDBINARYINFO_HASHALGORITHMPROTO']._serialized_start=10913 + _globals['_VMPDATA_SIGNEDBINARYINFO_HASHALGORITHMPROTO']._serialized_end=11047 # @@protoc_insertion_point(module_scope) diff --git a/pywidevine/license_protocol_pb2.pyi b/pywidevine/license_protocol_pb2.pyi index 44f543e..3ec6d17 100644 --- a/pywidevine/license_protocol_pb2.pyi +++ b/pywidevine/license_protocol_pb2.pyi @@ -1,419 +1,278 @@ -# mypy: ignore-errors - from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union -AUTOMATIC: LicenseType DESCRIPTOR: _descriptor.FileDescriptor -HASH_ALGORITHM_SHA_1: HashAlgorithmProto -HASH_ALGORITHM_SHA_256: HashAlgorithmProto -HASH_ALGORITHM_SHA_384: HashAlgorithmProto -HASH_ALGORITHM_UNSPECIFIED: HashAlgorithmProto + +class LicenseType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + STREAMING: _ClassVar[LicenseType] + OFFLINE: _ClassVar[LicenseType] + AUTOMATIC: _ClassVar[LicenseType] + +class PlatformVerificationStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + PLATFORM_UNVERIFIED: _ClassVar[PlatformVerificationStatus] + PLATFORM_TAMPERED: _ClassVar[PlatformVerificationStatus] + PLATFORM_SOFTWARE_VERIFIED: _ClassVar[PlatformVerificationStatus] + PLATFORM_HARDWARE_VERIFIED: _ClassVar[PlatformVerificationStatus] + PLATFORM_NO_VERIFICATION: _ClassVar[PlatformVerificationStatus] + PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED: _ClassVar[PlatformVerificationStatus] + +class ProtocolVersion(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + VERSION_2_0: _ClassVar[ProtocolVersion] + VERSION_2_1: _ClassVar[ProtocolVersion] + VERSION_2_2: _ClassVar[ProtocolVersion] + +class HashAlgorithmProto(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + HASH_ALGORITHM_UNSPECIFIED: _ClassVar[HashAlgorithmProto] + HASH_ALGORITHM_SHA_1: _ClassVar[HashAlgorithmProto] + HASH_ALGORITHM_SHA_256: _ClassVar[HashAlgorithmProto] + HASH_ALGORITHM_SHA_384: _ClassVar[HashAlgorithmProto] +STREAMING: LicenseType OFFLINE: LicenseType +AUTOMATIC: LicenseType +PLATFORM_UNVERIFIED: PlatformVerificationStatus +PLATFORM_TAMPERED: PlatformVerificationStatus +PLATFORM_SOFTWARE_VERIFIED: PlatformVerificationStatus PLATFORM_HARDWARE_VERIFIED: PlatformVerificationStatus PLATFORM_NO_VERIFICATION: PlatformVerificationStatus PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED: PlatformVerificationStatus -PLATFORM_SOFTWARE_VERIFIED: PlatformVerificationStatus -PLATFORM_TAMPERED: PlatformVerificationStatus -PLATFORM_UNVERIFIED: PlatformVerificationStatus -STREAMING: LicenseType VERSION_2_0: ProtocolVersion VERSION_2_1: ProtocolVersion VERSION_2_2: ProtocolVersion +HASH_ALGORITHM_UNSPECIFIED: HashAlgorithmProto +HASH_ALGORITHM_SHA_1: HashAlgorithmProto +HASH_ALGORITHM_SHA_256: HashAlgorithmProto +HASH_ALGORITHM_SHA_384: HashAlgorithmProto -class ClientIdentification(_message.Message): - __slots__ = ["client_capabilities", "client_info", "device_credentials", "license_counter", "provider_client_token", "token", "type", "vmp_data"] - class TokenType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class ClientCapabilities(_message.Message): - __slots__ = ["analog_output_capabilities", "anti_rollback_usage_table", "can_disable_analog_output", "can_update_srm", "client_token", "max_hdcp_version", "oem_crypto_api_version", "resource_rating_tier", "session_token", "srm_version", "supported_certificate_key_type", "video_resolution_constraints"] - class AnalogOutputCapabilities(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class CertificateKeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class HdcpVersion(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - ANALOG_OUTPUT_CAPABILITIES_FIELD_NUMBER: _ClassVar[int] - ANALOG_OUTPUT_NONE: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - ANALOG_OUTPUT_SUPPORTED: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - ANALOG_OUTPUT_SUPPORTS_CGMS_A: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - ANALOG_OUTPUT_UNKNOWN: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - ANTI_ROLLBACK_USAGE_TABLE_FIELD_NUMBER: _ClassVar[int] - CAN_DISABLE_ANALOG_OUTPUT_FIELD_NUMBER: _ClassVar[int] - CAN_UPDATE_SRM_FIELD_NUMBER: _ClassVar[int] - CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] - ECC_SECP256R1: ClientIdentification.ClientCapabilities.CertificateKeyType - ECC_SECP384R1: ClientIdentification.ClientCapabilities.CertificateKeyType - ECC_SECP521R1: ClientIdentification.ClientCapabilities.CertificateKeyType - HDCP_NONE: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_NO_DIGITAL_OUTPUT: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_V1: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_V2: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_V2_1: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_V2_2: ClientIdentification.ClientCapabilities.HdcpVersion - HDCP_V2_3: ClientIdentification.ClientCapabilities.HdcpVersion - MAX_HDCP_VERSION_FIELD_NUMBER: _ClassVar[int] - OEM_CRYPTO_API_VERSION_FIELD_NUMBER: _ClassVar[int] - RESOURCE_RATING_TIER_FIELD_NUMBER: _ClassVar[int] - RSA_2048: ClientIdentification.ClientCapabilities.CertificateKeyType - RSA_3072: ClientIdentification.ClientCapabilities.CertificateKeyType - SESSION_TOKEN_FIELD_NUMBER: _ClassVar[int] - SRM_VERSION_FIELD_NUMBER: _ClassVar[int] - SUPPORTED_CERTIFICATE_KEY_TYPE_FIELD_NUMBER: _ClassVar[int] - VIDEO_RESOLUTION_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - analog_output_capabilities: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - anti_rollback_usage_table: bool - can_disable_analog_output: bool - can_update_srm: bool - client_token: bool - max_hdcp_version: ClientIdentification.ClientCapabilities.HdcpVersion - oem_crypto_api_version: int - resource_rating_tier: int - session_token: bool - srm_version: int - supported_certificate_key_type: _containers.RepeatedScalarFieldContainer[ClientIdentification.ClientCapabilities.CertificateKeyType] - video_resolution_constraints: bool - def __init__(self, client_token: bool = ..., session_token: bool = ..., video_resolution_constraints: bool = ..., max_hdcp_version: _Optional[_Union[ClientIdentification.ClientCapabilities.HdcpVersion, str]] = ..., oem_crypto_api_version: _Optional[int] = ..., anti_rollback_usage_table: bool = ..., srm_version: _Optional[int] = ..., can_update_srm: bool = ..., supported_certificate_key_type: _Optional[_Iterable[_Union[ClientIdentification.ClientCapabilities.CertificateKeyType, str]]] = ..., analog_output_capabilities: _Optional[_Union[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities, str]] = ..., can_disable_analog_output: bool = ..., resource_rating_tier: _Optional[int] = ...) -> None: ... - class ClientCredentials(_message.Message): - __slots__ = ["token", "type"] - TOKEN_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - token: bytes - type: ClientIdentification.TokenType - def __init__(self, type: _Optional[_Union[ClientIdentification.TokenType, str]] = ..., token: _Optional[bytes] = ...) -> None: ... - class NameValue(_message.Message): - __slots__ = ["name", "value"] - NAME_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - name: str - value: str - def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... - CLIENT_CAPABILITIES_FIELD_NUMBER: _ClassVar[int] - CLIENT_INFO_FIELD_NUMBER: _ClassVar[int] - DEVICE_CREDENTIALS_FIELD_NUMBER: _ClassVar[int] - DRM_DEVICE_CERTIFICATE: ClientIdentification.TokenType - KEYBOX: ClientIdentification.TokenType - LICENSE_COUNTER_FIELD_NUMBER: _ClassVar[int] - OEM_DEVICE_CERTIFICATE: ClientIdentification.TokenType - PROVIDER_CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] - REMOTE_ATTESTATION_CERTIFICATE: ClientIdentification.TokenType - TOKEN_FIELD_NUMBER: _ClassVar[int] +class LicenseIdentification(_message.Message): + __slots__ = ("request_id", "session_id", "purchase_id", "type", "version", "provider_session_token") + REQUEST_ID_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + PURCHASE_ID_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] - VMP_DATA_FIELD_NUMBER: _ClassVar[int] - client_capabilities: ClientIdentification.ClientCapabilities - client_info: _containers.RepeatedCompositeFieldContainer[ClientIdentification.NameValue] - device_credentials: _containers.RepeatedCompositeFieldContainer[ClientIdentification.ClientCredentials] - license_counter: int - provider_client_token: bytes - token: bytes - type: ClientIdentification.TokenType - vmp_data: bytes - def __init__(self, type: _Optional[_Union[ClientIdentification.TokenType, str]] = ..., token: _Optional[bytes] = ..., client_info: _Optional[_Iterable[_Union[ClientIdentification.NameValue, _Mapping]]] = ..., provider_client_token: _Optional[bytes] = ..., license_counter: _Optional[int] = ..., client_capabilities: _Optional[_Union[ClientIdentification.ClientCapabilities, _Mapping]] = ..., vmp_data: _Optional[bytes] = ..., device_credentials: _Optional[_Iterable[_Union[ClientIdentification.ClientCredentials, _Mapping]]] = ...) -> None: ... - -class DrmCertificate(_message.Message): - __slots__ = ["algorithm", "creation_time_seconds", "encryption_key", "expiration_time_seconds", "provider_id", "public_key", "rot_id", "serial_number", "service_types", "system_id", "test_device_deprecated", "type"] - class Algorithm(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class ServiceType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class EncryptionKey(_message.Message): - __slots__ = ["algorithm", "public_key"] - ALGORITHM_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - algorithm: DrmCertificate.Algorithm - public_key: bytes - def __init__(self, public_key: _Optional[bytes] = ..., algorithm: _Optional[_Union[DrmCertificate.Algorithm, str]] = ...) -> None: ... - ALGORITHM_FIELD_NUMBER: _ClassVar[int] - CAS_PROXY_SDK: DrmCertificate.ServiceType - CREATION_TIME_SECONDS_FIELD_NUMBER: _ClassVar[int] - DEVICE: DrmCertificate.Type - DEVICE_MODEL: DrmCertificate.Type - ECC_SECP256R1: DrmCertificate.Algorithm - ECC_SECP384R1: DrmCertificate.Algorithm - ECC_SECP521R1: DrmCertificate.Algorithm - ENCRYPTION_KEY_FIELD_NUMBER: _ClassVar[int] - EXPIRATION_TIME_SECONDS_FIELD_NUMBER: _ClassVar[int] - LICENSE_SERVER_PROXY_SDK: DrmCertificate.ServiceType - LICENSE_SERVER_SDK: DrmCertificate.ServiceType - PROVIDER_ID_FIELD_NUMBER: _ClassVar[int] - PROVISIONER: DrmCertificate.Type - PROVISIONING_SDK: DrmCertificate.ServiceType - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - ROOT: DrmCertificate.Type - ROT_ID_FIELD_NUMBER: _ClassVar[int] - RSA: DrmCertificate.Algorithm - SERIAL_NUMBER_FIELD_NUMBER: _ClassVar[int] - SERVICE: DrmCertificate.Type - SERVICE_TYPES_FIELD_NUMBER: _ClassVar[int] - SYSTEM_ID_FIELD_NUMBER: _ClassVar[int] - TEST_DEVICE_DEPRECATED_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - UNKNOWN_ALGORITHM: DrmCertificate.Algorithm - UNKNOWN_SERVICE_TYPE: DrmCertificate.ServiceType - algorithm: DrmCertificate.Algorithm - creation_time_seconds: int - encryption_key: DrmCertificate.EncryptionKey - expiration_time_seconds: int - provider_id: str - public_key: bytes - rot_id: bytes - serial_number: bytes - service_types: _containers.RepeatedScalarFieldContainer[DrmCertificate.ServiceType] - system_id: int - test_device_deprecated: bool - type: DrmCertificate.Type - def __init__(self, type: _Optional[_Union[DrmCertificate.Type, str]] = ..., serial_number: _Optional[bytes] = ..., creation_time_seconds: _Optional[int] = ..., expiration_time_seconds: _Optional[int] = ..., public_key: _Optional[bytes] = ..., system_id: _Optional[int] = ..., test_device_deprecated: bool = ..., provider_id: _Optional[str] = ..., service_types: _Optional[_Iterable[_Union[DrmCertificate.ServiceType, str]]] = ..., algorithm: _Optional[_Union[DrmCertificate.Algorithm, str]] = ..., rot_id: _Optional[bytes] = ..., encryption_key: _Optional[_Union[DrmCertificate.EncryptionKey, _Mapping]] = ...) -> None: ... - -class EncryptedClientIdentification(_message.Message): - __slots__ = ["encrypted_client_id", "encrypted_client_id_iv", "encrypted_privacy_key", "provider_id", "service_certificate_serial_number"] - ENCRYPTED_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] - ENCRYPTED_CLIENT_ID_IV_FIELD_NUMBER: _ClassVar[int] - ENCRYPTED_PRIVACY_KEY_FIELD_NUMBER: _ClassVar[int] - PROVIDER_ID_FIELD_NUMBER: _ClassVar[int] - SERVICE_CERTIFICATE_SERIAL_NUMBER_FIELD_NUMBER: _ClassVar[int] - encrypted_client_id: bytes - encrypted_client_id_iv: bytes - encrypted_privacy_key: bytes - provider_id: str - service_certificate_serial_number: bytes - def __init__(self, provider_id: _Optional[str] = ..., service_certificate_serial_number: _Optional[bytes] = ..., encrypted_client_id: _Optional[bytes] = ..., encrypted_client_id_iv: _Optional[bytes] = ..., encrypted_privacy_key: _Optional[bytes] = ...) -> None: ... - -class FileHashes(_message.Message): - __slots__ = ["signatures", "signer"] - class Signature(_message.Message): - __slots__ = ["SHA512Hash", "filename", "main_exe", "signature", "test_signing"] - FILENAME_FIELD_NUMBER: _ClassVar[int] - MAIN_EXE_FIELD_NUMBER: _ClassVar[int] - SHA512HASH_FIELD_NUMBER: _ClassVar[int] - SHA512Hash: bytes - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - TEST_SIGNING_FIELD_NUMBER: _ClassVar[int] - filename: str - main_exe: bool - signature: bytes - test_signing: bool - def __init__(self, filename: _Optional[str] = ..., test_signing: bool = ..., SHA512Hash: _Optional[bytes] = ..., main_exe: bool = ..., signature: _Optional[bytes] = ...) -> None: ... - SIGNATURES_FIELD_NUMBER: _ClassVar[int] - SIGNER_FIELD_NUMBER: _ClassVar[int] - signatures: _containers.RepeatedCompositeFieldContainer[FileHashes.Signature] - signer: bytes - def __init__(self, signer: _Optional[bytes] = ..., signatures: _Optional[_Iterable[_Union[FileHashes.Signature, _Mapping]]] = ...) -> None: ... + VERSION_FIELD_NUMBER: _ClassVar[int] + PROVIDER_SESSION_TOKEN_FIELD_NUMBER: _ClassVar[int] + request_id: bytes + session_id: bytes + purchase_id: bytes + type: LicenseType + version: int + provider_session_token: bytes + def __init__(self, request_id: _Optional[bytes] = ..., session_id: _Optional[bytes] = ..., purchase_id: _Optional[bytes] = ..., type: _Optional[_Union[LicenseType, str]] = ..., version: _Optional[int] = ..., provider_session_token: _Optional[bytes] = ...) -> None: ... class License(_message.Message): - __slots__ = ["group_ids", "id", "key", "license_start_time", "platform_verification_status", "policy", "protection_scheme", "provider_client_token", "remote_attestation_verified", "srm_requirement", "srm_update"] + __slots__ = ("id", "policy", "key", "license_start_time", "remote_attestation_verified", "provider_client_token", "protection_scheme", "srm_requirement", "srm_update", "platform_verification_status", "group_ids") + class Policy(_message.Message): + __slots__ = ("can_play", "can_persist", "can_renew", "rental_duration_seconds", "playback_duration_seconds", "license_duration_seconds", "renewal_recovery_duration_seconds", "renewal_server_url", "renewal_delay_seconds", "renewal_retry_interval_seconds", "renew_with_usage", "always_include_client_id", "play_start_grace_period_seconds", "soft_enforce_playback_duration", "soft_enforce_rental_duration") + CAN_PLAY_FIELD_NUMBER: _ClassVar[int] + CAN_PERSIST_FIELD_NUMBER: _ClassVar[int] + CAN_RENEW_FIELD_NUMBER: _ClassVar[int] + RENTAL_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] + PLAYBACK_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] + LICENSE_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] + RENEWAL_RECOVERY_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] + RENEWAL_SERVER_URL_FIELD_NUMBER: _ClassVar[int] + RENEWAL_DELAY_SECONDS_FIELD_NUMBER: _ClassVar[int] + RENEWAL_RETRY_INTERVAL_SECONDS_FIELD_NUMBER: _ClassVar[int] + RENEW_WITH_USAGE_FIELD_NUMBER: _ClassVar[int] + ALWAYS_INCLUDE_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] + PLAY_START_GRACE_PERIOD_SECONDS_FIELD_NUMBER: _ClassVar[int] + SOFT_ENFORCE_PLAYBACK_DURATION_FIELD_NUMBER: _ClassVar[int] + SOFT_ENFORCE_RENTAL_DURATION_FIELD_NUMBER: _ClassVar[int] + can_play: bool + can_persist: bool + can_renew: bool + rental_duration_seconds: int + playback_duration_seconds: int + license_duration_seconds: int + renewal_recovery_duration_seconds: int + renewal_server_url: str + renewal_delay_seconds: int + renewal_retry_interval_seconds: int + renew_with_usage: bool + always_include_client_id: bool + play_start_grace_period_seconds: int + soft_enforce_playback_duration: bool + soft_enforce_rental_duration: bool + def __init__(self, can_play: bool = ..., can_persist: bool = ..., can_renew: bool = ..., rental_duration_seconds: _Optional[int] = ..., playback_duration_seconds: _Optional[int] = ..., license_duration_seconds: _Optional[int] = ..., renewal_recovery_duration_seconds: _Optional[int] = ..., renewal_server_url: _Optional[str] = ..., renewal_delay_seconds: _Optional[int] = ..., renewal_retry_interval_seconds: _Optional[int] = ..., renew_with_usage: bool = ..., always_include_client_id: bool = ..., play_start_grace_period_seconds: _Optional[int] = ..., soft_enforce_playback_duration: bool = ..., soft_enforce_rental_duration: bool = ...) -> None: ... class KeyContainer(_message.Message): - __slots__ = ["anti_rollback_usage_table", "id", "iv", "key", "key_control", "level", "operator_session_key_permissions", "requested_protection", "required_protection", "track_label", "type", "video_resolution_constraints"] + __slots__ = ("id", "iv", "key", "type", "level", "required_protection", "requested_protection", "key_control", "operator_session_key_permissions", "video_resolution_constraints", "anti_rollback_usage_table", "track_label") class KeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] + __slots__ = () + SIGNING: _ClassVar[License.KeyContainer.KeyType] + CONTENT: _ClassVar[License.KeyContainer.KeyType] + KEY_CONTROL: _ClassVar[License.KeyContainer.KeyType] + OPERATOR_SESSION: _ClassVar[License.KeyContainer.KeyType] + ENTITLEMENT: _ClassVar[License.KeyContainer.KeyType] + OEM_CONTENT: _ClassVar[License.KeyContainer.KeyType] + SIGNING: License.KeyContainer.KeyType + CONTENT: License.KeyContainer.KeyType + KEY_CONTROL: License.KeyContainer.KeyType + OPERATOR_SESSION: License.KeyContainer.KeyType + ENTITLEMENT: License.KeyContainer.KeyType + OEM_CONTENT: License.KeyContainer.KeyType class SecurityLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] + __slots__ = () + SW_SECURE_CRYPTO: _ClassVar[License.KeyContainer.SecurityLevel] + SW_SECURE_DECODE: _ClassVar[License.KeyContainer.SecurityLevel] + HW_SECURE_CRYPTO: _ClassVar[License.KeyContainer.SecurityLevel] + HW_SECURE_DECODE: _ClassVar[License.KeyContainer.SecurityLevel] + HW_SECURE_ALL: _ClassVar[License.KeyContainer.SecurityLevel] + SW_SECURE_CRYPTO: License.KeyContainer.SecurityLevel + SW_SECURE_DECODE: License.KeyContainer.SecurityLevel + HW_SECURE_CRYPTO: License.KeyContainer.SecurityLevel + HW_SECURE_DECODE: License.KeyContainer.SecurityLevel + HW_SECURE_ALL: License.KeyContainer.SecurityLevel class KeyControl(_message.Message): - __slots__ = ["iv", "key_control_block"] - IV_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("key_control_block", "iv") KEY_CONTROL_BLOCK_FIELD_NUMBER: _ClassVar[int] - iv: bytes + IV_FIELD_NUMBER: _ClassVar[int] key_control_block: bytes + iv: bytes def __init__(self, key_control_block: _Optional[bytes] = ..., iv: _Optional[bytes] = ...) -> None: ... - class OperatorSessionKeyPermissions(_message.Message): - __slots__ = ["allow_decrypt", "allow_encrypt", "allow_sign", "allow_signature_verify"] - ALLOW_DECRYPT_FIELD_NUMBER: _ClassVar[int] - ALLOW_ENCRYPT_FIELD_NUMBER: _ClassVar[int] - ALLOW_SIGNATURE_VERIFY_FIELD_NUMBER: _ClassVar[int] - ALLOW_SIGN_FIELD_NUMBER: _ClassVar[int] - allow_decrypt: bool - allow_encrypt: bool - allow_sign: bool - allow_signature_verify: bool - def __init__(self, allow_encrypt: bool = ..., allow_decrypt: bool = ..., allow_sign: bool = ..., allow_signature_verify: bool = ...) -> None: ... class OutputProtection(_message.Message): - __slots__ = ["cgms_flags", "disable_analog_output", "disable_digital_output", "hdcp", "hdcp_srm_rule"] - class CGMS(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] + __slots__ = ("hdcp", "cgms_flags", "hdcp_srm_rule", "disable_analog_output", "disable_digital_output") class HDCP(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class HdcpSrmRule(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CGMS_FLAGS_FIELD_NUMBER: _ClassVar[int] - CGMS_NONE: License.KeyContainer.OutputProtection.CGMS - COPY_FREE: License.KeyContainer.OutputProtection.CGMS - COPY_NEVER: License.KeyContainer.OutputProtection.CGMS - COPY_ONCE: License.KeyContainer.OutputProtection.CGMS - CURRENT_SRM: License.KeyContainer.OutputProtection.HdcpSrmRule - DISABLE_ANALOG_OUTPUT_FIELD_NUMBER: _ClassVar[int] - DISABLE_DIGITAL_OUTPUT_FIELD_NUMBER: _ClassVar[int] - HDCP_FIELD_NUMBER: _ClassVar[int] + __slots__ = () + HDCP_NONE: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_V1: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_V2: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_V2_1: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_V2_2: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_V2_3: _ClassVar[License.KeyContainer.OutputProtection.HDCP] + HDCP_NO_DIGITAL_OUTPUT: _ClassVar[License.KeyContainer.OutputProtection.HDCP] HDCP_NONE: License.KeyContainer.OutputProtection.HDCP - HDCP_NO_DIGITAL_OUTPUT: License.KeyContainer.OutputProtection.HDCP - HDCP_SRM_RULE_FIELD_NUMBER: _ClassVar[int] - HDCP_SRM_RULE_NONE: License.KeyContainer.OutputProtection.HdcpSrmRule HDCP_V1: License.KeyContainer.OutputProtection.HDCP HDCP_V2: License.KeyContainer.OutputProtection.HDCP HDCP_V2_1: License.KeyContainer.OutputProtection.HDCP HDCP_V2_2: License.KeyContainer.OutputProtection.HDCP HDCP_V2_3: License.KeyContainer.OutputProtection.HDCP + HDCP_NO_DIGITAL_OUTPUT: License.KeyContainer.OutputProtection.HDCP + class CGMS(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + CGMS_NONE: _ClassVar[License.KeyContainer.OutputProtection.CGMS] + COPY_FREE: _ClassVar[License.KeyContainer.OutputProtection.CGMS] + COPY_ONCE: _ClassVar[License.KeyContainer.OutputProtection.CGMS] + COPY_NEVER: _ClassVar[License.KeyContainer.OutputProtection.CGMS] + CGMS_NONE: License.KeyContainer.OutputProtection.CGMS + COPY_FREE: License.KeyContainer.OutputProtection.CGMS + COPY_ONCE: License.KeyContainer.OutputProtection.CGMS + COPY_NEVER: License.KeyContainer.OutputProtection.CGMS + class HdcpSrmRule(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + HDCP_SRM_RULE_NONE: _ClassVar[License.KeyContainer.OutputProtection.HdcpSrmRule] + CURRENT_SRM: _ClassVar[License.KeyContainer.OutputProtection.HdcpSrmRule] + HDCP_SRM_RULE_NONE: License.KeyContainer.OutputProtection.HdcpSrmRule + CURRENT_SRM: License.KeyContainer.OutputProtection.HdcpSrmRule + HDCP_FIELD_NUMBER: _ClassVar[int] + CGMS_FLAGS_FIELD_NUMBER: _ClassVar[int] + HDCP_SRM_RULE_FIELD_NUMBER: _ClassVar[int] + DISABLE_ANALOG_OUTPUT_FIELD_NUMBER: _ClassVar[int] + DISABLE_DIGITAL_OUTPUT_FIELD_NUMBER: _ClassVar[int] + hdcp: License.KeyContainer.OutputProtection.HDCP cgms_flags: License.KeyContainer.OutputProtection.CGMS + hdcp_srm_rule: License.KeyContainer.OutputProtection.HdcpSrmRule disable_analog_output: bool disable_digital_output: bool - hdcp: License.KeyContainer.OutputProtection.HDCP - hdcp_srm_rule: License.KeyContainer.OutputProtection.HdcpSrmRule def __init__(self, hdcp: _Optional[_Union[License.KeyContainer.OutputProtection.HDCP, str]] = ..., cgms_flags: _Optional[_Union[License.KeyContainer.OutputProtection.CGMS, str]] = ..., hdcp_srm_rule: _Optional[_Union[License.KeyContainer.OutputProtection.HdcpSrmRule, str]] = ..., disable_analog_output: bool = ..., disable_digital_output: bool = ...) -> None: ... class VideoResolutionConstraint(_message.Message): - __slots__ = ["max_resolution_pixels", "min_resolution_pixels", "required_protection"] - MAX_RESOLUTION_PIXELS_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("min_resolution_pixels", "max_resolution_pixels", "required_protection") MIN_RESOLUTION_PIXELS_FIELD_NUMBER: _ClassVar[int] + MAX_RESOLUTION_PIXELS_FIELD_NUMBER: _ClassVar[int] REQUIRED_PROTECTION_FIELD_NUMBER: _ClassVar[int] - max_resolution_pixels: int min_resolution_pixels: int + max_resolution_pixels: int required_protection: License.KeyContainer.OutputProtection def __init__(self, min_resolution_pixels: _Optional[int] = ..., max_resolution_pixels: _Optional[int] = ..., required_protection: _Optional[_Union[License.KeyContainer.OutputProtection, _Mapping]] = ...) -> None: ... - ANTI_ROLLBACK_USAGE_TABLE_FIELD_NUMBER: _ClassVar[int] - CONTENT: License.KeyContainer.KeyType - ENTITLEMENT: License.KeyContainer.KeyType - HW_SECURE_ALL: License.KeyContainer.SecurityLevel - HW_SECURE_CRYPTO: License.KeyContainer.SecurityLevel - HW_SECURE_DECODE: License.KeyContainer.SecurityLevel + class OperatorSessionKeyPermissions(_message.Message): + __slots__ = ("allow_encrypt", "allow_decrypt", "allow_sign", "allow_signature_verify") + ALLOW_ENCRYPT_FIELD_NUMBER: _ClassVar[int] + ALLOW_DECRYPT_FIELD_NUMBER: _ClassVar[int] + ALLOW_SIGN_FIELD_NUMBER: _ClassVar[int] + ALLOW_SIGNATURE_VERIFY_FIELD_NUMBER: _ClassVar[int] + allow_encrypt: bool + allow_decrypt: bool + allow_sign: bool + allow_signature_verify: bool + def __init__(self, allow_encrypt: bool = ..., allow_decrypt: bool = ..., allow_sign: bool = ..., allow_signature_verify: bool = ...) -> None: ... ID_FIELD_NUMBER: _ClassVar[int] IV_FIELD_NUMBER: _ClassVar[int] - KEY_CONTROL: License.KeyContainer.KeyType - KEY_CONTROL_FIELD_NUMBER: _ClassVar[int] KEY_FIELD_NUMBER: _ClassVar[int] - LEVEL_FIELD_NUMBER: _ClassVar[int] - OEM_CONTENT: License.KeyContainer.KeyType - OPERATOR_SESSION: License.KeyContainer.KeyType - OPERATOR_SESSION_KEY_PERMISSIONS_FIELD_NUMBER: _ClassVar[int] - REQUESTED_PROTECTION_FIELD_NUMBER: _ClassVar[int] - REQUIRED_PROTECTION_FIELD_NUMBER: _ClassVar[int] - SIGNING: License.KeyContainer.KeyType - SW_SECURE_CRYPTO: License.KeyContainer.SecurityLevel - SW_SECURE_DECODE: License.KeyContainer.SecurityLevel - TRACK_LABEL_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] + LEVEL_FIELD_NUMBER: _ClassVar[int] + REQUIRED_PROTECTION_FIELD_NUMBER: _ClassVar[int] + REQUESTED_PROTECTION_FIELD_NUMBER: _ClassVar[int] + KEY_CONTROL_FIELD_NUMBER: _ClassVar[int] + OPERATOR_SESSION_KEY_PERMISSIONS_FIELD_NUMBER: _ClassVar[int] VIDEO_RESOLUTION_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - anti_rollback_usage_table: bool + ANTI_ROLLBACK_USAGE_TABLE_FIELD_NUMBER: _ClassVar[int] + TRACK_LABEL_FIELD_NUMBER: _ClassVar[int] id: bytes iv: bytes key: bytes - key_control: License.KeyContainer.KeyControl - level: License.KeyContainer.SecurityLevel - operator_session_key_permissions: License.KeyContainer.OperatorSessionKeyPermissions - requested_protection: License.KeyContainer.OutputProtection - required_protection: License.KeyContainer.OutputProtection - track_label: str type: License.KeyContainer.KeyType + level: License.KeyContainer.SecurityLevel + required_protection: License.KeyContainer.OutputProtection + requested_protection: License.KeyContainer.OutputProtection + key_control: License.KeyContainer.KeyControl + operator_session_key_permissions: License.KeyContainer.OperatorSessionKeyPermissions video_resolution_constraints: _containers.RepeatedCompositeFieldContainer[License.KeyContainer.VideoResolutionConstraint] + anti_rollback_usage_table: bool + track_label: str def __init__(self, id: _Optional[bytes] = ..., iv: _Optional[bytes] = ..., key: _Optional[bytes] = ..., type: _Optional[_Union[License.KeyContainer.KeyType, str]] = ..., level: _Optional[_Union[License.KeyContainer.SecurityLevel, str]] = ..., required_protection: _Optional[_Union[License.KeyContainer.OutputProtection, _Mapping]] = ..., requested_protection: _Optional[_Union[License.KeyContainer.OutputProtection, _Mapping]] = ..., key_control: _Optional[_Union[License.KeyContainer.KeyControl, _Mapping]] = ..., operator_session_key_permissions: _Optional[_Union[License.KeyContainer.OperatorSessionKeyPermissions, _Mapping]] = ..., video_resolution_constraints: _Optional[_Iterable[_Union[License.KeyContainer.VideoResolutionConstraint, _Mapping]]] = ..., anti_rollback_usage_table: bool = ..., track_label: _Optional[str] = ...) -> None: ... - class Policy(_message.Message): - __slots__ = ["always_include_client_id", "can_persist", "can_play", "can_renew", "license_duration_seconds", "play_start_grace_period_seconds", "playback_duration_seconds", "renew_with_usage", "renewal_delay_seconds", "renewal_recovery_duration_seconds", "renewal_retry_interval_seconds", "renewal_server_url", "rental_duration_seconds", "soft_enforce_playback_duration", "soft_enforce_rental_duration"] - ALWAYS_INCLUDE_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] - CAN_PERSIST_FIELD_NUMBER: _ClassVar[int] - CAN_PLAY_FIELD_NUMBER: _ClassVar[int] - CAN_RENEW_FIELD_NUMBER: _ClassVar[int] - LICENSE_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] - PLAYBACK_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] - PLAY_START_GRACE_PERIOD_SECONDS_FIELD_NUMBER: _ClassVar[int] - RENEWAL_DELAY_SECONDS_FIELD_NUMBER: _ClassVar[int] - RENEWAL_RECOVERY_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] - RENEWAL_RETRY_INTERVAL_SECONDS_FIELD_NUMBER: _ClassVar[int] - RENEWAL_SERVER_URL_FIELD_NUMBER: _ClassVar[int] - RENEW_WITH_USAGE_FIELD_NUMBER: _ClassVar[int] - RENTAL_DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int] - SOFT_ENFORCE_PLAYBACK_DURATION_FIELD_NUMBER: _ClassVar[int] - SOFT_ENFORCE_RENTAL_DURATION_FIELD_NUMBER: _ClassVar[int] - always_include_client_id: bool - can_persist: bool - can_play: bool - can_renew: bool - license_duration_seconds: int - play_start_grace_period_seconds: int - playback_duration_seconds: int - renew_with_usage: bool - renewal_delay_seconds: int - renewal_recovery_duration_seconds: int - renewal_retry_interval_seconds: int - renewal_server_url: str - rental_duration_seconds: int - soft_enforce_playback_duration: bool - soft_enforce_rental_duration: bool - def __init__(self, can_play: bool = ..., can_persist: bool = ..., can_renew: bool = ..., rental_duration_seconds: _Optional[int] = ..., playback_duration_seconds: _Optional[int] = ..., license_duration_seconds: _Optional[int] = ..., renewal_recovery_duration_seconds: _Optional[int] = ..., renewal_server_url: _Optional[str] = ..., renewal_delay_seconds: _Optional[int] = ..., renewal_retry_interval_seconds: _Optional[int] = ..., renew_with_usage: bool = ..., always_include_client_id: bool = ..., play_start_grace_period_seconds: _Optional[int] = ..., soft_enforce_playback_duration: bool = ..., soft_enforce_rental_duration: bool = ...) -> None: ... - GROUP_IDS_FIELD_NUMBER: _ClassVar[int] ID_FIELD_NUMBER: _ClassVar[int] + POLICY_FIELD_NUMBER: _ClassVar[int] KEY_FIELD_NUMBER: _ClassVar[int] LICENSE_START_TIME_FIELD_NUMBER: _ClassVar[int] - PLATFORM_VERIFICATION_STATUS_FIELD_NUMBER: _ClassVar[int] - POLICY_FIELD_NUMBER: _ClassVar[int] - PROTECTION_SCHEME_FIELD_NUMBER: _ClassVar[int] - PROVIDER_CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] REMOTE_ATTESTATION_VERIFIED_FIELD_NUMBER: _ClassVar[int] + PROVIDER_CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] + PROTECTION_SCHEME_FIELD_NUMBER: _ClassVar[int] SRM_REQUIREMENT_FIELD_NUMBER: _ClassVar[int] SRM_UPDATE_FIELD_NUMBER: _ClassVar[int] - group_ids: _containers.RepeatedScalarFieldContainer[bytes] + PLATFORM_VERIFICATION_STATUS_FIELD_NUMBER: _ClassVar[int] + GROUP_IDS_FIELD_NUMBER: _ClassVar[int] id: LicenseIdentification + policy: License.Policy key: _containers.RepeatedCompositeFieldContainer[License.KeyContainer] license_start_time: int - platform_verification_status: PlatformVerificationStatus - policy: License.Policy - protection_scheme: int - provider_client_token: bytes remote_attestation_verified: bool + provider_client_token: bytes + protection_scheme: int srm_requirement: bytes srm_update: bytes + platform_verification_status: PlatformVerificationStatus + group_ids: _containers.RepeatedScalarFieldContainer[bytes] def __init__(self, id: _Optional[_Union[LicenseIdentification, _Mapping]] = ..., policy: _Optional[_Union[License.Policy, _Mapping]] = ..., key: _Optional[_Iterable[_Union[License.KeyContainer, _Mapping]]] = ..., license_start_time: _Optional[int] = ..., remote_attestation_verified: bool = ..., provider_client_token: _Optional[bytes] = ..., protection_scheme: _Optional[int] = ..., srm_requirement: _Optional[bytes] = ..., srm_update: _Optional[bytes] = ..., platform_verification_status: _Optional[_Union[PlatformVerificationStatus, str]] = ..., group_ids: _Optional[_Iterable[bytes]] = ...) -> None: ... -class LicenseIdentification(_message.Message): - __slots__ = ["provider_session_token", "purchase_id", "request_id", "session_id", "type", "version"] - PROVIDER_SESSION_TOKEN_FIELD_NUMBER: _ClassVar[int] - PURCHASE_ID_FIELD_NUMBER: _ClassVar[int] - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - SESSION_ID_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - provider_session_token: bytes - purchase_id: bytes - request_id: bytes - session_id: bytes - type: LicenseType - version: int - def __init__(self, request_id: _Optional[bytes] = ..., session_id: _Optional[bytes] = ..., purchase_id: _Optional[bytes] = ..., type: _Optional[_Union[LicenseType, str]] = ..., version: _Optional[int] = ..., provider_session_token: _Optional[bytes] = ...) -> None: ... - class LicenseRequest(_message.Message): - __slots__ = ["client_id", "content_id", "encrypted_client_id", "key_control_nonce", "key_control_nonce_deprecated", "protocol_version", "request_time", "type"] + __slots__ = ("client_id", "content_id", "type", "request_time", "key_control_nonce_deprecated", "protocol_version", "key_control_nonce", "encrypted_client_id") class RequestType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] + __slots__ = () + NEW: _ClassVar[LicenseRequest.RequestType] + RENEWAL: _ClassVar[LicenseRequest.RequestType] + RELEASE: _ClassVar[LicenseRequest.RequestType] + NEW: LicenseRequest.RequestType + RENEWAL: LicenseRequest.RequestType + RELEASE: LicenseRequest.RequestType class ContentIdentification(_message.Message): - __slots__ = ["existing_license", "init_data", "webm_key_id", "widevine_pssh_data"] - class ExistingLicense(_message.Message): - __slots__ = ["license_id", "seconds_since_last_played", "seconds_since_started", "session_usage_table_entry"] - LICENSE_ID_FIELD_NUMBER: _ClassVar[int] - SECONDS_SINCE_LAST_PLAYED_FIELD_NUMBER: _ClassVar[int] - SECONDS_SINCE_STARTED_FIELD_NUMBER: _ClassVar[int] - SESSION_USAGE_TABLE_ENTRY_FIELD_NUMBER: _ClassVar[int] - license_id: LicenseIdentification - seconds_since_last_played: int - seconds_since_started: int - session_usage_table_entry: bytes - def __init__(self, license_id: _Optional[_Union[LicenseIdentification, _Mapping]] = ..., seconds_since_started: _Optional[int] = ..., seconds_since_last_played: _Optional[int] = ..., session_usage_table_entry: _Optional[bytes] = ...) -> None: ... - class InitData(_message.Message): - __slots__ = ["init_data", "init_data_type", "license_type", "request_id"] - class InitDataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CENC: LicenseRequest.ContentIdentification.InitData.InitDataType - INIT_DATA_FIELD_NUMBER: _ClassVar[int] - INIT_DATA_TYPE_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("widevine_pssh_data", "webm_key_id", "existing_license", "init_data") + class WidevinePsshData(_message.Message): + __slots__ = ("pssh_data", "license_type", "request_id") + PSSH_DATA_FIELD_NUMBER: _ClassVar[int] LICENSE_TYPE_FIELD_NUMBER: _ClassVar[int] REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - WEBM: LicenseRequest.ContentIdentification.InitData.InitDataType - init_data: bytes - init_data_type: LicenseRequest.ContentIdentification.InitData.InitDataType + pssh_data: _containers.RepeatedScalarFieldContainer[bytes] license_type: LicenseType request_id: bytes - def __init__(self, init_data_type: _Optional[_Union[LicenseRequest.ContentIdentification.InitData.InitDataType, str]] = ..., init_data: _Optional[bytes] = ..., license_type: _Optional[_Union[LicenseType, str]] = ..., request_id: _Optional[bytes] = ...) -> None: ... + def __init__(self, pssh_data: _Optional[_Iterable[bytes]] = ..., license_type: _Optional[_Union[LicenseType, str]] = ..., request_id: _Optional[bytes] = ...) -> None: ... class WebmKeyId(_message.Message): - __slots__ = ["header", "license_type", "request_id"] + __slots__ = ("header", "license_type", "request_id") HEADER_FIELD_NUMBER: _ClassVar[int] LICENSE_TYPE_FIELD_NUMBER: _ClassVar[int] REQUEST_ID_FIELD_NUMBER: _ClassVar[int] @@ -421,187 +280,450 @@ class LicenseRequest(_message.Message): license_type: LicenseType request_id: bytes def __init__(self, header: _Optional[bytes] = ..., license_type: _Optional[_Union[LicenseType, str]] = ..., request_id: _Optional[bytes] = ...) -> None: ... - class WidevinePsshData(_message.Message): - __slots__ = ["license_type", "pssh_data", "request_id"] + class ExistingLicense(_message.Message): + __slots__ = ("license_id", "seconds_since_started", "seconds_since_last_played", "session_usage_table_entry") + LICENSE_ID_FIELD_NUMBER: _ClassVar[int] + SECONDS_SINCE_STARTED_FIELD_NUMBER: _ClassVar[int] + SECONDS_SINCE_LAST_PLAYED_FIELD_NUMBER: _ClassVar[int] + SESSION_USAGE_TABLE_ENTRY_FIELD_NUMBER: _ClassVar[int] + license_id: LicenseIdentification + seconds_since_started: int + seconds_since_last_played: int + session_usage_table_entry: bytes + def __init__(self, license_id: _Optional[_Union[LicenseIdentification, _Mapping]] = ..., seconds_since_started: _Optional[int] = ..., seconds_since_last_played: _Optional[int] = ..., session_usage_table_entry: _Optional[bytes] = ...) -> None: ... + class InitData(_message.Message): + __slots__ = ("init_data_type", "init_data", "license_type", "request_id") + class InitDataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + CENC: _ClassVar[LicenseRequest.ContentIdentification.InitData.InitDataType] + WEBM: _ClassVar[LicenseRequest.ContentIdentification.InitData.InitDataType] + CENC: LicenseRequest.ContentIdentification.InitData.InitDataType + WEBM: LicenseRequest.ContentIdentification.InitData.InitDataType + INIT_DATA_TYPE_FIELD_NUMBER: _ClassVar[int] + INIT_DATA_FIELD_NUMBER: _ClassVar[int] LICENSE_TYPE_FIELD_NUMBER: _ClassVar[int] - PSSH_DATA_FIELD_NUMBER: _ClassVar[int] REQUEST_ID_FIELD_NUMBER: _ClassVar[int] + init_data_type: LicenseRequest.ContentIdentification.InitData.InitDataType + init_data: bytes license_type: LicenseType - pssh_data: _containers.RepeatedScalarFieldContainer[bytes] request_id: bytes - def __init__(self, pssh_data: _Optional[_Iterable[bytes]] = ..., license_type: _Optional[_Union[LicenseType, str]] = ..., request_id: _Optional[bytes] = ...) -> None: ... + def __init__(self, init_data_type: _Optional[_Union[LicenseRequest.ContentIdentification.InitData.InitDataType, str]] = ..., init_data: _Optional[bytes] = ..., license_type: _Optional[_Union[LicenseType, str]] = ..., request_id: _Optional[bytes] = ...) -> None: ... + WIDEVINE_PSSH_DATA_FIELD_NUMBER: _ClassVar[int] + WEBM_KEY_ID_FIELD_NUMBER: _ClassVar[int] EXISTING_LICENSE_FIELD_NUMBER: _ClassVar[int] INIT_DATA_FIELD_NUMBER: _ClassVar[int] - WEBM_KEY_ID_FIELD_NUMBER: _ClassVar[int] - WIDEVINE_PSSH_DATA_FIELD_NUMBER: _ClassVar[int] + widevine_pssh_data: LicenseRequest.ContentIdentification.WidevinePsshData + webm_key_id: LicenseRequest.ContentIdentification.WebmKeyId existing_license: LicenseRequest.ContentIdentification.ExistingLicense init_data: LicenseRequest.ContentIdentification.InitData - webm_key_id: LicenseRequest.ContentIdentification.WebmKeyId - widevine_pssh_data: LicenseRequest.ContentIdentification.WidevinePsshData def __init__(self, widevine_pssh_data: _Optional[_Union[LicenseRequest.ContentIdentification.WidevinePsshData, _Mapping]] = ..., webm_key_id: _Optional[_Union[LicenseRequest.ContentIdentification.WebmKeyId, _Mapping]] = ..., existing_license: _Optional[_Union[LicenseRequest.ContentIdentification.ExistingLicense, _Mapping]] = ..., init_data: _Optional[_Union[LicenseRequest.ContentIdentification.InitData, _Mapping]] = ...) -> None: ... CLIENT_ID_FIELD_NUMBER: _ClassVar[int] CONTENT_ID_FIELD_NUMBER: _ClassVar[int] - ENCRYPTED_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] - KEY_CONTROL_NONCE_DEPRECATED_FIELD_NUMBER: _ClassVar[int] - KEY_CONTROL_NONCE_FIELD_NUMBER: _ClassVar[int] - NEW: LicenseRequest.RequestType - PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int] - RELEASE: LicenseRequest.RequestType - RENEWAL: LicenseRequest.RequestType - REQUEST_TIME_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] + REQUEST_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_CONTROL_NONCE_DEPRECATED_FIELD_NUMBER: _ClassVar[int] + PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int] + KEY_CONTROL_NONCE_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] client_id: ClientIdentification content_id: LicenseRequest.ContentIdentification - encrypted_client_id: EncryptedClientIdentification - key_control_nonce: int + type: LicenseRequest.RequestType + request_time: int key_control_nonce_deprecated: bytes protocol_version: ProtocolVersion - request_time: int - type: LicenseRequest.RequestType + key_control_nonce: int + encrypted_client_id: EncryptedClientIdentification def __init__(self, client_id: _Optional[_Union[ClientIdentification, _Mapping]] = ..., content_id: _Optional[_Union[LicenseRequest.ContentIdentification, _Mapping]] = ..., type: _Optional[_Union[LicenseRequest.RequestType, str]] = ..., request_time: _Optional[int] = ..., key_control_nonce_deprecated: _Optional[bytes] = ..., protocol_version: _Optional[_Union[ProtocolVersion, str]] = ..., key_control_nonce: _Optional[int] = ..., encrypted_client_id: _Optional[_Union[EncryptedClientIdentification, _Mapping]] = ...) -> None: ... class MetricData(_message.Message): - __slots__ = ["metric_data", "stage_name"] + __slots__ = ("stage_name", "metric_data") class MetricType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] + __slots__ = () + LATENCY: _ClassVar[MetricData.MetricType] + TIMESTAMP: _ClassVar[MetricData.MetricType] + LATENCY: MetricData.MetricType + TIMESTAMP: MetricData.MetricType class TypeValue(_message.Message): - __slots__ = ["type", "value"] + __slots__ = ("type", "value") TYPE_FIELD_NUMBER: _ClassVar[int] VALUE_FIELD_NUMBER: _ClassVar[int] type: MetricData.MetricType value: int def __init__(self, type: _Optional[_Union[MetricData.MetricType, str]] = ..., value: _Optional[int] = ...) -> None: ... - LATENCY: MetricData.MetricType - METRIC_DATA_FIELD_NUMBER: _ClassVar[int] STAGE_NAME_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP: MetricData.MetricType - metric_data: _containers.RepeatedCompositeFieldContainer[MetricData.TypeValue] + METRIC_DATA_FIELD_NUMBER: _ClassVar[int] stage_name: str + metric_data: _containers.RepeatedCompositeFieldContainer[MetricData.TypeValue] def __init__(self, stage_name: _Optional[str] = ..., metric_data: _Optional[_Iterable[_Union[MetricData.TypeValue, _Mapping]]] = ...) -> None: ... -class SignedDrmCertificate(_message.Message): - __slots__ = ["drm_certificate", "hash_algorithm", "signature", "signer"] - DRM_CERTIFICATE_FIELD_NUMBER: _ClassVar[int] - HASH_ALGORITHM_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - SIGNER_FIELD_NUMBER: _ClassVar[int] - drm_certificate: bytes - hash_algorithm: HashAlgorithmProto - signature: bytes - signer: SignedDrmCertificate - def __init__(self, drm_certificate: _Optional[bytes] = ..., signature: _Optional[bytes] = ..., signer: _Optional[_Union[SignedDrmCertificate, _Mapping]] = ..., hash_algorithm: _Optional[_Union[HashAlgorithmProto, str]] = ...) -> None: ... - -class SignedMessage(_message.Message): - __slots__ = ["metric_data", "msg", "oemcrypto_core_message", "remote_attestation", "service_version_info", "session_key", "session_key_type", "signature", "type"] - class MessageType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class SessionKeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - CAS_LICENSE: SignedMessage.MessageType - CAS_LICENSE_REQUEST: SignedMessage.MessageType - EPHERMERAL_ECC_PUBLIC_KEY: SignedMessage.SessionKeyType - ERROR_RESPONSE: SignedMessage.MessageType - EXTERNAL_LICENSE: SignedMessage.MessageType - EXTERNAL_LICENSE_REQUEST: SignedMessage.MessageType - LICENSE: SignedMessage.MessageType - LICENSE_REQUEST: SignedMessage.MessageType - METRIC_DATA_FIELD_NUMBER: _ClassVar[int] - MSG_FIELD_NUMBER: _ClassVar[int] - OEMCRYPTO_CORE_MESSAGE_FIELD_NUMBER: _ClassVar[int] - REMOTE_ATTESTATION_FIELD_NUMBER: _ClassVar[int] - SERVICE_CERTIFICATE: SignedMessage.MessageType - SERVICE_CERTIFICATE_REQUEST: SignedMessage.MessageType - SERVICE_VERSION_INFO_FIELD_NUMBER: _ClassVar[int] - SESSION_KEY_FIELD_NUMBER: _ClassVar[int] - SESSION_KEY_TYPE_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - SUB_LICENSE: SignedMessage.MessageType - TYPE_FIELD_NUMBER: _ClassVar[int] - UNDEFINED: SignedMessage.SessionKeyType - WRAPPED_AES_KEY: SignedMessage.SessionKeyType - metric_data: _containers.RepeatedCompositeFieldContainer[MetricData] - msg: bytes - oemcrypto_core_message: bytes - remote_attestation: bytes - service_version_info: VersionInfo - session_key: bytes - session_key_type: SignedMessage.SessionKeyType - signature: bytes - type: SignedMessage.MessageType - def __init__(self, type: _Optional[_Union[SignedMessage.MessageType, str]] = ..., msg: _Optional[bytes] = ..., signature: _Optional[bytes] = ..., session_key: _Optional[bytes] = ..., remote_attestation: _Optional[bytes] = ..., metric_data: _Optional[_Iterable[_Union[MetricData, _Mapping]]] = ..., service_version_info: _Optional[_Union[VersionInfo, _Mapping]] = ..., session_key_type: _Optional[_Union[SignedMessage.SessionKeyType, str]] = ..., oemcrypto_core_message: _Optional[bytes] = ...) -> None: ... - class VersionInfo(_message.Message): - __slots__ = ["license_sdk_version", "license_service_version"] + __slots__ = ("license_sdk_version", "license_service_version") LICENSE_SDK_VERSION_FIELD_NUMBER: _ClassVar[int] LICENSE_SERVICE_VERSION_FIELD_NUMBER: _ClassVar[int] license_sdk_version: str license_service_version: str def __init__(self, license_sdk_version: _Optional[str] = ..., license_service_version: _Optional[str] = ...) -> None: ... -class WidevinePsshData(_message.Message): - __slots__ = ["algorithm", "content_id", "crypto_period_index", "crypto_period_seconds", "entitled_keys", "group_ids", "grouped_license", "key_ids", "key_sequence", "policy", "protection_scheme", "provider", "track_type", "type", "video_feature"] - class Algorithm(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] +class SignedMessage(_message.Message): + __slots__ = ("type", "msg", "signature", "session_key", "remote_attestation", "metric_data", "service_version_info", "session_key_type", "oemcrypto_core_message") + class MessageType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + LICENSE_REQUEST: _ClassVar[SignedMessage.MessageType] + LICENSE: _ClassVar[SignedMessage.MessageType] + ERROR_RESPONSE: _ClassVar[SignedMessage.MessageType] + SERVICE_CERTIFICATE_REQUEST: _ClassVar[SignedMessage.MessageType] + SERVICE_CERTIFICATE: _ClassVar[SignedMessage.MessageType] + SUB_LICENSE: _ClassVar[SignedMessage.MessageType] + CAS_LICENSE_REQUEST: _ClassVar[SignedMessage.MessageType] + CAS_LICENSE: _ClassVar[SignedMessage.MessageType] + EXTERNAL_LICENSE_REQUEST: _ClassVar[SignedMessage.MessageType] + EXTERNAL_LICENSE: _ClassVar[SignedMessage.MessageType] + LICENSE_REQUEST: SignedMessage.MessageType + LICENSE: SignedMessage.MessageType + ERROR_RESPONSE: SignedMessage.MessageType + SERVICE_CERTIFICATE_REQUEST: SignedMessage.MessageType + SERVICE_CERTIFICATE: SignedMessage.MessageType + SUB_LICENSE: SignedMessage.MessageType + CAS_LICENSE_REQUEST: SignedMessage.MessageType + CAS_LICENSE: SignedMessage.MessageType + EXTERNAL_LICENSE_REQUEST: SignedMessage.MessageType + EXTERNAL_LICENSE: SignedMessage.MessageType + class SessionKeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNDEFINED: _ClassVar[SignedMessage.SessionKeyType] + WRAPPED_AES_KEY: _ClassVar[SignedMessage.SessionKeyType] + EPHERMERAL_ECC_PUBLIC_KEY: _ClassVar[SignedMessage.SessionKeyType] + UNDEFINED: SignedMessage.SessionKeyType + WRAPPED_AES_KEY: SignedMessage.SessionKeyType + EPHERMERAL_ECC_PUBLIC_KEY: SignedMessage.SessionKeyType + TYPE_FIELD_NUMBER: _ClassVar[int] + MSG_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + SESSION_KEY_FIELD_NUMBER: _ClassVar[int] + REMOTE_ATTESTATION_FIELD_NUMBER: _ClassVar[int] + METRIC_DATA_FIELD_NUMBER: _ClassVar[int] + SERVICE_VERSION_INFO_FIELD_NUMBER: _ClassVar[int] + SESSION_KEY_TYPE_FIELD_NUMBER: _ClassVar[int] + OEMCRYPTO_CORE_MESSAGE_FIELD_NUMBER: _ClassVar[int] + type: SignedMessage.MessageType + msg: bytes + signature: bytes + session_key: bytes + remote_attestation: bytes + metric_data: _containers.RepeatedCompositeFieldContainer[MetricData] + service_version_info: VersionInfo + session_key_type: SignedMessage.SessionKeyType + oemcrypto_core_message: bytes + def __init__(self, type: _Optional[_Union[SignedMessage.MessageType, str]] = ..., msg: _Optional[bytes] = ..., signature: _Optional[bytes] = ..., session_key: _Optional[bytes] = ..., remote_attestation: _Optional[bytes] = ..., metric_data: _Optional[_Iterable[_Union[MetricData, _Mapping]]] = ..., service_version_info: _Optional[_Union[VersionInfo, _Mapping]] = ..., session_key_type: _Optional[_Union[SignedMessage.SessionKeyType, str]] = ..., oemcrypto_core_message: _Optional[bytes] = ...) -> None: ... + +class ClientIdentification(_message.Message): + __slots__ = ("type", "token", "client_info", "provider_client_token", "license_counter", "client_capabilities", "vmp_data", "device_credentials") + class TokenType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + KEYBOX: _ClassVar[ClientIdentification.TokenType] + DRM_DEVICE_CERTIFICATE: _ClassVar[ClientIdentification.TokenType] + REMOTE_ATTESTATION_CERTIFICATE: _ClassVar[ClientIdentification.TokenType] + OEM_DEVICE_CERTIFICATE: _ClassVar[ClientIdentification.TokenType] + KEYBOX: ClientIdentification.TokenType + DRM_DEVICE_CERTIFICATE: ClientIdentification.TokenType + REMOTE_ATTESTATION_CERTIFICATE: ClientIdentification.TokenType + OEM_DEVICE_CERTIFICATE: ClientIdentification.TokenType + class NameValue(_message.Message): + __slots__ = ("name", "value") + NAME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + name: str + value: str + def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class ClientCapabilities(_message.Message): + __slots__ = ("client_token", "session_token", "video_resolution_constraints", "max_hdcp_version", "oem_crypto_api_version", "anti_rollback_usage_table", "srm_version", "can_update_srm", "supported_certificate_key_type", "analog_output_capabilities", "can_disable_analog_output", "resource_rating_tier") + class HdcpVersion(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + HDCP_NONE: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_V1: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_V2: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_V2_1: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_V2_2: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_V2_3: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_NO_DIGITAL_OUTPUT: _ClassVar[ClientIdentification.ClientCapabilities.HdcpVersion] + HDCP_NONE: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_V1: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_V2: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_V2_1: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_V2_2: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_V2_3: ClientIdentification.ClientCapabilities.HdcpVersion + HDCP_NO_DIGITAL_OUTPUT: ClientIdentification.ClientCapabilities.HdcpVersion + class CertificateKeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + RSA_2048: _ClassVar[ClientIdentification.ClientCapabilities.CertificateKeyType] + RSA_3072: _ClassVar[ClientIdentification.ClientCapabilities.CertificateKeyType] + ECC_SECP256R1: _ClassVar[ClientIdentification.ClientCapabilities.CertificateKeyType] + ECC_SECP384R1: _ClassVar[ClientIdentification.ClientCapabilities.CertificateKeyType] + ECC_SECP521R1: _ClassVar[ClientIdentification.ClientCapabilities.CertificateKeyType] + RSA_2048: ClientIdentification.ClientCapabilities.CertificateKeyType + RSA_3072: ClientIdentification.ClientCapabilities.CertificateKeyType + ECC_SECP256R1: ClientIdentification.ClientCapabilities.CertificateKeyType + ECC_SECP384R1: ClientIdentification.ClientCapabilities.CertificateKeyType + ECC_SECP521R1: ClientIdentification.ClientCapabilities.CertificateKeyType + class AnalogOutputCapabilities(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + ANALOG_OUTPUT_UNKNOWN: _ClassVar[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities] + ANALOG_OUTPUT_NONE: _ClassVar[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities] + ANALOG_OUTPUT_SUPPORTED: _ClassVar[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities] + ANALOG_OUTPUT_SUPPORTS_CGMS_A: _ClassVar[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities] + ANALOG_OUTPUT_UNKNOWN: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities + ANALOG_OUTPUT_NONE: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities + ANALOG_OUTPUT_SUPPORTED: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities + ANALOG_OUTPUT_SUPPORTS_CGMS_A: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities + CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] + SESSION_TOKEN_FIELD_NUMBER: _ClassVar[int] + VIDEO_RESOLUTION_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] + MAX_HDCP_VERSION_FIELD_NUMBER: _ClassVar[int] + OEM_CRYPTO_API_VERSION_FIELD_NUMBER: _ClassVar[int] + ANTI_ROLLBACK_USAGE_TABLE_FIELD_NUMBER: _ClassVar[int] + SRM_VERSION_FIELD_NUMBER: _ClassVar[int] + CAN_UPDATE_SRM_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_CERTIFICATE_KEY_TYPE_FIELD_NUMBER: _ClassVar[int] + ANALOG_OUTPUT_CAPABILITIES_FIELD_NUMBER: _ClassVar[int] + CAN_DISABLE_ANALOG_OUTPUT_FIELD_NUMBER: _ClassVar[int] + RESOURCE_RATING_TIER_FIELD_NUMBER: _ClassVar[int] + client_token: bool + session_token: bool + video_resolution_constraints: bool + max_hdcp_version: ClientIdentification.ClientCapabilities.HdcpVersion + oem_crypto_api_version: int + anti_rollback_usage_table: bool + srm_version: int + can_update_srm: bool + supported_certificate_key_type: _containers.RepeatedScalarFieldContainer[ClientIdentification.ClientCapabilities.CertificateKeyType] + analog_output_capabilities: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities + can_disable_analog_output: bool + resource_rating_tier: int + def __init__(self, client_token: bool = ..., session_token: bool = ..., video_resolution_constraints: bool = ..., max_hdcp_version: _Optional[_Union[ClientIdentification.ClientCapabilities.HdcpVersion, str]] = ..., oem_crypto_api_version: _Optional[int] = ..., anti_rollback_usage_table: bool = ..., srm_version: _Optional[int] = ..., can_update_srm: bool = ..., supported_certificate_key_type: _Optional[_Iterable[_Union[ClientIdentification.ClientCapabilities.CertificateKeyType, str]]] = ..., analog_output_capabilities: _Optional[_Union[ClientIdentification.ClientCapabilities.AnalogOutputCapabilities, str]] = ..., can_disable_analog_output: bool = ..., resource_rating_tier: _Optional[int] = ...) -> None: ... + class ClientCredentials(_message.Message): + __slots__ = ("type", "token") + TYPE_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + type: ClientIdentification.TokenType + token: bytes + def __init__(self, type: _Optional[_Union[ClientIdentification.TokenType, str]] = ..., token: _Optional[bytes] = ...) -> None: ... + TYPE_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + CLIENT_INFO_FIELD_NUMBER: _ClassVar[int] + PROVIDER_CLIENT_TOKEN_FIELD_NUMBER: _ClassVar[int] + LICENSE_COUNTER_FIELD_NUMBER: _ClassVar[int] + CLIENT_CAPABILITIES_FIELD_NUMBER: _ClassVar[int] + VMP_DATA_FIELD_NUMBER: _ClassVar[int] + DEVICE_CREDENTIALS_FIELD_NUMBER: _ClassVar[int] + type: ClientIdentification.TokenType + token: bytes + client_info: _containers.RepeatedCompositeFieldContainer[ClientIdentification.NameValue] + provider_client_token: bytes + license_counter: int + client_capabilities: ClientIdentification.ClientCapabilities + vmp_data: bytes + device_credentials: _containers.RepeatedCompositeFieldContainer[ClientIdentification.ClientCredentials] + def __init__(self, type: _Optional[_Union[ClientIdentification.TokenType, str]] = ..., token: _Optional[bytes] = ..., client_info: _Optional[_Iterable[_Union[ClientIdentification.NameValue, _Mapping]]] = ..., provider_client_token: _Optional[bytes] = ..., license_counter: _Optional[int] = ..., client_capabilities: _Optional[_Union[ClientIdentification.ClientCapabilities, _Mapping]] = ..., vmp_data: _Optional[bytes] = ..., device_credentials: _Optional[_Iterable[_Union[ClientIdentification.ClientCredentials, _Mapping]]] = ...) -> None: ... + +class EncryptedClientIdentification(_message.Message): + __slots__ = ("provider_id", "service_certificate_serial_number", "encrypted_client_id", "encrypted_client_id_iv", "encrypted_privacy_key") + PROVIDER_ID_FIELD_NUMBER: _ClassVar[int] + SERVICE_CERTIFICATE_SERIAL_NUMBER_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_CLIENT_ID_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_CLIENT_ID_IV_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_PRIVACY_KEY_FIELD_NUMBER: _ClassVar[int] + provider_id: str + service_certificate_serial_number: bytes + encrypted_client_id: bytes + encrypted_client_id_iv: bytes + encrypted_privacy_key: bytes + def __init__(self, provider_id: _Optional[str] = ..., service_certificate_serial_number: _Optional[bytes] = ..., encrypted_client_id: _Optional[bytes] = ..., encrypted_client_id_iv: _Optional[bytes] = ..., encrypted_privacy_key: _Optional[bytes] = ...) -> None: ... + +class DrmCertificate(_message.Message): + __slots__ = ("type", "serial_number", "creation_time_seconds", "expiration_time_seconds", "public_key", "system_id", "test_device_deprecated", "provider_id", "service_types", "algorithm", "rot_id", "encryption_key") class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class EntitledKey(_message.Message): - __slots__ = ["entitlement_key_id", "entitlement_key_size_bytes", "iv", "key", "key_id"] - ENTITLEMENT_KEY_ID_FIELD_NUMBER: _ClassVar[int] - ENTITLEMENT_KEY_SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] - IV_FIELD_NUMBER: _ClassVar[int] - KEY_FIELD_NUMBER: _ClassVar[int] - KEY_ID_FIELD_NUMBER: _ClassVar[int] - entitlement_key_id: bytes - entitlement_key_size_bytes: int - iv: bytes - key: bytes - key_id: bytes - def __init__(self, entitlement_key_id: _Optional[bytes] = ..., key_id: _Optional[bytes] = ..., key: _Optional[bytes] = ..., iv: _Optional[bytes] = ..., entitlement_key_size_bytes: _Optional[int] = ...) -> None: ... - AESCTR: WidevinePsshData.Algorithm + __slots__ = () + ROOT: _ClassVar[DrmCertificate.Type] + DEVICE_MODEL: _ClassVar[DrmCertificate.Type] + DEVICE: _ClassVar[DrmCertificate.Type] + SERVICE: _ClassVar[DrmCertificate.Type] + PROVISIONER: _ClassVar[DrmCertificate.Type] + ROOT: DrmCertificate.Type + DEVICE_MODEL: DrmCertificate.Type + DEVICE: DrmCertificate.Type + SERVICE: DrmCertificate.Type + PROVISIONER: DrmCertificate.Type + class ServiceType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNKNOWN_SERVICE_TYPE: _ClassVar[DrmCertificate.ServiceType] + LICENSE_SERVER_SDK: _ClassVar[DrmCertificate.ServiceType] + LICENSE_SERVER_PROXY_SDK: _ClassVar[DrmCertificate.ServiceType] + PROVISIONING_SDK: _ClassVar[DrmCertificate.ServiceType] + CAS_PROXY_SDK: _ClassVar[DrmCertificate.ServiceType] + UNKNOWN_SERVICE_TYPE: DrmCertificate.ServiceType + LICENSE_SERVER_SDK: DrmCertificate.ServiceType + LICENSE_SERVER_PROXY_SDK: DrmCertificate.ServiceType + PROVISIONING_SDK: DrmCertificate.ServiceType + CAS_PROXY_SDK: DrmCertificate.ServiceType + class Algorithm(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNKNOWN_ALGORITHM: _ClassVar[DrmCertificate.Algorithm] + RSA: _ClassVar[DrmCertificate.Algorithm] + ECC_SECP256R1: _ClassVar[DrmCertificate.Algorithm] + ECC_SECP384R1: _ClassVar[DrmCertificate.Algorithm] + ECC_SECP521R1: _ClassVar[DrmCertificate.Algorithm] + UNKNOWN_ALGORITHM: DrmCertificate.Algorithm + RSA: DrmCertificate.Algorithm + ECC_SECP256R1: DrmCertificate.Algorithm + ECC_SECP384R1: DrmCertificate.Algorithm + ECC_SECP521R1: DrmCertificate.Algorithm + class EncryptionKey(_message.Message): + __slots__ = ("public_key", "algorithm") + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + ALGORITHM_FIELD_NUMBER: _ClassVar[int] + public_key: bytes + algorithm: DrmCertificate.Algorithm + def __init__(self, public_key: _Optional[bytes] = ..., algorithm: _Optional[_Union[DrmCertificate.Algorithm, str]] = ...) -> None: ... + TYPE_FIELD_NUMBER: _ClassVar[int] + SERIAL_NUMBER_FIELD_NUMBER: _ClassVar[int] + CREATION_TIME_SECONDS_FIELD_NUMBER: _ClassVar[int] + EXPIRATION_TIME_SECONDS_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + SYSTEM_ID_FIELD_NUMBER: _ClassVar[int] + TEST_DEVICE_DEPRECATED_FIELD_NUMBER: _ClassVar[int] + PROVIDER_ID_FIELD_NUMBER: _ClassVar[int] + SERVICE_TYPES_FIELD_NUMBER: _ClassVar[int] ALGORITHM_FIELD_NUMBER: _ClassVar[int] + ROT_ID_FIELD_NUMBER: _ClassVar[int] + ENCRYPTION_KEY_FIELD_NUMBER: _ClassVar[int] + type: DrmCertificate.Type + serial_number: bytes + creation_time_seconds: int + expiration_time_seconds: int + public_key: bytes + system_id: int + test_device_deprecated: bool + provider_id: str + service_types: _containers.RepeatedScalarFieldContainer[DrmCertificate.ServiceType] + algorithm: DrmCertificate.Algorithm + rot_id: bytes + encryption_key: DrmCertificate.EncryptionKey + def __init__(self, type: _Optional[_Union[DrmCertificate.Type, str]] = ..., serial_number: _Optional[bytes] = ..., creation_time_seconds: _Optional[int] = ..., expiration_time_seconds: _Optional[int] = ..., public_key: _Optional[bytes] = ..., system_id: _Optional[int] = ..., test_device_deprecated: bool = ..., provider_id: _Optional[str] = ..., service_types: _Optional[_Iterable[_Union[DrmCertificate.ServiceType, str]]] = ..., algorithm: _Optional[_Union[DrmCertificate.Algorithm, str]] = ..., rot_id: _Optional[bytes] = ..., encryption_key: _Optional[_Union[DrmCertificate.EncryptionKey, _Mapping]] = ...) -> None: ... + +class SignedDrmCertificate(_message.Message): + __slots__ = ("drm_certificate", "signature", "signer", "hash_algorithm") + DRM_CERTIFICATE_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + SIGNER_FIELD_NUMBER: _ClassVar[int] + HASH_ALGORITHM_FIELD_NUMBER: _ClassVar[int] + drm_certificate: bytes + signature: bytes + signer: SignedDrmCertificate + hash_algorithm: HashAlgorithmProto + def __init__(self, drm_certificate: _Optional[bytes] = ..., signature: _Optional[bytes] = ..., signer: _Optional[_Union[SignedDrmCertificate, _Mapping]] = ..., hash_algorithm: _Optional[_Union[HashAlgorithmProto, str]] = ...) -> None: ... + +class WidevinePsshData(_message.Message): + __slots__ = ("key_ids", "content_id", "crypto_period_index", "protection_scheme", "crypto_period_seconds", "type", "key_sequence", "group_ids", "entitled_keys", "video_feature", "algorithm", "provider", "track_type", "policy", "grouped_license") + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + SINGLE: _ClassVar[WidevinePsshData.Type] + ENTITLEMENT: _ClassVar[WidevinePsshData.Type] + ENTITLED_KEY: _ClassVar[WidevinePsshData.Type] + SINGLE: WidevinePsshData.Type + ENTITLEMENT: WidevinePsshData.Type + ENTITLED_KEY: WidevinePsshData.Type + class Algorithm(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNENCRYPTED: _ClassVar[WidevinePsshData.Algorithm] + AESCTR: _ClassVar[WidevinePsshData.Algorithm] + UNENCRYPTED: WidevinePsshData.Algorithm + AESCTR: WidevinePsshData.Algorithm + class EntitledKey(_message.Message): + __slots__ = ("entitlement_key_id", "key_id", "key", "iv", "entitlement_key_size_bytes") + ENTITLEMENT_KEY_ID_FIELD_NUMBER: _ClassVar[int] + KEY_ID_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + IV_FIELD_NUMBER: _ClassVar[int] + ENTITLEMENT_KEY_SIZE_BYTES_FIELD_NUMBER: _ClassVar[int] + entitlement_key_id: bytes + key_id: bytes + key: bytes + iv: bytes + entitlement_key_size_bytes: int + def __init__(self, entitlement_key_id: _Optional[bytes] = ..., key_id: _Optional[bytes] = ..., key: _Optional[bytes] = ..., iv: _Optional[bytes] = ..., entitlement_key_size_bytes: _Optional[int] = ...) -> None: ... + KEY_IDS_FIELD_NUMBER: _ClassVar[int] CONTENT_ID_FIELD_NUMBER: _ClassVar[int] CRYPTO_PERIOD_INDEX_FIELD_NUMBER: _ClassVar[int] - CRYPTO_PERIOD_SECONDS_FIELD_NUMBER: _ClassVar[int] - ENTITLED_KEY: WidevinePsshData.Type - ENTITLED_KEYS_FIELD_NUMBER: _ClassVar[int] - ENTITLEMENT: WidevinePsshData.Type - GROUPED_LICENSE_FIELD_NUMBER: _ClassVar[int] - GROUP_IDS_FIELD_NUMBER: _ClassVar[int] - KEY_IDS_FIELD_NUMBER: _ClassVar[int] - KEY_SEQUENCE_FIELD_NUMBER: _ClassVar[int] - POLICY_FIELD_NUMBER: _ClassVar[int] PROTECTION_SCHEME_FIELD_NUMBER: _ClassVar[int] - PROVIDER_FIELD_NUMBER: _ClassVar[int] - SINGLE: WidevinePsshData.Type - TRACK_TYPE_FIELD_NUMBER: _ClassVar[int] + CRYPTO_PERIOD_SECONDS_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] - UNENCRYPTED: WidevinePsshData.Algorithm + KEY_SEQUENCE_FIELD_NUMBER: _ClassVar[int] + GROUP_IDS_FIELD_NUMBER: _ClassVar[int] + ENTITLED_KEYS_FIELD_NUMBER: _ClassVar[int] VIDEO_FEATURE_FIELD_NUMBER: _ClassVar[int] - algorithm: WidevinePsshData.Algorithm + ALGORITHM_FIELD_NUMBER: _ClassVar[int] + PROVIDER_FIELD_NUMBER: _ClassVar[int] + TRACK_TYPE_FIELD_NUMBER: _ClassVar[int] + POLICY_FIELD_NUMBER: _ClassVar[int] + GROUPED_LICENSE_FIELD_NUMBER: _ClassVar[int] + key_ids: _containers.RepeatedScalarFieldContainer[bytes] content_id: bytes crypto_period_index: int - crypto_period_seconds: int - entitled_keys: _containers.RepeatedCompositeFieldContainer[WidevinePsshData.EntitledKey] - group_ids: _containers.RepeatedScalarFieldContainer[bytes] - grouped_license: bytes - key_ids: _containers.RepeatedScalarFieldContainer[bytes] - key_sequence: int - policy: str protection_scheme: int + crypto_period_seconds: int + type: WidevinePsshData.Type + key_sequence: int + group_ids: _containers.RepeatedScalarFieldContainer[bytes] + entitled_keys: _containers.RepeatedCompositeFieldContainer[WidevinePsshData.EntitledKey] + video_feature: str + algorithm: WidevinePsshData.Algorithm provider: str track_type: str - type: WidevinePsshData.Type - video_feature: str + policy: str + grouped_license: bytes def __init__(self, key_ids: _Optional[_Iterable[bytes]] = ..., content_id: _Optional[bytes] = ..., crypto_period_index: _Optional[int] = ..., protection_scheme: _Optional[int] = ..., crypto_period_seconds: _Optional[int] = ..., type: _Optional[_Union[WidevinePsshData.Type, str]] = ..., key_sequence: _Optional[int] = ..., group_ids: _Optional[_Iterable[bytes]] = ..., entitled_keys: _Optional[_Iterable[_Union[WidevinePsshData.EntitledKey, _Mapping]]] = ..., video_feature: _Optional[str] = ..., algorithm: _Optional[_Union[WidevinePsshData.Algorithm, str]] = ..., provider: _Optional[str] = ..., track_type: _Optional[str] = ..., policy: _Optional[str] = ..., grouped_license: _Optional[bytes] = ...) -> None: ... -class LicenseType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - -class PlatformVerificationStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - -class ProtocolVersion(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - -class HashAlgorithmProto(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] +class VmpData(_message.Message): + __slots__ = ("certificates", "signed_binary_info", "cdm_host_files", "cdm_call_chain_files", "current_process_file", "host_file_indexes", "call_chain_file_indexes", "current_process_file_index") + class SignedBinaryInfo(_message.Message): + __slots__ = ("file_name", "certificate_index", "binary_hash", "flags", "signature", "hash_algorithm") + class HashAlgorithmProto(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + HASH_ALGORITHM_UNSPECIFIED: _ClassVar[VmpData.SignedBinaryInfo.HashAlgorithmProto] + HASH_ALGORITHM_SHA_1: _ClassVar[VmpData.SignedBinaryInfo.HashAlgorithmProto] + HASH_ALGORITHM_SHA_256: _ClassVar[VmpData.SignedBinaryInfo.HashAlgorithmProto] + HASH_ALGORITHM_SHA_384: _ClassVar[VmpData.SignedBinaryInfo.HashAlgorithmProto] + HASH_ALGORITHM_UNSPECIFIED: VmpData.SignedBinaryInfo.HashAlgorithmProto + HASH_ALGORITHM_SHA_1: VmpData.SignedBinaryInfo.HashAlgorithmProto + HASH_ALGORITHM_SHA_256: VmpData.SignedBinaryInfo.HashAlgorithmProto + HASH_ALGORITHM_SHA_384: VmpData.SignedBinaryInfo.HashAlgorithmProto + FILE_NAME_FIELD_NUMBER: _ClassVar[int] + CERTIFICATE_INDEX_FIELD_NUMBER: _ClassVar[int] + BINARY_HASH_FIELD_NUMBER: _ClassVar[int] + FLAGS_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + HASH_ALGORITHM_FIELD_NUMBER: _ClassVar[int] + file_name: str + certificate_index: int + binary_hash: bytes + flags: int + signature: bytes + hash_algorithm: VmpData.SignedBinaryInfo.HashAlgorithmProto + def __init__(self, file_name: _Optional[str] = ..., certificate_index: _Optional[int] = ..., binary_hash: _Optional[bytes] = ..., flags: _Optional[int] = ..., signature: _Optional[bytes] = ..., hash_algorithm: _Optional[_Union[VmpData.SignedBinaryInfo.HashAlgorithmProto, str]] = ...) -> None: ... + CERTIFICATES_FIELD_NUMBER: _ClassVar[int] + SIGNED_BINARY_INFO_FIELD_NUMBER: _ClassVar[int] + CDM_HOST_FILES_FIELD_NUMBER: _ClassVar[int] + CDM_CALL_CHAIN_FILES_FIELD_NUMBER: _ClassVar[int] + CURRENT_PROCESS_FILE_FIELD_NUMBER: _ClassVar[int] + HOST_FILE_INDEXES_FIELD_NUMBER: _ClassVar[int] + CALL_CHAIN_FILE_INDEXES_FIELD_NUMBER: _ClassVar[int] + CURRENT_PROCESS_FILE_INDEX_FIELD_NUMBER: _ClassVar[int] + certificates: _containers.RepeatedScalarFieldContainer[bytes] + signed_binary_info: _containers.RepeatedCompositeFieldContainer[VmpData.SignedBinaryInfo] + cdm_host_files: _containers.RepeatedCompositeFieldContainer[VmpData.SignedBinaryInfo] + cdm_call_chain_files: _containers.RepeatedCompositeFieldContainer[VmpData.SignedBinaryInfo] + current_process_file: VmpData.SignedBinaryInfo + host_file_indexes: _containers.RepeatedScalarFieldContainer[int] + call_chain_file_indexes: _containers.RepeatedScalarFieldContainer[int] + current_process_file_index: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, certificates: _Optional[_Iterable[bytes]] = ..., signed_binary_info: _Optional[_Iterable[_Union[VmpData.SignedBinaryInfo, _Mapping]]] = ..., cdm_host_files: _Optional[_Iterable[_Union[VmpData.SignedBinaryInfo, _Mapping]]] = ..., cdm_call_chain_files: _Optional[_Iterable[_Union[VmpData.SignedBinaryInfo, _Mapping]]] = ..., current_process_file: _Optional[_Union[VmpData.SignedBinaryInfo, _Mapping]] = ..., host_file_indexes: _Optional[_Iterable[int]] = ..., call_chain_file_indexes: _Optional[_Iterable[int]] = ..., current_process_file_index: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/pywidevine/main.py b/pywidevine/main.py index bef2dd5..5eca1d1 100644 --- a/pywidevine/main.py +++ b/pywidevine/main.py @@ -14,7 +14,7 @@ from unidecode import UnidecodeError, unidecode from pywidevine import __version__ from pywidevine.cdm import Cdm from pywidevine.device import Device, DeviceTypes -from pywidevine.license_protocol_pb2 import FileHashes, LicenseType +from pywidevine.license_protocol_pb2 import VmpData, LicenseType from pywidevine.pssh import PSSH @@ -169,7 +169,7 @@ def test(ctx: click.Context, device: Path, privacy: bool) -> None: @click.option("-l", "--level", type=click.IntRange(1, 3), required=True, help="Device Security Level") @click.option("-k", "--key", type=Path, required=True, help="Device RSA Private Key in PEM or DER format") @click.option("-c", "--client_id", type=Path, required=True, help="Widevine ClientIdentification Blob file") -@click.option("-v", "--vmp", type=Path, default=None, help="Widevine FileHashes Blob file") +@click.option("-v", "--vmp", type=Path, default=None, help="Widevine VmpData Blob file") @click.option("-o", "--output", type=Path, default=None, help="Output Path or Directory") @click.pass_context def create_device( @@ -247,9 +247,9 @@ def create_device( log.info(" + Private Key: %s (%s bit)", bool(device.private_key), device.private_key.size_in_bits()) log.info(" + Client ID: %s (%s bytes)", bool(device.client_id), len(device.client_id.SerializeToString())) if device.client_id.vmp_data: - file_hashes_ = FileHashes() - file_hashes_.ParseFromString(device.client_id.vmp_data) - log.info(" + VMP: True (%s signatures)", len(file_hashes_.signatures)) + vmp_data_ = VmpData() + vmp_data_.ParseFromString(device.client_id.vmp_data) + log.info(" + VMP: True (%s signatures)", len(vmp_data_.signed_binary_info)) else: log.info(" + VMP: False") log.info(" + Saved to: %s", out_path.absolute()) @@ -329,9 +329,9 @@ def export_device(ctx: click.Context, wvd_path: Path, out_dir: Optional[Path] = if device.client_id.vmp_data: vmp_path = out_path / "vmp.bin" vmp_path.write_bytes(device.client_id.vmp_data) - log.info("Exported VMP (File Hashes) as vmp.bin") + log.info("Exported VMP (VmpData) as vmp.bin") else: - log.info("No VMP (File Hashes) available") + log.info("No VMP (VmpData) available") @main.command()