From c838eb3d566734d0c476268fa1d6ee8922e3ce30 Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 6 May 2026 17:55:47 +0200 Subject: [PATCH] fix: Fix too restrictive precondition that was causing rare failures on iOS These could be recovered from by just killing and restarting the app, but it's best that users don't need to do that ever. --- .../src/appleMain/kotlin/internal/utils/SignUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multiplatform-lib/src/appleMain/kotlin/internal/utils/SignUtils.kt b/multiplatform-lib/src/appleMain/kotlin/internal/utils/SignUtils.kt index e4343cac..4f28e699 100644 --- a/multiplatform-lib/src/appleMain/kotlin/internal/utils/SignUtils.kt +++ b/multiplatform-lib/src/appleMain/kotlin/internal/utils/SignUtils.kt @@ -116,8 +116,8 @@ internal actual object SignUtils { } private fun convertDerToRawSignature(derSignature: ByteArray): Pair { - require(derSignature.size in 70..72) { - "Invalid DER signature length: ${derSignature.size}, expected 70-72" + require(derSignature.size in 8..72) { // Typical length is between 68 and 72, but can theoretically be lower. + "Invalid DER signature length: ${derSignature.size}, expected 8-72" } // Position after SEQUENCE header (0x30, length)