diff --git a/extractor/license_protocol.proto b/extractor/license_protocol.proto deleted file mode 100644 index cd2fe4f..0000000 --- a/extractor/license_protocol.proto +++ /dev/null @@ -1,752 +0,0 @@ -syntax = "proto2"; - -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; - // License type decision is left to provider. - AUTOMATIC = 3; -} - -enum PlatformVerificationStatus { - // The platform is not verified. - PLATFORM_UNVERIFIED = 0; - // Tampering detected on the platform. - PLATFORM_TAMPERED = 1; - // The platform has been verified by means of software. - PLATFORM_SOFTWARE_VERIFIED = 2; - // The platform has been verified by means of hardware (e.g. secure boot). - PLATFORM_HARDWARE_VERIFIED = 3; - // Platform verification was not performed. - PLATFORM_NO_VERIFICATION = 4; - // Platform and secure storage capability have been verified by means of - // software. - PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED = 5; -} - -// LicenseIdentification is propagated from LicenseRequest to License, -// incrementing version with each iteration. -message LicenseIdentification { - optional bytes request_id = 1; - optional bytes session_id = 2; - optional bytes purchase_id = 3; - optional LicenseType type = 4; - optional int32 version = 5; - optional bytes provider_session_token = 6; -} - -message License { - message Policy { - // Indicates that playback of the content is allowed. - optional bool can_play = 1 [default = false]; - - // Indicates that the license may be persisted to non-volatile - // storage for offline use. - optional bool can_persist = 2 [default = false]; - - // Indicates that renewal of this license is allowed. - optional bool can_renew = 3 [default = false]; - - // For the |*duration*| fields, playback must halt when - // license_start_time (seconds since the epoch (UTC)) + - // license_duration_seconds is exceeded. A value of 0 - // indicates that there is no limit to the duration. - - // Indicates the rental window. - optional int64 rental_duration_seconds = 4 [default = 0]; - - // Indicates the viewing window, once playback has begun. - optional int64 playback_duration_seconds = 5 [default = 0]; - - // Indicates the time window for this specific license. - optional int64 license_duration_seconds = 6 [default = 0]; - - // The |renewal*| fields only apply if |can_renew| is true. - - // The window of time, in which playback is allowed to continue while - // renewal is attempted, yet unsuccessful due to backend problems with - // the license server. - optional int64 renewal_recovery_duration_seconds = 7 [default = 0]; - - // All renewal requests for this license shall be directed to the - // specified URL. - optional string renewal_server_url = 8; - - // How many seconds after license_start_time, before renewal is first - // attempted. - optional int64 renewal_delay_seconds = 9 [default = 0]; - - // Specifies the delay in seconds between subsequent license - // renewal requests, in case of failure. - optional int64 renewal_retry_interval_seconds = 10 [default = 0]; - - // Indicates that the license shall be sent for renewal when usage is - // started. - optional bool renew_with_usage = 11 [default = false]; - - // Indicates to client that license renewal and release requests ought to - // include ClientIdentification (client_id). - optional bool always_include_client_id = 12 [default = false]; - - // Duration of grace period before playback_duration_seconds (short window) - // goes into effect. Optional. - optional int64 play_start_grace_period_seconds = 13 [default = 0]; - - // Enables "soft enforcement" of playback_duration_seconds, letting the user - // finish playback even if short window expires. Optional. - optional bool soft_enforce_playback_duration = 14 [default = false]; - - // Enables "soft enforcement" of rental_duration_seconds. Initial playback - // must always start before rental duration expires. In order to allow - // subsequent playbacks to start after the rental duration expires, - // soft_enforce_playback_duration must be true. Otherwise, subsequent - // playbacks will not be allowed once rental duration expires. Optional. - optional bool soft_enforce_rental_duration = 15 [default = true]; - } - - message KeyContainer { - enum KeyType { - SIGNING = 1; // Exactly one key of this type must appear. - CONTENT = 2; // Content key. - KEY_CONTROL = 3; // Key control block for license renewals. No key. - OPERATOR_SESSION = 4; // wrapped keys for auxiliary crypto operations. - ENTITLEMENT = 5; // Entitlement keys. - OEM_CONTENT = 6; // Partner-specific content key. - } - - // The SecurityLevel enumeration allows the server to communicate the level - // of robustness required by the client, in order to use the key. - enum SecurityLevel { - // Software-based whitebox crypto is required. - SW_SECURE_CRYPTO = 1; - - // Software crypto and an obfuscated decoder is required. - SW_SECURE_DECODE = 2; - - // The key material and crypto operations must be performed within a - // hardware backed trusted execution environment. - HW_SECURE_CRYPTO = 3; - - // The crypto and decoding of content must be performed within a hardware - // backed trusted execution environment. - HW_SECURE_DECODE = 4; - - // The crypto, decoding and all handling of the media (compressed and - // uncompressed) must be handled within a hardware backed trusted - // execution environment. - HW_SECURE_ALL = 5; - } - - message KeyControl { - // |key_control| is documented in: - // Widevine Modular DRM Security Integration Guide for CENC - // If present, the key control must be communicated to the secure - // environment prior to any usage. This message is automatically generated - // by the Widevine License Server SDK. - optional bytes key_control_block = 1; - optional bytes iv = 2; - } - - message OutputProtection { - // Indicates whether HDCP is required on digital outputs, and which - // version should be used. - enum HDCP { - HDCP_NONE = 0; - HDCP_V1 = 1; - HDCP_V2 = 2; - HDCP_V2_1 = 3; - HDCP_V2_2 = 4; - HDCP_V2_3 = 5; - HDCP_NO_DIGITAL_OUTPUT = 0xff; - } - optional HDCP hdcp = 1 [default = HDCP_NONE]; - - // Indicate the CGMS setting to be inserted on analog output. - enum CGMS { - CGMS_NONE = 42; - COPY_FREE = 0; - COPY_ONCE = 2; - COPY_NEVER = 3; - } - optional CGMS cgms_flags = 2 [default = CGMS_NONE]; - - enum HdcpSrmRule { - HDCP_SRM_RULE_NONE = 0; - // In 'required_protection', this means most current SRM is required. - // Update the SRM on the device. If update cannot happen, - // do not allow the key. - // In 'requested_protection', this means most current SRM is requested. - // Update the SRM on the device. If update cannot happen, - // allow use of the key anyway. - CURRENT_SRM = 1; - } - optional HdcpSrmRule hdcp_srm_rule = 3 [default = HDCP_SRM_RULE_NONE]; - // Optional requirement to indicate analog output is not allowed. - optional bool disable_analog_output = 4 [default = false]; - // Optional requirement to indicate digital output is not allowed. - optional bool disable_digital_output = 5 [default = false]; - } - - message VideoResolutionConstraint { - // Minimum and maximum video resolutions in the range (height x width). - optional uint32 min_resolution_pixels = 1; - optional uint32 max_resolution_pixels = 2; - // Optional output protection requirements for this range. If not - // specified, the OutputProtection in the KeyContainer applies. - optional OutputProtection required_protection = 3; - } - - message OperatorSessionKeyPermissions { - // Permissions/key usage flags for operator service keys - // (type = OPERATOR_SESSION). - optional bool allow_encrypt = 1 [default = false]; - optional bool allow_decrypt = 2 [default = false]; - optional bool allow_sign = 3 [default = false]; - optional bool allow_signature_verify = 4 [default = false]; - } - - optional bytes id = 1; - optional bytes iv = 2; - optional bytes key = 3; - optional KeyType type = 4; - optional SecurityLevel level = 5 [default = SW_SECURE_CRYPTO]; - optional OutputProtection required_protection = 6; - // NOTE: Use of requested_protection is not recommended as it is only - // supported on a small number of platforms. - optional OutputProtection requested_protection = 7; - optional KeyControl key_control = 8; - optional OperatorSessionKeyPermissions operator_session_key_permissions = 9; - // Optional video resolution constraints. If the video resolution of the - // content being decrypted/decoded falls within one of the specified ranges, - // the optional required_protections may be applied. Otherwise an error will - // be reported. - // NOTE: Use of this feature is not recommended, as it is only supported on - // a small number of platforms. - repeated VideoResolutionConstraint video_resolution_constraints = 10; - // Optional flag to indicate the key must only be used if the client - // supports anti rollback of the user table. Content provider can query the - // client capabilities to determine if the client support this feature. - optional bool anti_rollback_usage_table = 11 [default = false]; - // Optional not limited to commonly known track types such as SD, HD. - // It can be some provider defined label to identify the track. - optional string track_label = 12; - } - - optional LicenseIdentification id = 1; - optional Policy policy = 2; - repeated KeyContainer key = 3; - // Time of the request in seconds (UTC) as set in - // LicenseRequest.request_time. If this time is not set in the request, - // the local time at the license service is used in this field. - optional int64 license_start_time = 4; - optional bool remote_attestation_verified = 5 [default = false]; - // Client token generated by the content provider. Optional. - optional bytes provider_client_token = 6; - // 4cc code specifying the CENC protection scheme as defined in the CENC 3.0 - // specification. Propagated from Widevine PSSH box. Optional. - optional uint32 protection_scheme = 7; - // 8 byte verification field "HDCPDATA" followed by unsigned 32 bit minimum - // HDCP SRM version (whether the version is for HDCP1 SRM or HDCP2 SRM - // depends on client max_hdcp_version). - // Additional details can be found in Widevine Modular DRM Security - // Integration Guide for CENC. - optional bytes srm_requirement = 8; - // If present this contains a signed SRM file (either HDCP1 SRM or HDCP2 SRM - // depending on client max_hdcp_version) that should be installed on the - // client device. - optional bytes srm_update = 9; - // Indicates the status of any type of platform verification performed by the - // server. - optional PlatformVerificationStatus platform_verification_status = 10 - [default = PLATFORM_NO_VERIFICATION]; - // IDs of the groups for which keys are delivered in this license, if any. - repeated bytes group_ids = 11; -} - -enum ProtocolVersion { - VERSION_2_0 = 20; - VERSION_2_1 = 21; - VERSION_2_2 = 22; -} - -message LicenseRequest { - message ContentIdentification { - message WidevinePsshData { - repeated bytes pssh_data = 1; - optional LicenseType license_type = 2; - optional bytes request_id = 3; // Opaque, client-specified. - } - - message WebmKeyId { - optional bytes header = 1; - optional LicenseType license_type = 2; - optional bytes request_id = 3; // Opaque, client-specified. - } - - message ExistingLicense { - optional LicenseIdentification license_id = 1; - optional int64 seconds_since_started = 2; - optional int64 seconds_since_last_played = 3; - optional bytes session_usage_table_entry = 4; - } - - message InitData { - enum InitDataType { - CENC = 1; - WEBM = 2; - } - - optional InitDataType init_data_type = 1 [default = CENC]; - optional bytes init_data = 2; - optional LicenseType license_type = 3; - optional bytes request_id = 4; - } - - oneof content_id_variant { - // Exactly one of these must be present. - WidevinePsshData widevine_pssh_data = 1; - WebmKeyId webm_key_id = 2; - ExistingLicense existing_license = 3; - InitData init_data = 4; - } - } - - enum RequestType { - NEW = 1; - RENEWAL = 2; - RELEASE = 3; - } - - // The client_id provides information authenticating the calling device. It - // contains the Widevine keybox token that was installed on the device at the - // factory. This field or encrypted_client_id below is required for a valid - // license request, but both should never be present in the same request. - optional ClientIdentification client_id = 1; - optional ContentIdentification content_id = 2; - optional RequestType type = 3; - // Time of the request in seconds (UTC) as set by the client. - optional int64 request_time = 4; - // Old-style decimal-encoded string key control nonce. - optional bytes key_control_nonce_deprecated = 5; - optional ProtocolVersion protocol_version = 6 [default = VERSION_2_0]; - // New-style uint32 key control nonce, please use instead of - // key_control_nonce_deprecated. - optional uint32 key_control_nonce = 7; - // Encrypted ClientIdentification message, used for privacy purposes. - optional EncryptedClientIdentification encrypted_client_id = 8; -} - -message MetricData { - enum MetricType { - // The time spent in the 'stage', specified in microseconds. - LATENCY = 1; - // The UNIX epoch timestamp at which the 'stage' was first accessed in - // microseconds. - TIMESTAMP = 2; - } - - message TypeValue { - optional MetricType type = 1; - // The value associated with 'type'. For example if type == LATENCY, the - // value would be the time in microseconds spent in this 'stage'. - optional int64 value = 2 [default = 0]; - } - - // 'stage' that is currently processing the SignedMessage. Required. - optional string stage_name = 1; - // metric and associated value. - repeated TypeValue metric_data = 2; -} - -message VersionInfo { - // License SDK version reported by the Widevine License SDK. This field - // is populated automatically by the SDK. - optional string license_sdk_version = 1; - // Version of the service hosting the license SDK. This field is optional. - // It may be provided by the hosting service. - optional string license_service_version = 2; -} - -message SignedMessage { - enum MessageType { - LICENSE_REQUEST = 1; - LICENSE = 2; - ERROR_RESPONSE = 3; - SERVICE_CERTIFICATE_REQUEST = 4; - SERVICE_CERTIFICATE = 5; - SUB_LICENSE = 6; - CAS_LICENSE_REQUEST = 7; - CAS_LICENSE = 8; - EXTERNAL_LICENSE_REQUEST = 9; - EXTERNAL_LICENSE = 10; - } - - enum SessionKeyType { - UNDEFINED = 0; - WRAPPED_AES_KEY = 1; - EPHERMERAL_ECC_PUBLIC_KEY = 2; - } - optional MessageType type = 1; - optional bytes msg = 2; - // Required field that contains the signature of the bytes of msg. - // For license requests, the signing algorithm is determined by the - // certificate contained in the request. - // For license responses, the signing algorithm is HMAC with signing key based - // on |session_key|. - optional bytes signature = 3; - // If populated, the contents of this field will be signaled by the - // |session_key_type| type. If the |session_key_type| is WRAPPED_AES_KEY the - // key is the bytes of an encrypted AES key. If the |session_key_type| is - // EPHERMERAL_ECC_PUBLIC_KEY the field contains the bytes of an RFC5208 ASN1 - // serialized ECC public key. - optional bytes session_key = 4; - // Remote attestation data which will be present in the initial license - // request for ChromeOS client devices operating in verified mode. Remote - // attestation challenge data is |msg| field above. Optional. - optional bytes remote_attestation = 5; - - repeated MetricData metric_data = 6; - // Version information from the SDK and license service. This information is - // provided in the license response. - optional VersionInfo service_version_info = 7; - // Optional field that contains the algorithm type used to generate the - // session_key and signature in a LICENSE message. - optional SessionKeyType session_key_type = 8 [default = WRAPPED_AES_KEY]; - // The core message is the simple serialization of fields used by OEMCrypto. - // This field was introduced in OEMCrypto API v16. - optional bytes oemcrypto_core_message = 9; -} - -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; -} - -// ClientIdentification message used to authenticate the client device. -message ClientIdentification { - enum TokenType { - KEYBOX = 0; - DRM_DEVICE_CERTIFICATE = 1; - REMOTE_ATTESTATION_CERTIFICATE = 2; - OEM_DEVICE_CERTIFICATE = 3; - } - - message NameValue { - optional string name = 1; - optional string value = 2; - } - - // Capabilities which not all clients may support. Used for the license - // exchange protocol only. - message ClientCapabilities { - enum HdcpVersion { - HDCP_NONE = 0; - HDCP_V1 = 1; - HDCP_V2 = 2; - HDCP_V2_1 = 3; - HDCP_V2_2 = 4; - HDCP_V2_3 = 5; - HDCP_NO_DIGITAL_OUTPUT = 0xff; - } - - enum CertificateKeyType { - RSA_2048 = 0; - RSA_3072 = 1; - ECC_SECP256R1 = 2; - ECC_SECP384R1 = 3; - ECC_SECP521R1 = 4; - } - - enum AnalogOutputCapabilities { - ANALOG_OUTPUT_UNKNOWN = 0; - ANALOG_OUTPUT_NONE = 1; - ANALOG_OUTPUT_SUPPORTED = 2; - ANALOG_OUTPUT_SUPPORTS_CGMS_A = 3; - } - - optional bool client_token = 1 [default = false]; - optional bool session_token = 2 [default = false]; - optional bool video_resolution_constraints = 3 [default = false]; - optional HdcpVersion max_hdcp_version = 4 [default = HDCP_NONE]; - optional uint32 oem_crypto_api_version = 5; - // Client has hardware support for protecting the usage table, such as - // storing the generation number in secure memory. For Details, see: - // Widevine Modular DRM Security Integration Guide for CENC - optional bool anti_rollback_usage_table = 6 [default = false]; - // The client shall report |srm_version| if available. - optional uint32 srm_version = 7; - // A device may have SRM data, and report a version, but may not be capable - // of updating SRM data. - optional bool can_update_srm = 8 [default = false]; - repeated CertificateKeyType supported_certificate_key_type = 9; - optional AnalogOutputCapabilities analog_output_capabilities = 10 - [default = ANALOG_OUTPUT_UNKNOWN]; - optional bool can_disable_analog_output = 11 [default = false]; - // Clients can indicate a performance level supported by OEMCrypto. - // This will allow applications and providers to choose an appropriate - // quality of content to serve. Currently defined tiers are - // 1 (low), 2 (medium) and 3 (high). Any other value indicates that - // the resource rating is unavailable or reporting erroneous values - // for that device. For details see, - // Widevine Modular DRM Security Integration Guide for CENC - optional uint32 resource_rating_tier = 12 [default = 0]; - } - - message ClientCredentials { - optional TokenType type = 1 [default = KEYBOX]; - optional bytes token = 2; - } - - // Type of factory-provisioned device root of trust. Optional. - optional TokenType type = 1 [default = KEYBOX]; - // Factory-provisioned device root of trust. Required. - optional bytes token = 2; - // Optional client information name/value pairs. - repeated NameValue client_info = 3; - // Client token generated by the content provider. Optional. - optional bytes provider_client_token = 4; - // Number of licenses received by the client to which the token above belongs. - // Only present if client_token is specified. - optional uint32 license_counter = 5; - // List of non-baseline client capabilities. - optional ClientCapabilities client_capabilities = 6; - // Serialized VmpData message. Optional. - optional bytes vmp_data = 7; - // Optional field that may contain additional provisioning credentials. - repeated ClientCredentials device_credentials = 8; -} - -// EncryptedClientIdentification message used to hold ClientIdentification -// messages encrypted for privacy purposes. -message EncryptedClientIdentification { - // Provider ID for which the ClientIdentifcation is encrypted (owner of - // service certificate). - optional string provider_id = 1; - // Serial number for the service certificate for which ClientIdentification is - // encrypted. - optional bytes service_certificate_serial_number = 2; - // Serialized ClientIdentification message, encrypted with the privacy key - // using AES-128-CBC with PKCS#5 padding. - optional bytes encrypted_client_id = 3; - // Initialization vector needed to decrypt encrypted_client_id. - optional bytes encrypted_client_id_iv = 4; - // AES-128 privacy key, encrypted with the service public key using RSA-OAEP. - optional bytes encrypted_privacy_key = 5; -} - -// DRM certificate definition for user devices, intermediate, service, and root -// certificates. -message DrmCertificate { - enum Type { - ROOT = 0; // ProtoBestPractices: ignore. - DEVICE_MODEL = 1; - DEVICE = 2; - SERVICE = 3; - PROVISIONER = 4; - } - enum ServiceType { - UNKNOWN_SERVICE_TYPE = 0; - LICENSE_SERVER_SDK = 1; - LICENSE_SERVER_PROXY_SDK = 2; - PROVISIONING_SDK = 3; - CAS_PROXY_SDK = 4; - } - enum Algorithm { - UNKNOWN_ALGORITHM = 0; - RSA = 1; - ECC_SECP256R1 = 2; - ECC_SECP384R1 = 3; - ECC_SECP521R1 = 4; - } - - message EncryptionKey { - // Device public key. PKCS#1 ASN.1 DER-encoded. Required. - optional bytes public_key = 1; - // Required. The algorithm field contains the curve used to create the - // |public_key| if algorithm is one of the ECC types. - // The |algorithm| is used for both to determine the if the certificate is - // ECC or RSA. The |algorithm| also specifies the parameters that were used - // to create |public_key| and are used to create an ephemeral session key. - optional Algorithm algorithm = 2 [default = RSA]; - } - - // Type of certificate. Required. - optional Type type = 1; - // 128-bit globally unique serial number of certificate. - // Value is 0 for root certificate. Required. - optional bytes serial_number = 2; - // POSIX time, in seconds, when the certificate was created. Required. - optional uint32 creation_time_seconds = 3; - // POSIX time, in seconds, when the certificate should expire. Value of zero - // denotes indefinite expiry time. For more information on limited lifespan - // DRM certificates see (go/limited-lifespan-drm-certificates). - optional uint32 expiration_time_seconds = 12; - // Device public key. PKCS#1 ASN.1 DER-encoded. Required. - optional bytes public_key = 4; - // Widevine system ID for the device. Required for intermediate and - // user device certificates. - optional uint32 system_id = 5; - // Deprecated field, which used to indicate whether the device was a test - // (non-production) device. The test_device field in ProvisionedDeviceInfo - // below should be observed instead. - optional bool test_device_deprecated = 6 [deprecated = true]; - // Service identifier (web origin) for the provider which owns the - // certificate. Required for service and provisioner certificates. - optional string provider_id = 7; - // This field is used only when type = SERVICE to specify which SDK uses - // service certificate. This repeated field is treated as a set. A certificate - // may be used for the specified service SDK if the appropriate ServiceType - // is specified in this field. - repeated ServiceType service_types = 8; - // Required. The algorithm field contains the curve used to create the - // |public_key| if algorithm is one of the ECC types. - // The |algorithm| is used for both to determine the if the certificate is ECC - // or RSA. The |algorithm| also specifies the parameters that were used to - // create |public_key| and are used to create an ephemeral session key. - optional Algorithm algorithm = 9 [default = RSA]; - // Optional. May be present in DEVICE certificate types. This is the root - // of trust identifier that holds an encrypted value that identifies the - // keybox or other root of trust that was used to provision a DEVICE drm - // certificate. - optional bytes rot_id = 10; - // Optional. May be present in devices that explicitly support dual keys. When - // present the |public_key| is used for verification of received license - // request messages. - optional EncryptionKey encryption_key = 11; -} - -// DrmCertificate signed by a higher (CA) DRM certificate. -message SignedDrmCertificate { - // Serialized certificate. Required. - optional bytes drm_certificate = 1; - // Signature of certificate. Signed with root or intermediate - // certificate specified below. Required. - optional bytes signature = 2; - // SignedDrmCertificate used to sign this certificate. - optional SignedDrmCertificate signer = 3; - // Optional field that indicates the hash algorithm used in signature scheme. - optional HashAlgorithmProto hash_algorithm = 4; -} - -message WidevinePsshData { - enum Type { - SINGLE = 0; // Single PSSH to be used to retrieve content keys. - ENTITLEMENT = 1; // Primary PSSH used to retrieve entitlement keys. - ENTITLED_KEY = 2; // Secondary PSSH containing entitled key(s). - } - - message EntitledKey { - // ID of entitlement key used for wrapping |key|. - optional bytes entitlement_key_id = 1; - // ID of the entitled key. - optional bytes key_id = 2; - // Wrapped key. Required. - optional bytes key = 3; - // IV used for wrapping |key|. Required. - optional bytes iv = 4; - // Size of entitlement key used for wrapping |key|. - optional uint32 entitlement_key_size_bytes = 5 [default = 32]; - } - - // Entitlement or content key IDs. Can onnly present in SINGLE or ENTITLEMENT - // PSSHs. May be repeated to facilitate delivery of multiple keys in a - // single license. Cannot be used in conjunction with content_id or - // group_ids, which are the preferred mechanism. - repeated bytes key_ids = 2; - - // Content identifier which may map to multiple entitlement or content key - // IDs to facilitate the delivery of multiple keys in a single license. - // Cannot be present in conjunction with key_ids, but if used must be in all - // PSSHs. - optional bytes content_id = 4; - - // Crypto period index, for media using key rotation. Always corresponds to - // The content key period. This means that if using entitlement licensing - // the ENTITLED_KEY PSSHs will have sequential crypto_period_index's, whereas - // the ENTITELEMENT PSSHs will have gaps in the sequence. Required if doing - // key rotation. - optional uint32 crypto_period_index = 7; - - // Protection scheme identifying the encryption algorithm. The protection - // scheme is represented as a uint32 value. The uint32 contains 4 bytes each - // representing a single ascii character in one of the 4CC protection scheme - // values. To be deprecated in favor of signaling from content. - // 'cenc' (AES-CTR) protection_scheme = 0x63656E63, - // 'cbc1' (AES-CBC) protection_scheme = 0x63626331, - // 'cens' (AES-CTR pattern encryption) protection_scheme = 0x63656E73, - // 'cbcs' (AES-CBC pattern encryption) protection_scheme = 0x63626373. - optional uint32 protection_scheme = 9; - - // Optional. For media using key rotation, this represents the duration - // of each crypto period in seconds. - optional uint32 crypto_period_seconds = 10; - - // Type of PSSH. Required if not SINGLE. - optional Type type = 11 [default = SINGLE]; - - // Key sequence for Widevine-managed keys. Optional. - optional uint32 key_sequence = 12; - - // Group identifiers for all groups to which the content belongs. This can - // be used to deliver licenses to unlock multiple titles / channels. - // Optional, and may only be present in ENTITLEMENT and ENTITLED_KEY PSSHs, and - // not in conjunction with key_ids. - repeated bytes group_ids = 13; - - // Copy/copies of the content key used to decrypt the media stream in which - // the PSSH box is embedded, each wrapped with a different entitlement key. - // May also contain sub-licenses to support devices with OEMCrypto 13 or - // older. May be repeated if using group entitlement keys. Present only in - // PSSHs of type ENTITLED_KEY. - repeated EntitledKey entitled_keys = 14; - - // Video feature identifier, which is used in conjunction with |content_id| - // to determine the set of keys to be returned in the license. Cannot be - // present in conjunction with |key_ids|. - // Current values are "HDR". - optional string video_feature = 15; - - //////////////////////////// Deprecated Fields //////////////////////////// - enum Algorithm { - UNENCRYPTED = 0; - AESCTR = 1; - }; - optional Algorithm algorithm = 1 [deprecated = true]; - - // Content provider name. - optional string provider = 3 [deprecated = true]; - - // Track type. Acceptable values are SD, HD and AUDIO. Used to - // differentiate content keys used by an asset. - optional string track_type = 5 [deprecated = true]; - - // The name of a registered policy to be used for this asset. - optional string policy = 6 [deprecated = true]; - - // Optional protected context for group content. The grouped_license is a - // serialized SignedMessage. - 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 - optional bytes signature = 5; - } - optional bytes signer = 1; - repeated Signature signatures = 2; -} diff --git a/extractor/license_protocol_pb2.py b/extractor/license_protocol_pb2.py deleted file mode 100644 index 92ae262..0000000 --- a/extractor/license_protocol_pb2.py +++ /dev/null @@ -1,143 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: license_protocol.proto -# Protobuf Python Version: 4.25.1 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_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') - -_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 - _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']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['provider']._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']._serialized_options = b'\030\001' - _globals['_WIDEVINEPSSHDATA'].fields_by_name['policy']._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']._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['_LICENSEIDENTIFICATION']._serialized_start=56 - _globals['_LICENSEIDENTIFICATION']._serialized_end=245 - _globals['_LICENSE']._serialized_start=248 - _globals['_LICENSE']._serialized_end=3433 - _globals['_LICENSE_POLICY']._serialized_start=764 - _globals['_LICENSE_POLICY']._serialized_end=1322 - _globals['_LICENSE_KEYCONTAINER']._serialized_start=1325 - _globals['_LICENSE_KEYCONTAINER']._serialized_end=3433 - _globals['_LICENSE_KEYCONTAINER_KEYCONTROL']._serialized_start=2128 - _globals['_LICENSE_KEYCONTAINER_KEYCONTROL']._serialized_end=2179 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION']._serialized_start=2182 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION']._serialized_end=2850 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_HDCP']._serialized_start=2604 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_HDCP']._serialized_end=2725 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_CGMS']._serialized_start=2727 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_CGMS']._serialized_end=2794 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_HDCPSRMRULE']._serialized_start=2796 - _globals['_LICENSE_KEYCONTAINER_OUTPUTPROTECTION_HDCPSRMRULE']._serialized_end=2850 - _globals['_LICENSE_KEYCONTAINER_VIDEORESOLUTIONCONSTRAINT']._serialized_start=2853 - _globals['_LICENSE_KEYCONTAINER_VIDEORESOLUTIONCONSTRAINT']._serialized_end=3039 - _globals['_LICENSE_KEYCONTAINER_OPERATORSESSIONKEYPERMISSIONS']._serialized_start=3042 - _globals['_LICENSE_KEYCONTAINER_OPERATORSESSIONKEYPERMISSIONS']._serialized_end=3199 - _globals['_LICENSE_KEYCONTAINER_KEYTYPE']._serialized_start=3201 - _globals['_LICENSE_KEYCONTAINER_KEYTYPE']._serialized_end=3309 - _globals['_LICENSE_KEYCONTAINER_SECURITYLEVEL']._serialized_start=3311 - _globals['_LICENSE_KEYCONTAINER_SECURITYLEVEL']._serialized_end=3433 - _globals['_LICENSEREQUEST']._serialized_start=3436 - _globals['_LICENSEREQUEST']._serialized_end=5161 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION']._serialized_start=3944 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION']._serialized_end=5111 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_WIDEVINEPSSHDATA']._serialized_start=4391 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_WIDEVINEPSSHDATA']._serialized_end=4512 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_WEBMKEYID']._serialized_start=4514 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_WEBMKEYID']._serialized_end=4625 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_EXISTINGLICENSE']._serialized_start=4628 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_EXISTINGLICENSE']._serialized_end=4818 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_INITDATA']._serialized_start=4821 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_INITDATA']._serialized_end=5089 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_INITDATA_INITDATATYPE']._serialized_start=5055 - _globals['_LICENSEREQUEST_CONTENTIDENTIFICATION_INITDATA_INITDATATYPE']._serialized_end=5089 - _globals['_LICENSEREQUEST_REQUESTTYPE']._serialized_start=5113 - _globals['_LICENSEREQUEST_REQUESTTYPE']._serialized_end=5161 - _globals['_METRICDATA']._serialized_start=5164 - _globals['_METRICDATA']._serialized_end=5407 - _globals['_METRICDATA_TYPEVALUE']._serialized_start=5270 - _globals['_METRICDATA_TYPEVALUE']._serialized_end=5365 - _globals['_METRICDATA_METRICTYPE']._serialized_start=5367 - _globals['_METRICDATA_METRICTYPE']._serialized_end=5407 - _globals['_VERSIONINFO']._serialized_start=5409 - _globals['_VERSIONINFO']._serialized_end=5484 - _globals['_SIGNEDMESSAGE']._serialized_start=5487 - _globals['_SIGNEDMESSAGE']._serialized_end=6245 - _globals['_SIGNEDMESSAGE_MESSAGETYPE']._serialized_start=5924 - _globals['_SIGNEDMESSAGE_MESSAGETYPE']._serialized_end=6160 - _globals['_SIGNEDMESSAGE_SESSIONKEYTYPE']._serialized_start=6162 - _globals['_SIGNEDMESSAGE_SESSIONKEYTYPE']._serialized_end=6245 - _globals['_CLIENTIDENTIFICATION']._serialized_start=6248 - _globals['_CLIENTIDENTIFICATION']._serialized_end=8111 - _globals['_CLIENTIDENTIFICATION_NAMEVALUE']._serialized_start=6722 - _globals['_CLIENTIDENTIFICATION_NAMEVALUE']._serialized_end=6762 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES']._serialized_start=6765 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES']._serialized_end=7875 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_HDCPVERSION']._serialized_start=7496 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_HDCPVERSION']._serialized_end=7624 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_CERTIFICATEKEYTYPE']._serialized_start=7626 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_CERTIFICATEKEYTYPE']._serialized_end=7731 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_ANALOGOUTPUTCAPABILITIES']._serialized_start=7734 - _globals['_CLIENTIDENTIFICATION_CLIENTCAPABILITIES_ANALOGOUTPUTCAPABILITIES']._serialized_end=7875 - _globals['_CLIENTIDENTIFICATION_CLIENTCREDENTIALS']._serialized_start=7877 - _globals['_CLIENTIDENTIFICATION_CLIENTCREDENTIALS']._serialized_end=7994 - _globals['_CLIENTIDENTIFICATION_TOKENTYPE']._serialized_start=7996 - _globals['_CLIENTIDENTIFICATION_TOKENTYPE']._serialized_end=8111 - _globals['_ENCRYPTEDCLIENTIDENTIFICATION']._serialized_start=8114 - _globals['_ENCRYPTEDCLIENTIDENTIFICATION']._serialized_end=8301 - _globals['_DRMCERTIFICATE']._serialized_start=8304 - _globals['_DRMCERTIFICATE']._serialized_end=9258 - _globals['_DRMCERTIFICATE_ENCRYPTIONKEY']._serialized_start=8827 - _globals['_DRMCERTIFICATE_ENCRYPTIONKEY']._serialized_end=8941 - _globals['_DRMCERTIFICATE_TYPE']._serialized_start=8943 - _globals['_DRMCERTIFICATE_TYPE']._serialized_end=9019 - _globals['_DRMCERTIFICATE_SERVICETYPE']._serialized_start=9022 - _globals['_DRMCERTIFICATE_SERVICETYPE']._serialized_end=9156 - _globals['_DRMCERTIFICATE_ALGORITHM']._serialized_start=9158 - _globals['_DRMCERTIFICATE_ALGORITHM']._serialized_end=9258 - _globals['_SIGNEDDRMCERTIFICATE']._serialized_start=9261 - _globals['_SIGNEDDRMCERTIFICATE']._serialized_end=9467 - _globals['_WIDEVINEPSSHDATA']._serialized_start=9470 - _globals['_WIDEVINEPSSHDATA']._serialized_end=10228 - _globals['_WIDEVINEPSSHDATA_ENTITLEDKEY']._serialized_start=10009 - _globals['_WIDEVINEPSSHDATA_ENTITLEDKEY']._serialized_end=10131 - _globals['_WIDEVINEPSSHDATA_TYPE']._serialized_start=10133 - _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 -# @@protoc_insertion_point(module_scope) diff --git a/extractor/license_protocol_pb2.pyi b/extractor/license_protocol_pb2.pyi deleted file mode 100644 index 44f543e..0000000 --- a/extractor/license_protocol_pb2.pyi +++ /dev/null @@ -1,607 +0,0 @@ -# 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 -OFFLINE: LicenseType -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 - -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] - 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: ... - -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"] - 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"] - class KeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class SecurityLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class KeyControl(_message.Message): - __slots__ = ["iv", "key_control_block"] - IV_FIELD_NUMBER: _ClassVar[int] - KEY_CONTROL_BLOCK_FIELD_NUMBER: _ClassVar[int] - iv: bytes - key_control_block: 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__ = [] - 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] - 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 - cgms_flags: License.KeyContainer.OutputProtection.CGMS - 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] - MIN_RESOLUTION_PIXELS_FIELD_NUMBER: _ClassVar[int] - REQUIRED_PROTECTION_FIELD_NUMBER: _ClassVar[int] - max_resolution_pixels: int - min_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 - 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] - VIDEO_RESOLUTION_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - anti_rollback_usage_table: bool - 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 - video_resolution_constraints: _containers.RepeatedCompositeFieldContainer[License.KeyContainer.VideoResolutionConstraint] - 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] - 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] - SRM_REQUIREMENT_FIELD_NUMBER: _ClassVar[int] - SRM_UPDATE_FIELD_NUMBER: _ClassVar[int] - group_ids: _containers.RepeatedScalarFieldContainer[bytes] - id: LicenseIdentification - 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 - srm_requirement: bytes - srm_update: 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"] - class RequestType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - 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] - 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 - 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: ... - class WebmKeyId(_message.Message): - __slots__ = ["header", "license_type", "request_id"] - HEADER_FIELD_NUMBER: _ClassVar[int] - LICENSE_TYPE_FIELD_NUMBER: _ClassVar[int] - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - header: bytes - 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"] - LICENSE_TYPE_FIELD_NUMBER: _ClassVar[int] - PSSH_DATA_FIELD_NUMBER: _ClassVar[int] - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - 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: ... - 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] - 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] - client_id: ClientIdentification - content_id: LicenseRequest.ContentIdentification - encrypted_client_id: EncryptedClientIdentification - key_control_nonce: int - key_control_nonce_deprecated: bytes - protocol_version: ProtocolVersion - request_time: int - type: LicenseRequest.RequestType - 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"] - class MetricType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - class TypeValue(_message.Message): - __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] - stage_name: str - 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"] - 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 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 - ALGORITHM_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] - TYPE_FIELD_NUMBER: _ClassVar[int] - UNENCRYPTED: WidevinePsshData.Algorithm - VIDEO_FEATURE_FIELD_NUMBER: _ClassVar[int] - algorithm: WidevinePsshData.Algorithm - 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 - provider: str - track_type: str - type: WidevinePsshData.Type - video_feature: str - 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__ = [] diff --git a/requirements.txt b/requirements.txt index 61f4dd7..bdd3adf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,8 @@ -frida~=16.1.4 +frida~=16.2.5 pathlib~=1.0.1 coloredlogs~=15.0.1 pycryptodomex~=3.20.0 -protobuf~=4.25.1 -xmltodict~=0.13.0 \ No newline at end of file +xmltodict~=0.13.0 +PyYAML~=6.0.1 +Flask~=3.0.3 +pywidevine~=1.8.0 \ No newline at end of file