+ SUPPORTS_PR3_FEATURES

This commit is contained in:
BuildTools 2024-11-12 21:07:44 +01:00
parent 811feb9719
commit 2214cb981a
4 changed files with 9 additions and 6 deletions

View File

@ -8,4 +8,4 @@ from .pssh import *
from .xml_key import * from .xml_key import *
from .xmrlicense import * from .xmrlicense import *
__version__ = "0.0.1" __version__ = "0.0.2"

View File

@ -237,9 +237,10 @@ class Certificate(_BCertStructs):
) )
feature = Container( feature = Container(
feature_count=1, feature_count=2,
features=ListContainer([ features=ListContainer([
4 4, # SECURE_CLOCK
13 # SUPPORTS_PR3_FEATURES
]) ])
) )
feature_attribute = Container( feature_attribute = Container(

View File

@ -29,13 +29,15 @@ class Cdm:
certificate_chain: CertificateChain, certificate_chain: CertificateChain,
encryption_key: ECCKey, encryption_key: ECCKey,
signing_key: ECCKey, signing_key: ECCKey,
client_version: str = "10.0.16384.10011" client_version: str = "10.0.16384.10011",
la_version: int = 1
): ):
self.security_level = security_level self.security_level = security_level
self.certificate_chain = certificate_chain self.certificate_chain = certificate_chain
self.encryption_key = encryption_key self.encryption_key = encryption_key
self.signing_key = signing_key self.signing_key = signing_key
self.client_version = client_version self.client_version = client_version
self.la_version = la_version
self.curve = Curve.get_curve("secp256r1") self.curve = Curve.get_curve("secp256r1")
self.elgamal = ElGamal(self.curve) self.elgamal = ElGamal(self.curve)
@ -92,7 +94,7 @@ class Cdm:
) -> str: ) -> str:
return ( return (
'<LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve">' '<LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve">'
'<Version>1</Version>' f'<Version>{self.la_version}</Version>'
f'<ContentHeader>{content_header}</ContentHeader>' f'<ContentHeader>{content_header}</ContentHeader>'
'<CLIENTINFO>' '<CLIENTINFO>'
f'<CLIENTVERSION>{self.client_version}</CLIENTVERSION>' f'<CLIENTVERSION>{self.client_version}</CLIENTVERSION>'

View File

@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry] [tool.poetry]
name = "pyplayready" name = "pyplayready"
version = "0.0.1" version = "0.0.2"
description = "pyplayready CDM (Content Decryption Module) implementation in Python." description = "pyplayready CDM (Content Decryption Module) implementation in Python."
license = "GPL-3.0-only" license = "GPL-3.0-only"
authors = ["DevLARLEY"] authors = ["DevLARLEY"]