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

Commit 7d015c6

Browse files
committed
Merge branch 'hs2019-support'
2 parents a704ea8 + 251cce9 commit 7d015c6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

httpsig/sign.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def __init__(self, secret, algorithm=None, sign_algorithm=None):
3030

3131
if algorithm != DEFAULT_ALGORITHM:
3232
print("Algorithm: {} is deprecated please update to {}".format(algorithm, DEFAULT_ALGORITHM))
33+
elif algorithm == DEFAULT_ALGORITHM and sign_algorithm is None:
34+
raise HttpSigException("Required sign algorithm for {} algorithm not set".format(DEFAULT_ALGORITHM))
3335

3436
if isinstance(secret, six.string_types):
3537
secret = secret.encode("ascii")

httpsig/verify.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,8 @@ def __init__(self, headers, secret, required_headers=None, method=None,
9898
self.host = host
9999
self.derived_algorithm = algorithm
100100

101-
if self.auth_dict['algorithm'] != DEFAULT_ALGORITHM:
102-
print("Algorithm: {} is deprecated please update to {}".format(self.auth_dict['algorithm'], DEFAULT_ALGORITHM))
103-
elif self.auth_dict['algorithm'] == DEFAULT_ALGORITHM and sign_algorithm is None:
104-
raise HttpSigException("Required sign algorithm for {} algorithm not set".format(DEFAULT_ALGORITHM))
105-
106101
super(HeaderVerifier, self).__init__(
107-
secret, algorithm=self.auth_dict['algorithm'], sign_algorithm=sign_algorithm)
102+
secret, algorithm=self.auth_dict['algorithm'], sign_algorithm=sign_algorithm)
108103

109104
def verify(self):
110105
"""

0 commit comments

Comments
 (0)