Skip to content

Commit d0fac66

Browse files
committed
Remove useless status_list parameter as the object is de facto in the more general revocation dict parameter
1 parent 068eb7a commit d0fac66

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

pymdoccbor/mdoc/issuer.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def new(
7474
validity: dict = None,
7575
devicekeyinfo: Union[dict, CoseKey, str] = None,
7676
cert_path: str = None,
77-
status_list: dict = None,
7877
revocation: dict = None
7978
):
8079
"""
@@ -85,8 +84,7 @@ def new(
8584
:param validity: dict: validity info
8685
:param devicekeyinfo: Union[dict, CoseKey, str]: device key info
8786
:param cert_path: str: path to the certificate
88-
:param status_list: dict: The status list to include in the mso of the mdoc
89-
:param revocation: dict: The status list to include in the mso of the mdoc
87+
:param revocation: dict: revocation status dict it may include status_list and identifier_list keys
9088
9189
:return: dict: signed mdoc
9290
"""
@@ -148,7 +146,6 @@ def new(
148146
alg=self.alg,
149147
kid=self.kid,
150148
validity=validity,
151-
status_list=status_list,
152149
revocation=revocation
153150
)
154151

@@ -159,7 +156,6 @@ def new(
159156
alg=self.alg,
160157
cert_path=cert_path,
161158
validity=validity,
162-
status_list=status_list,
163159
revocation=revocation
164160
)
165161

pymdoccbor/mso/issuer.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def __init__(
4343
hsm: bool = False,
4444
private_key: Union[dict, CoseKey] = None,
4545
digest_alg: str = settings.PYMDOC_HASHALG,
46-
status_list: dict = None,
4746
revocation: dict = None
4847
) -> None:
4948
"""
@@ -61,8 +60,7 @@ def __init__(
6160
:param hsm: bool: hardware security module
6261
:param private_key: Union[dict, CoseKey]: the signing key
6362
:param digest_alg: str: the digest algorithm
64-
:param status_list: dict: the status list to include in the mso
65-
:param revocation: dict: the status list to include in the mso
63+
:param revocation: dict: revocation status dict to include in the mso, it may include status_list and identifier_list keys
6664
"""
6765

6866
if not hsm:
@@ -97,7 +95,6 @@ def __init__(
9795
self.alg = alg
9896
self.kid = kid
9997
self.validity = validity
100-
self.status_list = status_list
10198
self.revocation = revocation
10299

103100
alg_map = {"ES256": "sha256", "ES384": "sha384", "ES512": "sha512"}
@@ -206,8 +203,6 @@ def sign(
206203
},
207204
"digestAlgorithm": alg_map.get(self.alg)
208205
}
209-
if self.status_list is not None:
210-
payload.update({"status": self.status_list})
211206
if self.revocation is not None:
212207
payload.update({"status": self.revocation})
213208

pymdoccbor/tests/test_02_mdoc_issuer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pymdoccbor.mdoc.issuer import MdocCborIssuer
1111
from pymdoccbor.mdoc.verifier import MdocCbor
1212
from pymdoccbor.mso.issuer import MsoIssuer
13-
from . pid_data import PID_DATA
13+
from pymdoccbor.tests.pid_data import PID_DATA
1414

1515

1616
PKEY = {
@@ -75,7 +75,7 @@ def test_mdoc_issuer():
7575
data=PID_DATA,
7676
devicekeyinfo=PKEY,
7777
validity=validity,
78-
status_list=status_list
78+
revocation=status_list
7979
)
8080

8181
mdocp = MdocCbor()

0 commit comments

Comments
 (0)