From 747d5f5b5591dbc2d9a4ca4ca9b3f2205e06bf29 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Thu, 20 Aug 2020 15:59:58 +0200 Subject: ASN.1 signature encoding bug --- src/org/uic/barcode/staticFrame/StaticFrame.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/org/uic/barcode/staticFrame/StaticFrame.java b/src/org/uic/barcode/staticFrame/StaticFrame.java index da7ce60..6df104b 100644 --- a/src/org/uic/barcode/staticFrame/StaticFrame.java +++ b/src/org/uic/barcode/staticFrame/StaticFrame.java @@ -576,9 +576,11 @@ public class StaticFrame { int sequenceTag = 16 + 32; // (bits 6 = 1 constructed) //INTEGER --> tag 2 int integerTag = 2; - byte[] b1 = toUnsignedBytes(r); + + byte[] b1 = r.toByteArray(); int lb1 = b1.length; - byte[] b2 = toUnsignedBytes(s); + + byte[] b2 = s.toByteArray(); int lb2 = b2.length; int sequenceLength = lb1 + lb2 + 4; -- cgit v1.2.3