@@ -121,3 +121,35 @@ def test_status_message():
121121 bitstring [idx ] = 2
122122 for idx in bitstring .take_n (50 ):
123123 bitstring [idx ] = 3
124+
125+ encoded_jwt = bitstring .sign_jwt_enveloping (
126+ signer = trivial_enveloping_signer ,
127+ alg = "ES256" ,
128+ kid = "12" ,
129+ status_purpose = "revocation" ,
130+ )
131+
132+ status_message = [
133+ {"status" :"0x0" , "message" :"0" },
134+ {"status" :"0x1" , "message" :"1" },
135+ {"status" :"0x2" , "message" :"2" },
136+ {"status" :"0x3" , "message" :"3" },
137+ ]
138+
139+ credential_status = {
140+ "id" : "https://example.com/credentials/status/3#94567" ,
141+ "type" : "BitstringStatusListEntry" ,
142+ "statusPurpose" : "revocation" ,
143+ "statusListIndex" : "0" ,
144+ "statusListCredential" : "https://example.com/credentials/status/3"
145+ }
146+
147+ verifier = BitstringStatusListVerifier (credential_status )
148+ verifier .verify_jwt (encoded_jwt , verifier = trivial_enveloping_verifier )
149+
150+ for i in range (bitstring .status_list .size ):
151+ assert verifier .get_status (i ) == {
152+ "status" : bitstring [i ],
153+ "valid" : not bool (bitstring [i ]),
154+ "message" : str (bitstring [i ]),
155+ }
0 commit comments