mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-29 22:24:36 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7ea2a72a8c | ||
![]() |
84d30a69a9 | ||
![]() |
c39dd6df5d | ||
![]() |
94f8eba960 | ||
![]() |
25e03529f6 | ||
![]() |
a04e751aa1 | ||
![]() |
17cefbf1d8 | ||
![]() |
bcb2185f75 | ||
![]() |
532e68aba9 |
2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11.x"
|
||||
python-version: "3.12"
|
||||
- name: Install Poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "3.12"
|
||||
- name: Install poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
@ -27,7 +27,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
@ -37,7 +37,7 @@ jobs:
|
||||
- name: Install poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: 1.5.1 # 1.6.x+ requires Python 3.8+
|
||||
poetry-version: 1.6.1
|
||||
- name: Install project
|
||||
run: poetry install --all-extras --only main
|
||||
- name: Build project
|
||||
|
23
CHANGELOG.md
23
CHANGELOG.md
@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.8.0] - 2023-12-22
|
||||
|
||||
### Added
|
||||
|
||||
- Added `py.typed` file to support PEP561 and silence Mypy.
|
||||
|
||||
### Changed
|
||||
|
||||
- Dropped support for Python 3.7.
|
||||
- Recompiled protobuffers for version 4.25.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Missing `yaml` dependency as it was only installed alongside the `serve` extras group.
|
||||
- Duplicate Concatenated SignedMessages no longer throw a verification failure in `Cdm.set_service_certificate()`.
|
||||
To ensure security of the messages, verification will still fail if any of the SignedMessages do not match each other.
|
||||
|
||||
### New Contributors
|
||||
|
||||
- [sr0lle](https://github.com/sr0lle)
|
||||
|
||||
## [1.7.0] - 2023-11-21
|
||||
|
||||
- Supported Serve API: `v1.4.3` or newer
|
||||
@ -473,6 +494,8 @@ Initial Release.
|
||||
|
||||
- Service Certificate Signatures are unverified as the signing public key is Unknown.
|
||||
|
||||
[1.8.0]: https://github.com/devine-dl/pywidevine/releases/tag/v1.8.0
|
||||
[1.7.0]: https://github.com/devine-dl/pywidevine/releases/tag/v1.7.0
|
||||
[1.6.0]: https://github.com/devine-dl/pywidevine/releases/tag/v1.6.0
|
||||
[1.5.3]: https://github.com/devine-dl/pywidevine/releases/tag/v1.5.3
|
||||
[1.5.2]: https://github.com/devine-dl/pywidevine/releases/tag/v1.5.2
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Development
|
||||
|
||||
This project is managed using [Poetry](https://python-poetry.org), a fantastic Python packaging and dependency manager.
|
||||
Install the latest version of Poetry before continuing. Development currently requires Python 3.7+.
|
||||
Install the latest version of Poetry before continuing. Development currently requires Python 3.8+.
|
||||
|
||||
## Set up
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<img src="https://github.com/devine-dl/pywidevine/actions/workflows/ci.yml/badge.svg" alt="Build status">
|
||||
</a>
|
||||
<a href="https://pypi.org/project/pywidevine">
|
||||
<img src="https://img.shields.io/badge/python-3.7%2B-informational" alt="Python version">
|
||||
<img src="https://img.shields.io/badge/python-3.8%2B-informational" alt="Python version">
|
||||
</a>
|
||||
<a href="https://deepsource.io/gh/devine-dl/pywidevine">
|
||||
<img src="https://deepsource.io/gh/devine-dl/pywidevine.svg/?label=active+issues" alt="DeepSource">
|
||||
@ -151,6 +151,7 @@ making a CDM in C++ has immediate security benefits and a lot of methods to obsc
|
||||
|
||||
<a href="https://github.com/rlaphoenix"><img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/17136956?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt=""/></a>
|
||||
<a href="https://github.com/mediaminister"><img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/45148099?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt=""/></a>
|
||||
<a href="https://github.com/sr0lle"><img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/111277375?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt=""/></a>
|
||||
|
||||
## Licensing
|
||||
|
||||
|
838
poetry.lock
generated
838
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "pywidevine"
|
||||
version = "1.7.0"
|
||||
version = "1.8.0"
|
||||
description = "Widevine CDM (Content Decryption Module) implementation in Python."
|
||||
license = "GPL-3.0-only"
|
||||
authors = ["rlaphoenix <rlaphoenix@pm.me>"]
|
||||
@ -33,28 +33,28 @@ include = [
|
||||
"Changelog" = "https://github.com/devine-dl/pywidevine/blob/master/CHANGELOG.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.7,<4.0"
|
||||
protobuf = "^4.24.4"
|
||||
python = ">=3.8,<4.0"
|
||||
protobuf = "^4.25.1"
|
||||
pymp4 = "^1.4.0"
|
||||
pycryptodome = "^3.19.0"
|
||||
click = "^8.1.7"
|
||||
requests = "^2.31.0"
|
||||
Unidecode = "^1.3.7"
|
||||
PyYAML = "^6.0.1"
|
||||
aiohttp = {version = "^3.8.6", optional = true}
|
||||
aiohttp = {version = "^3.9.1", optional = true}
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pre-commit = "^2.2.1"
|
||||
mypy = "^1.4.1"
|
||||
mypy-protobuf = "^3.4.0"
|
||||
pre-commit = "^3.5.0"
|
||||
mypy = "^1.7.1"
|
||||
mypy-protobuf = "^3.5.0"
|
||||
types-protobuf = "^4.24.0.4"
|
||||
types-requests = "^2.31.0.10"
|
||||
types-PyYAML = "^6.0.12.12"
|
||||
isort = "^5.11.5"
|
||||
ruff = "~0.1.4"
|
||||
isort = "^5.12.0"
|
||||
ruff = "~0.1.7"
|
||||
|
||||
[tool.poetry.extras]
|
||||
serve = ["aiohttp", "PyYAML"]
|
||||
serve = ["aiohttp"]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
pywidevine = "pywidevine.main:main"
|
||||
|
@ -5,4 +5,4 @@ from .pssh import *
|
||||
from .remotecdm import *
|
||||
from .session import *
|
||||
|
||||
__version__ = "1.7.0"
|
||||
__version__ = "1.8.0"
|
||||
|
@ -222,7 +222,11 @@ class Cdm:
|
||||
|
||||
try:
|
||||
signed_message.ParseFromString(certificate)
|
||||
if signed_message.SerializeToString() == certificate:
|
||||
if all(
|
||||
# See https://github.com/devine-dl/pywidevine/issues/41
|
||||
bytes(chunk) == signed_message.SerializeToString()
|
||||
for chunk in zip(*[iter(certificate)] * len(signed_message.SerializeToString()))
|
||||
):
|
||||
signed_drm_certificate.ParseFromString(signed_message.msg)
|
||||
else:
|
||||
signed_drm_certificate.ParseFromString(certificate)
|
||||
|
File diff suppressed because one or more lines are too long
0
pywidevine/py.typed
Normal file
0
pywidevine/py.typed
Normal file
Loading…
x
Reference in New Issue
Block a user