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

Commit 6958fe3

Browse files
committed
Add hs2019 to algorithm list and set to default sign algorithm
1 parent 8712e9b commit 6958fe3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

httpsig/sign.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
from Crypto.Hash import HMAC
55
from Crypto.PublicKey import RSA
66
from Crypto.Signature import PKCS1_v1_5
7+
from Crypto.Signature import PKCS1_PSS
78

89
from .utils import *
910

1011

11-
DEFAULT_SIGN_ALGORITHM = "hmac-sha256"
12+
DEFAULT_SIGN_ALGORITHM = "hs2019"
1213

1314

1415
class Signer(object):

httpsig/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
'rsa-sha512',
2020
'hmac-sha1',
2121
'hmac-sha256',
22-
'hmac-sha512'])
22+
'hmac-sha512',
23+
'hs2019'])
2324
HASHES = {'sha1': SHA,
2425
'sha256': SHA256,
2526
'sha512': SHA512}

0 commit comments

Comments
 (0)