diff --git a/signum b/signum index d6e27fac..67298aee 160000 --- a/signum +++ b/signum @@ -1 +1 @@ -Subproject commit d6e27facef631302b294192ed7ad0ea7ac340965 +Subproject commit 67298aeeb7be70680eab15bc21fbc4ee2fa89260 diff --git a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/DeviceSignedItemSerializationTest.kt b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/DeviceSignedItemSerializationTest.kt index d062acff..66e95e26 100644 --- a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/DeviceSignedItemSerializationTest.kt +++ b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/DeviceSignedItemSerializationTest.kt @@ -1,8 +1,8 @@ package at.asitplus.wallet.lib.cbor +import at.asitplus.signum.indispensable.CryptoSignature import at.asitplus.signum.indispensable.cosef.CoseHeader import at.asitplus.signum.indispensable.cosef.CoseSigned -import at.asitplus.signum.indispensable.cosef.io.ByteStringWrapper import at.asitplus.wallet.lib.iso.* import com.benasher44.uuid.uuid4 import io.kotest.core.spec.style.FreeSpec @@ -47,9 +47,9 @@ class DeviceSignedItemSerializationTest : FreeSpec({ key = elementId, value = Random.nextBytes(32), ) - val protectedHeader = ByteStringWrapper(CoseHeader(), CoseHeader().serialize()) - val issuerAuth = CoseSigned(protectedHeader, null, null, byteArrayOf()) - val deviceAuth = CoseSigned(protectedHeader, null, null, byteArrayOf()) + val protectedHeader = CoseHeader() + val issuerAuth = CoseSigned(protectedHeader, null, null, CryptoSignature.RSAorHMAC(byteArrayOf())) + val deviceAuth = CoseSigned(protectedHeader, null, null, CryptoSignature.RSAorHMAC(byteArrayOf())) val doc = Document( docType = uuid4().toString(), diff --git a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/IssuerSignedItemSerializationTest.kt b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/IssuerSignedItemSerializationTest.kt index a2a0ac6e..0f5de7f0 100644 --- a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/IssuerSignedItemSerializationTest.kt +++ b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/cbor/IssuerSignedItemSerializationTest.kt @@ -1,5 +1,6 @@ package at.asitplus.wallet.lib.cbor +import at.asitplus.signum.indispensable.CryptoSignature import at.asitplus.signum.indispensable.cosef.CoseHeader import at.asitplus.signum.indispensable.cosef.CoseSigned import at.asitplus.signum.indispensable.cosef.io.ByteStringWrapper @@ -45,8 +46,8 @@ class IssuerSignedItemSerializationTest : FreeSpec({ elementIdentifier = elementId, elementValue = Random.nextBytes(32), ) - val protectedHeader = ByteStringWrapper(CoseHeader(), CoseHeader().serialize()) - val issuerAuth = CoseSigned(protectedHeader, null, null, byteArrayOf()) + val protectedHeader = CoseHeader() + val issuerAuth = CoseSigned(protectedHeader, null, null, CryptoSignature.RSAorHMAC(byteArrayOf())) val doc = Document( docType = uuid4().toString(), issuerSigned = IssuerSigned.fromIssuerSignedItems( diff --git a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/Tag24SerializationTest.kt b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/Tag24SerializationTest.kt index 715a1622..72f93539 100644 --- a/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/Tag24SerializationTest.kt +++ b/vck/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/Tag24SerializationTest.kt @@ -1,8 +1,8 @@ package at.asitplus.wallet.lib.iso import at.asitplus.catching +import at.asitplus.signum.indispensable.CryptoSignature import at.asitplus.signum.indispensable.cosef.* -import at.asitplus.signum.indispensable.cosef.io.Base16Strict import at.asitplus.signum.indispensable.cosef.io.ByteStringWrapper import at.asitplus.signum.indispensable.cosef.io.ByteStringWrapperSerializer import at.asitplus.wallet.lib.agent.DummyCredentialDataProvider @@ -49,10 +49,10 @@ class Tag24SerializationTest : FreeSpec({ ), deviceAuth = DeviceAuth( deviceSignature = CoseSigned( - protectedHeader = ByteStringWrapper(CoseHeader()), + protectedHeader = CoseHeader(), unprotectedHeader = null, payload = byteArrayOf(), - rawSignature = byteArrayOf() + signature = CryptoSignature.RSAorHMAC(byteArrayOf()) ) ) @@ -121,10 +121,10 @@ class Tag24SerializationTest : FreeSpec({ ) val serializedMso = mso.serializeForIssuerAuth() val input = CoseSigned( - protectedHeader = ByteStringWrapper(CoseHeader()), + protectedHeader = CoseHeader(), unprotectedHeader = null, payload = mso, - rawSignature = byteArrayOf() + signature = CryptoSignature.RSAorHMAC(byteArrayOf()) ) val serialized = vckCborSerializer.encodeToByteArray(input) @@ -171,10 +171,10 @@ private fun deviceKeyInfo() = DeviceKeyInfo(CoseKey(CoseKeyType.EC2, keyParams = CoseKeyParams.EcYBoolParams(CoseEllipticCurve.P256))) private fun issuerAuth() = CoseSigned( - protectedHeader = ByteStringWrapper(CoseHeader()), + protectedHeader = CoseHeader(), unprotectedHeader = null, payload = null, - rawSignature = byteArrayOf() + signature = CryptoSignature.RSAorHMAC(byteArrayOf()) ) private fun issuerSignedItem() = IssuerSignedItem(0u, Random.nextBytes(16), "identifier", "value")