File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def new(
6262 validity : dict = None ,
6363 devicekeyinfo : Union [dict , CoseKey , str ] = None ,
6464 cert_path : str = None ,
65+ revocation : dict = None ,
6566 ):
6667 """
6768 create a new mdoc with signed mso
@@ -118,6 +119,7 @@ def new(
118119 alg = self .alg ,
119120 kid = self .kid ,
120121 validity = validity ,
122+ revocation = revocation ,
121123 )
122124
123125 else :
@@ -127,6 +129,7 @@ def new(
127129 alg = self .alg ,
128130 cert_path = cert_path ,
129131 validity = validity ,
132+ revocation = revocation ,
130133 )
131134
132135 mso = msoi .sign (doctype = doctype , device_key = devicekeyinfo )
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ def __init__(
4444 self ,
4545 data : dict ,
4646 validity : str ,
47+ revocation : str = None ,
4748 cert_path : str = None ,
4849 key_label : str = None ,
4950 user_pin : str = None ,
@@ -78,6 +79,7 @@ def __init__(
7879 self .alg = alg
7980 self .kid = kid
8081 self .validity = validity
82+ self .revocation = revocation
8183
8284 alg_map = {"ES256" : "sha256" , "ES384" : "sha384" , "ES512" : "sha512" }
8385
@@ -167,6 +169,9 @@ def sign(
167169 "digestAlgorithm" : alg_map .get (self .alg ),
168170 }
169171
172+ if self .revocation is not None :
173+ payload .update ({"status" : {"StatusListInfo" : self .revocation }})
174+
170175 if self .cert_path :
171176 # Load the DER certificate file
172177 with open (self .cert_path , "rb" ) as file :
You can’t perform that action at this time.
0 commit comments