Skip to content

Commit

Permalink
Tag Cbor dates
Browse files Browse the repository at this point in the history
  • Loading branch information
n0900 committed Sep 20, 2024
1 parent b87534f commit 18ea771
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.ByteArraySerializer
import at.asitplus.signum.indispensable.cosef.io.ByteStringWrapper
import kotlinx.serialization.cbor.CborTag.DATE_TIME_STANDARD
import kotlinx.serialization.cbor.ValueTags
import kotlinx.serialization.decodeFromByteArray
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
Expand Down Expand Up @@ -221,12 +223,16 @@ data class KeyAuthorization(
@Serializable
data class ValidityInfo(
@SerialName("signed")
@ValueTags(DATE_TIME_STANDARD)
val signed: Instant,
@SerialName("validFrom")
@ValueTags(DATE_TIME_STANDARD)
val validFrom: Instant,
@SerialName("validUntil")
@ValueTags(DATE_TIME_STANDARD)
val validUntil: Instant,
@SerialName("expectedUpdate")
@ValueTags(DATE_TIME_STANDARD)
val expectedUpdate: Instant? = null,
) {

Expand Down

0 comments on commit 18ea771

Please sign in to comment.