Skip to content

Commit

Permalink
Fix use of old KMP-Crypto API
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Feb 26, 2024
1 parent 34861e0 commit fdc43b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PresentProofProtocolTest : FreeSpec({
holderCryptoService = DefaultCryptoService()
verifierCryptoService = DefaultCryptoService()
holder = HolderAgent.newDefaultInstance(holderCryptoService)
verifier = VerifierAgent.newDefaultInstance(verifierCryptoService.publicKey.keyId)
verifier = VerifierAgent.newDefaultInstance(verifierCryptoService.publicKey.didEncoded)
holderProtocol = PresentProofProtocol.newHolderInstance(
holder = holder,
serviceEndpoint = "https://example.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PupilCredentialDataProvider(
return KmmResult.success(
listOf(
CredentialToBeIssued.VcJwt(
subject = dummyCredential(subjectPublicKey.keyId),
subject = dummyCredential(subjectPublicKey.didEncoded),
expiration = clock.now() + defaultLifetime,
attachments = dummyAttachments()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private suspend fun buildAttestedKey(
): String {
val attestedKeyPayload =
AttestedPublicKey(walletCryptoService.jsonWebKey.keyId!!).serialize().encodeToByteArray()
return DefaultJwsService(issuerCryptoService).createSignedJws(JwsHeader(algorithm = JwsAlgorithm.ES256), attestedKeyPayload)!!.serialize()
return DefaultJwsService(issuerCryptoService).createSignedJws(JwsHeader(algorithm = JwsAlgorithm.ES256), attestedKeyPayload).getOrThrow().serialize()
}

private fun randomCredentialContent(attestedKeyJws: String, pictureHash: ByteArray) = CredentialContent(
Expand Down

0 comments on commit fdc43b2

Please sign in to comment.