Skip to content

Commit ebb574c

Browse files
committed
Merge branch 'master' into py3_string
Conflicts: src/jwkest/jwk.py
2 parents db9f98f + 42de556 commit ebb574c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

doc/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
extensions = [
2929
'sphinx.ext.autodoc',
3030
'sphinx.ext.coverage',
31-
'sphinx.ext.viewcode']
31+
'sphinx.ext.viewcode',
32+
'sphinx.ext.autosummary'
33+
]
3234

3335
# Add any paths that contain templates here, relative to this directory.
3436
templates_path = ['_templates']

src/jwkest/jwk.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
from requests import request
1717

18-
from jwkest import base64url_to_long, as_bytes
18+
from jwkest import base64url_to_long
19+
from jwkest import as_bytes
1920
from jwkest import base64_to_long
2021
from jwkest import long_to_base64
2122
from jwkest import JWKESTException
@@ -446,8 +447,8 @@ class ECKey(Key):
446447
public_members = ["kty", "alg", "use", "kid", "crv", "x", "y"]
447448

448449
def __init__(self, kty="EC", alg="", use="", kid="", key=None,
449-
crv="", x="", y="", d="", curve=None):
450-
Key.__init__(self, kty, alg, use, kid, key)
450+
crv="", x="", y="", d="", curve=None, **kwargs):
451+
Key.__init__(self, kty, alg, use, kid, key, **kwargs)
451452
self.crv = crv
452453
self.x = x
453454
self.y = y
@@ -533,8 +534,8 @@ class SYMKey(Key):
533534
public_members = members[:]
534535

535536
def __init__(self, kty="oct", alg="", use="", kid="", key=None,
536-
x5c=None, x5t="", x5u="", k="", mtrl=""):
537-
Key.__init__(self, kty, alg, use, kid, as_bytes(key), x5c, x5t, x5u)
537+
x5c=None, x5t="", x5u="", k="", mtrl="", **kwargs):
538+
Key.__init__(self, kty, alg, use, kid, as_bytes(key), x5c, x5t, x5u, **kwargs)
538539
self.k = k
539540
if not self.key and self.k:
540541
if isinstance(self.k, str):

src/jwkest/jws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def verify(self, msg, sig, key):
193193

194194
'PS256': PSSSigner(SHA256),
195195
'PS384': PSSSigner(SHA384),
196-
'PS521': PSSSigner(SHA512),
196+
'PS512': PSSSigner(SHA512),
197197

198198
'none': None
199199
}

tests/test_3_jws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_signer_ps512():
317317
# Key has to be big enough > 512+512+2
318318
keys = [RSAKey(key=import_rsa_key_from_file(full_path("./size2048.key")))]
319319
#keys[0]._keytype = "private"
320-
_jws = JWS(payload, alg="PS521")
320+
_jws = JWS(payload, alg="PS512")
321321
_jwt = _jws.sign_compact(keys)
322322

323323
_rj = factory(_jwt)

0 commit comments

Comments
 (0)