Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkanellopoulos committed Dec 17, 2024
1 parent 6a2fff9 commit 291b41f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import eu.europa.ec.eudi.wallet.document.ElementIdentifier
import eu.europa.ec.eudi.wallet.document.IssuedDocument
import eu.europa.ec.eudi.wallet.document.NameSpace
import eu.europa.ec.eudi.wallet.document.format.MsoMdocData
import eu.europa.ec.eudi.wallet.document.format.MsoMdocFormat
import kotlinx.datetime.Clock
import kotlinx.datetime.toJavaInstant

Expand Down Expand Up @@ -55,11 +54,11 @@ internal object DocumentResponseGenerator {
keyUnlockData: KeyUnlockData? = null,
signatureAlgorithm: Algorithm = Algorithm.ES256
): ByteArray {
require(document.format is MsoMdocFormat) { "Document format is not MsoMdocFormat" }
require(document.data is MsoMdocData) { "Document format is not MsoMdocFormat" }
require(!document.isKeyInvalidated) { "Document key is invalidated" }
require(document.isValidAt(Clock.System.now().toJavaInstant())) { "Document is not valid" }
val documentData = document.data as MsoMdocData
val docType = (document.format as MsoMdocFormat).docType
val docType = documentData.format.docType
val dataElements =
(elements ?: documentData.nameSpaces).flatMap { (nameSpace, elementIdentifiers) ->
elementIdentifiers.map { elementIdentifier ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import eu.europa.ec.eudi.iso18013.transfer.internal.getValidIssuedMsoMdocDocumen
import eu.europa.ec.eudi.iso18013.transfer.internal.readerauth.performReaderAuthentication
import eu.europa.ec.eudi.iso18013.transfer.readerauth.ReaderTrustStore
import eu.europa.ec.eudi.iso18013.transfer.readerauth.ReaderTrustStoreAware
import eu.europa.ec.eudi.iso18013.transfer.response.DocItem
import eu.europa.ec.eudi.iso18013.transfer.response.ReaderAuth
import eu.europa.ec.eudi.iso18013.transfer.response.Request
import eu.europa.ec.eudi.iso18013.transfer.response.RequestProcessor
Expand Down

0 comments on commit 291b41f

Please sign in to comment.