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
|
Description: Adjust package to use alternative Cryptodome namespace
Import module using Cryptodome name instead of Crypto name, see
<URL: https://bugs.debian.org/886291 > for the explanation.
Author: Petter Reinholdtsen <pere@debian.org>
Bug-Debian: https://bugs.debian.org/886291
Forwarded: not-needed
Reviewed-By: Petter Reinholdtsen <pere@debian.org>
Last-Update: 2018-06-14
Index: python-httpsig/httpsig/sign.py
===================================================================
--- python-httpsig.orig/httpsig/sign.py 2019-01-20 08:56:18.817780240 +0100
+++ python-httpsig/httpsig/sign.py 2019-01-20 08:57:01.000000000 +0100
@@ -1,9 +1,9 @@
import base64
import six
-from Crypto.Hash import HMAC
-from Crypto.PublicKey import RSA
-from Crypto.Signature import PKCS1_v1_5
+from Cryptodome.Hash import HMAC
+from Cryptodome.PublicKey import RSA
+from Cryptodome.Signature import PKCS1_v1_5
from .utils import *
Index: python-httpsig/httpsig/utils.py
===================================================================
--- python-httpsig.orig/httpsig/utils.py 2019-01-20 08:56:18.821780281 +0100
+++ python-httpsig/httpsig/utils.py 2019-01-20 08:57:01.000000000 +0100
@@ -11,7 +11,7 @@
# Python 2
from urllib2 import parse_http_list
-from Crypto.Hash import SHA, SHA256, SHA512
+from Cryptodome.Hash import SHA, SHA256, SHA512
ALGORITHMS = frozenset([
'rsa-sha1',
Index: python-httpsig/setup.py
===================================================================
--- python-httpsig.orig/setup.py 2019-01-20 08:56:18.821780281 +0100
+++ python-httpsig/setup.py 2019-01-20 08:58:01.198862186 +0100
@@ -37,6 +37,6 @@
zip_safe=True,
#use_scm_version=True,
setup_requires=['setuptools_scm'],
- install_requires=['pycryptodome>=3,<4', 'six'],
+ install_requires=['pycryptodomex>=3,<4', 'six'],
test_suite="httpsig.tests",
)
|