Skip to content

Commit 923f35d

Browse files
author
Roland Hedberg
committed
Deal with non-standard key fields.
1 parent 337b0ca commit 923f35d

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ class ECKey(Key):
446446
public_members = ["kty", "alg", "use", "kid", "crv", "x", "y"]
447447

448448
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)
449+
crv="", x="", y="", d="", curve=None, **kwargs):
450+
Key.__init__(self, kty, alg, use, kid, key, **kwargs)
451451
self.crv = crv
452452
self.x = x
453453
self.y = y
@@ -533,8 +533,8 @@ class SYMKey(Key):
533533
public_members = members[:]
534534

535535
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, key, x5c, x5t, x5u)
536+
x5c=None, x5t="", x5u="", k="", mtrl="", **kwargs):
537+
Key.__init__(self, kty, alg, use, kid, key, x5c, x5t, x5u, **kwargs)
538538
self.k = k
539539
if not self.key and self.k:
540540
if isinstance(self.k, str):

0 commit comments

Comments
 (0)