@@ -43,7 +43,8 @@ def __init__(
4343 hsm : bool = False ,
4444 private_key : Union [dict , CoseKey ] = None ,
4545 digest_alg : str = settings .PYMDOC_HASHALG ,
46- status_list : dict = {}
46+ status_list : dict = None ,
47+ revocation : dict = None
4748 ) -> None :
4849 """
4950 Initialize a new MsoIssuer
@@ -61,6 +62,7 @@ def __init__(
6162 :param private_key: Union[dict, CoseKey]: the signing key
6263 :param digest_alg: str: the digest algorithm
6364 :param status_list: dict: the status list to include in the mso
65+ :param revocation: dict: the status list to include in the mso
6466 """
6567
6668 if not hsm :
@@ -96,6 +98,7 @@ def __init__(
9698 self .kid = kid
9799 self .validity = validity
98100 self .status_list = status_list
101+ self .revocation = revocation
99102
100103 alg_map = {"ES256" : "sha256" , "ES384" : "sha384" , "ES512" : "sha512" }
101104
@@ -201,9 +204,12 @@ def sign(
201204 "deviceKeyInfo" : {
202205 "deviceKey" : device_key ,
203206 },
204- "digestAlgorithm" : alg_map .get (self .alg ),
205- "status" : self .status_list
207+ "digestAlgorithm" : alg_map .get (self .alg )
206208 }
209+ if self .status_list is not None :
210+ payload .update ({"status" : self .status_list })
211+ if self .revocation is not None :
212+ payload .update ({"status" : self .revocation })
207213
208214 if self .cert_path :
209215 # Try to load the certificate file
0 commit comments