From f27a600db14d745cb7f13f8dc839863078b7f1c7 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:37:32 +0200 Subject: - bug fix on travel date in train link in version 1.3 - bug fix on travel date in train link in version 1.3 - replaced out-dated java functions - switched all tests to non-deprecated functions --- .../barcode/ticketTestDB/SignatureValidationDBTicketTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/test/java/org/uic/barcode/ticketTestDB/SignatureValidationDBTicketTest.java') diff --git a/src/test/java/org/uic/barcode/ticketTestDB/SignatureValidationDBTicketTest.java b/src/test/java/org/uic/barcode/ticketTestDB/SignatureValidationDBTicketTest.java index e8922d2..d4b262f 100644 --- a/src/test/java/org/uic/barcode/ticketTestDB/SignatureValidationDBTicketTest.java +++ b/src/test/java/org/uic/barcode/ticketTestDB/SignatureValidationDBTicketTest.java @@ -2,6 +2,7 @@ package org.uic.barcode.ticketTestDB; import java.io.ByteArrayInputStream; import java.security.NoSuchAlgorithmException; +import java.security.Provider; import java.security.PublicKey; import java.security.Security; import java.security.cert.CertificateException; @@ -23,6 +24,8 @@ import org.uic.barcode.logger.LoggerFactory; public class SignatureValidationDBTicketTest { TimeZone defaulttimeZone = null; + + Provider provider= null; /** * Prepare tickets. @@ -30,8 +33,9 @@ public class SignatureValidationDBTicketTest { @Before public void prepare() { LoggerFactory.setActivateConsoleLog(true); - - Security.addProvider(new BouncyCastleProvider()); + + provider = new BouncyCastleProvider(); + Security.addProvider(provider); defaulttimeZone = TimeZone.getDefault(); //decode in local CET time zone @@ -63,7 +67,7 @@ public class SignatureValidationDBTicketTest { String algorithmOID = Constants.DSA_SHA256; - int result = decoder.validateLevel1(getPublicKey2(), algorithmOID); + int result = decoder.validateLevel1(getPublicKey2(), algorithmOID,provider); assert(result == 0); -- cgit v1.2.3