1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
From: Alexis Murzeau <amubtdx@gmail.com>
Date: Fri, 23 Aug 2019 18:54:27 +0200
Subject: Use pycrytodomex instead of pycryptodome
Streamlink use features specific to pycryptodome which are not available
in python3-crypto package. Only pycryptodomex python module is available
in Debian, so replace the use of pycrytodome with pycrytodomex.
Related bug python3-pycryptodome: #886291: python3-pycryptodome contains
pycryptodomex instead of pycryptodome.
Forwarded: not-needed
Author: Alexis Murzeau <amubtdx@gmail.com>
---
setup.cfg | 2 +-
src/streamlink.egg-info/requires.txt | 2 +-
src/streamlink/plugins/abematv.py | 2 +-
src/streamlink/plugins/mjunoon.py | 4 ++--
src/streamlink/plugins/steam.py | 4 ++--
src/streamlink/plugins/ustvnow.py | 6 +++---
src/streamlink/plugins/webtv.py | 2 +-
src/streamlink/stream/hls.py | 4 ++--
src/streamlink/utils/crypto.py | 2 +-
tests/stream/test_hls.py | 4 ++--
10 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 53485d3..ee33b91 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -44,7 +44,7 @@ install_requires =
isodate
lxml >=4.6.4,<5.0
pycountry
- pycryptodome >=3.4.3,<4
+ pycryptodomex >=3.4.3,<4
PySocks !=1.5.7,>=1.5.6
requests >=2.26.0,<3.0
urllib3 >=1.26.0
diff --git a/src/streamlink.egg-info/requires.txt b/src/streamlink.egg-info/requires.txt
index 2638721..5e4e564 100644
--- a/src/streamlink.egg-info/requires.txt
+++ b/src/streamlink.egg-info/requires.txt
@@ -2,7 +2,7 @@ certifi
isodate
lxml<5.0,>=4.6.4
pycountry
-pycryptodome<4,>=3.4.3
+pycryptodomex<4,>=3.4.3
PySocks!=1.5.7,>=1.5.6
requests<3.0,>=2.26.0
urllib3>=1.26.0
diff --git a/src/streamlink/plugins/abematv.py b/src/streamlink/plugins/abematv.py
index 6881b44..f8d423f 100644
--- a/src/streamlink/plugins/abematv.py
+++ b/src/streamlink/plugins/abematv.py
@@ -15,7 +15,7 @@ import uuid
from base64 import urlsafe_b64encode
from binascii import unhexlify
-from Crypto.Cipher import AES
+from Cryptodome.Cipher import AES
from requests import Response
from requests.adapters import BaseAdapter
diff --git a/src/streamlink/plugins/mjunoon.py b/src/streamlink/plugins/mjunoon.py
index e1a81c2..a364a42 100644
--- a/src/streamlink/plugins/mjunoon.py
+++ b/src/streamlink/plugins/mjunoon.py
@@ -10,8 +10,8 @@ import logging
import re
from urllib.parse import urljoin
-from Crypto.Cipher import AES
-from Crypto.Util.Padding import unpad
+from Cryptodome.Cipher import AES
+from Cryptodome.Util.Padding import unpad
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
diff --git a/src/streamlink/plugins/steam.py b/src/streamlink/plugins/steam.py
index 6768dc8..7db007b 100644
--- a/src/streamlink/plugins/steam.py
+++ b/src/streamlink/plugins/steam.py
@@ -11,8 +11,8 @@ import logging
import re
import time
-from Crypto.Cipher import PKCS1_v1_5
-from Crypto.PublicKey import RSA
+from Cryptodome.Cipher import PKCS1_v1_5
+from Cryptodome.PublicKey import RSA
from streamlink.exceptions import FatalPluginError
from streamlink.plugin import Plugin, pluginargument, pluginmatcher
diff --git a/src/streamlink/plugins/ustvnow.py b/src/streamlink/plugins/ustvnow.py
index 01cad3f..22f751e 100644
--- a/src/streamlink/plugins/ustvnow.py
+++ b/src/streamlink/plugins/ustvnow.py
@@ -12,9 +12,9 @@ import re
from urllib.parse import urljoin, urlparse
from uuid import uuid4
-from Crypto.Cipher import AES
-from Crypto.Hash import SHA256
-from Crypto.Util.Padding import pad, unpad
+from Cryptodome.Cipher import AES
+from Cryptodome.Hash import SHA256
+from Cryptodome.Util.Padding import pad, unpad
from streamlink.plugin import Plugin, PluginError, pluginargument, pluginmatcher
from streamlink.stream.hls import HLSStream
diff --git a/src/streamlink/plugins/webtv.py b/src/streamlink/plugins/webtv.py
index c8cf2b2..712e447 100644
--- a/src/streamlink/plugins/webtv.py
+++ b/src/streamlink/plugins/webtv.py
@@ -9,7 +9,7 @@ import binascii
import logging
import re
-from Crypto.Cipher import AES
+from Cryptodome.Cipher import AES
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
diff --git a/src/streamlink/stream/hls.py b/src/streamlink/stream/hls.py
index 2a942f4..bd11224 100644
--- a/src/streamlink/stream/hls.py
+++ b/src/streamlink/stream/hls.py
@@ -6,9 +6,9 @@ from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union
from urllib.parse import urlparse
# noinspection PyPackageRequirements
-from Crypto.Cipher import AES
+from Cryptodome.Cipher import AES
# noinspection PyPackageRequirements
-from Crypto.Util.Padding import unpad
+from Cryptodome.Util.Padding import unpad
from requests import Response
from requests.exceptions import ChunkedEncodingError, ConnectionError, ContentDecodingError
diff --git a/src/streamlink/utils/crypto.py b/src/streamlink/utils/crypto.py
index abc3901..a71203f 100644
--- a/src/streamlink/utils/crypto.py
+++ b/src/streamlink/utils/crypto.py
@@ -1,6 +1,6 @@
import hashlib
-from Crypto.Cipher import AES
+from Cryptodome.Cipher import AES
def evp_bytestokey(password, salt, key_len, iv_len):
diff --git a/tests/stream/test_hls.py b/tests/stream/test_hls.py
index 125bbd6..93a4e32 100644
--- a/tests/stream/test_hls.py
+++ b/tests/stream/test_hls.py
@@ -6,8 +6,8 @@ from unittest.mock import Mock, call, patch
import pytest
import requests_mock
-from Crypto.Cipher import AES
-from Crypto.Util.Padding import pad
+from Cryptodome.Cipher import AES
+from Cryptodome.Util.Padding import pad
from streamlink.session import Streamlink
from streamlink.stream.hls import HLSStream, HLSStreamReader
|