From 2f72a6419dd1e20acf6e77a9276a6055892e732a Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:45:04 +0100 Subject: - missing fieldOrder added - validation of level1 when the signature algorithm is missing --- src/test/java/org/uic/barcode/test/DynamicFrameFcbVersion3Test.java | 2 +- src/test/java/org/uic/barcode/test/DynamicFrameLOwLevelTest.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/test/java/org') diff --git a/src/test/java/org/uic/barcode/test/DynamicFrameFcbVersion3Test.java b/src/test/java/org/uic/barcode/test/DynamicFrameFcbVersion3Test.java index 4095d93..199a32d 100644 --- a/src/test/java/org/uic/barcode/test/DynamicFrameFcbVersion3Test.java +++ b/src/test/java/org/uic/barcode/test/DynamicFrameFcbVersion3Test.java @@ -135,7 +135,7 @@ public class DynamicFrameFcbVersion3Test { int signatureCheck = 0; try { - signatureCheck = dec.validateLevel1(keyPair.getPublic(),null); + signatureCheck = dec.validateLevel1(keyPair.getPublic()); } catch (InvalidKeyException | NoSuchAlgorithmException | SignatureException | IllegalArgumentException | UnsupportedOperationException | IOException | EncodingFormatException e) { assert(false); diff --git a/src/test/java/org/uic/barcode/test/DynamicFrameLOwLevelTest.java b/src/test/java/org/uic/barcode/test/DynamicFrameLOwLevelTest.java index d354837..b8a851b 100644 --- a/src/test/java/org/uic/barcode/test/DynamicFrameLOwLevelTest.java +++ b/src/test/java/org/uic/barcode/test/DynamicFrameLOwLevelTest.java @@ -84,17 +84,13 @@ public class DynamicFrameLOwLevelTest { } - @Test public void testDynamicHeaderBarcodeDecoding() { + @Test public void testDynamicHeaderBarcodeDecodingV1() { DynamicFrame barcode1 = SimpleDynamicFrameTestBarcode.getSimpleDynamicHeaderBarcode(algorithmOID, keyPair); byte[] encoded = barcode1.encode(); DynamicFrame barcode = DynamicFrame.decode(encoded); - - int signatureCheck = barcode.validateLevel1(keyPair.getPublic()); - - assert(signatureCheck == Constants.LEVEL1_VALIDATION_OK); SimpleDynamicFrameTestBarcode.compareFrame(barcode1, barcode); -- cgit v1.2.3