Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit af73c64

Browse files
committed
Merge branch 'release/1.3.0'
2 parents 988c78e + 2175a18 commit af73c64

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
httpsig Changes
22
---------------
33

4+
1.3.0 (2019-Nov-28)
5+
-------------------
6+
7+
* Relax pycryptodome requirements (PR#14 by cveilleux)
8+
* Ability to supply another signature header like Signature (PR#15 by rbignon)
9+
* Fixed #2; made Signer.sign() public
10+
* Dropped Python 3.3, added Python 3.7.
11+
412
1.2.0 (2018-Mar-28)
513
-------------------
614

7-
* Switched to pycryptodome instead of PyCrypto
15+
* Switched to pycryptodome instead of PyCrypto (PR#11 by iandouglas)
816
* Updated tests with the test data from Draft 8 and verified it still passes.
917
* Dropped official Python 3.2 support (pip dropped it so it can't be properly tested)
1018
* Cleaned up the code to be more PEP8-like.

httpsig/sign.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _sign_hmac(self, data):
6060
hmac.update(data)
6161
return hmac.digest()
6262

63-
def _sign(self, data):
63+
def sign(self, data):
6464
if isinstance(data, six.string_types):
6565
data = data.encode("ascii")
6666
signed = None
@@ -114,7 +114,7 @@ def sign(self, headers, host=None, method=None, path=None):
114114
signable = generate_message(
115115
required_headers, headers, host, method, path)
116116

117-
signature = self._sign(signable)
117+
signature = super(HeaderSigner, self).sign(signable)
118118
headers[self.sign_header] = self.signature_template % signature
119119

120120
return headers

httpsig/tests/test_verify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_basic_sign(self):
5353
BAD = b"this is not the signature you were looking for..."
5454

5555
# generate signed string
56-
signature = signer._sign(GOOD)
56+
signature = signer.sign(GOOD)
5757
self.assertTrue(verifier._verify(data=GOOD, signature=signature))
5858
self.assertFalse(verifier._verify(data=BAD, signature=signature))
5959

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
setup(
1111
name='httpsig',
12-
# version=versioneer.get_version(),
1312
description="Secure HTTP request signing using the HTTP Signature draft specification",
1413
long_description=long_description,
1514
classifiers=[

0 commit comments

Comments
 (0)