You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: waltid-libraries/credentials/waltid-verifiable-credentials/src/commonMain/kotlin/id/walt/credentials/schemes/JwsSignatureScheme.kt
Copy file name to clipboardexpand all lines: waltid-libraries/credentials/waltid-verification-policies/src/commonMain/kotlin/id/walt/policies/policies/JwtSignaturePolicy.kt
Copy file name to clipboardexpand all lines: waltid-libraries/credentials/waltid-verification-policies/src/commonMain/kotlin/id/walt/policies/policies/RevocationPolicy.kt
Copy file name to clipboardexpand all lines: waltid-libraries/credentials/waltid-verification-policies/src/commonMain/kotlin/id/walt/policies/policies/SdJwtVCSignaturePolicy.kt
Copy file name to clipboardexpand all lines: waltid-libraries/credentials/waltid-verification-policies/src/jvmMain/kotlin/id/walt/policies/policies/RevocationPolicy.jvm.kt
+4-2
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ actual class RevocationPolicy : RevocationPolicyMp() {
47
47
val credentialSubject = payload["vc"]!!.jsonObject["credentialSubject"]?.jsonObject!!
48
48
val encodedList = credentialSubject["encodedList"]?.jsonPrimitive?.content ?:""
49
49
val bitValue = get(encodedList, statusListIndex)
50
-
if (bitValue!![0].code==0) {
50
+
if (StreamUtils.binToInt(bitValue!!.joinToString(""))==0) {
51
51
Result.success(statusListCredentialUrl!!)
52
52
} else {
53
53
Result.failure(Throwable("Credential has been revoked"))
Copy file name to clipboardexpand all lines: waltid-libraries/sdjwt/waltid-sdjwt/src/jvmTest/kotlin/id/walt/sdjwt/SDJwtTestJVM.kt
+21-1
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ import korlibs.crypto.SHA256
8
8
importkorlibs.crypto.encoding.ASCII
9
9
importkotlinx.datetime.Clock
10
10
importkotlinx.serialization.json.*
11
+
importkotlin.io.encoding.Base64
12
+
importkotlin.io.encoding.ExperimentalEncodingApi
11
13
importkotlin.test.*
12
14
13
15
classSDJwtTestJVM {
@@ -99,13 +101,31 @@ class SDJwtTestJVM {
99
101
val isValid = parsedUndisclosedJwt.verify(cryptoProvider).verified
100
102
println("Undisclosed SD-JWT verified: $isValid")
101
103
104
+
val disclosedJwt ="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI0NTYiLCJfc2QiOlsiaGx6ZmpmMDRvNVpzTFIyNWhhNGMtWS05SFcyRFVseGNnaU1ZZDMyNE5nWSJdfQ.2fsLqzujWt0hS0peLS8JLHyyo3D5KCDkNnHcBYqQwVo~WyJ4RFk5VjBtOG43am82ZURIUGtNZ1J3Iiwic3ViIiwiMTIzIl0~"
102
105
val parsedDisclosedJwtVerifyResult =SDJwt.verifyAndParse(
0 commit comments