Skip to content

Commit

Permalink
Return the IssuerSigned part of the generated MDoc instead of a Devic…
Browse files Browse the repository at this point in the history
…eResponse. (#167)
  • Loading branch information
dzarras authored May 29, 2024
1 parent 4295df1 commit ad96dd9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import eu.europa.ec.eudi.pidissuer.domain.MsoDocType
import id.walt.mdoc.SimpleCOSECryptoProvider
import id.walt.mdoc.dataelement.DataElement
import id.walt.mdoc.dataelement.MapElement
import id.walt.mdoc.dataretrieval.DeviceResponse
import id.walt.mdoc.doc.MDocBuilder
import id.walt.mdoc.mso.DeviceKeyInfo
import id.walt.mdoc.mso.ValidityInfo
Expand Down Expand Up @@ -59,8 +58,7 @@ internal class MsoMdocSigner<in Credential>(
val mdoc = MDocBuilder(docType)
.apply { usage(credential) }
.sign(validityInfo, deviceKeyInfo, issuerCryptoProvider, issuerSigningKey.key.keyID)
val deviceResponse = DeviceResponse(documents = listOf(mdoc))
Base64.UrlSafe.encode(deviceResponse.toCBOR())
Base64.UrlSafe.encode(mdoc.issuerSigned.toMapElement().toCBOR())
}

private fun validityInfo(): ValidityInfo {
Expand Down

0 comments on commit ad96dd9

Please sign in to comment.