Skip to content

Commit cb87e98

Browse files
Alexandr Pliushchouintrofog
authored andcommitted
Update itext-eu-trusted-lists-resources dependency
* Save lotl files in transition state DEVSIX-9919
1 parent 26d74e8 commit cb87e98

64 files changed

Lines changed: 272548 additions & 43 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sign/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>com.itextpdf</groupId>
7474
<artifactId>eu-trusted-lists-resources</artifactId>
75-
<version>1.0.0</version>
75+
<version>1.1.0</version>
7676
<optional>true</optional>
7777
</dependency>
7878
</dependencies>

sign/src/test/java/com/itextpdf/signatures/validation/EuropeanTrustedCertificatesLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class EuropeanTrustedCertificatesLoaderTest extends ExtendedITextTest {
3737
public void loadCertificates() {
3838
EuropeanTrustedListConfigurationFactory factory = EuropeanTrustedListConfigurationFactory.getFactory().get();
3939
List<Certificate> f = factory.getCertificates();
40-
Assertions.assertEquals(8, f.size(), "There should be 8 certificates loaded from the EU trusted list");
40+
Assertions.assertEquals(6, f.size(), "There should be 6 certificates loaded from the EU trusted list");
4141
}
4242

4343
@Test

sign/src/test/java/com/itextpdf/signatures/validation/lotl/LotlValidatorTest.java

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ This file is part of the iText (R) project.
3737
import com.itextpdf.test.annotations.LogMessage;
3838
import com.itextpdf.test.annotations.LogMessages;
3939

40-
import org.junit.jupiter.api.AfterAll;
41-
import org.junit.jupiter.api.Assertions;
42-
import org.junit.jupiter.api.BeforeAll;
43-
import org.junit.jupiter.api.Tag;
44-
import org.junit.jupiter.api.Test;
45-
4640
import java.io.IOException;
4741
import java.io.InputStream;
4842
import java.net.URL;
@@ -54,7 +48,12 @@ This file is part of the iText (R) project.
5448
import java.util.HashMap;
5549
import java.util.List;
5650
import java.util.Map;
57-
51+
import org.junit.jupiter.api.AfterAll;
52+
import org.junit.jupiter.api.Assertions;
53+
import org.junit.jupiter.api.BeforeAll;
54+
import org.junit.jupiter.api.Tag;
55+
import org.junit.jupiter.api.Test;
56+
import static com.itextpdf.signatures.logs.SignLogMessageConstant.OJ_TRANSITION_PERIOD;
5857
import static org.junit.jupiter.api.Assertions.assertThrows;
5958

6059
@Tag("BouncyCastleIntegrationTest")
@@ -65,6 +64,9 @@ public class LotlValidatorTest extends ExtendedITextTest {
6564
private static final String SOURCE_FOLDER_LOTL_FILES = "./src/test/resources/com/itextpdf/signatures/validation" +
6665
"/lotl/LotlState2025_08_08/";
6766

67+
private static final String SOURCE_FOLDER_LOTL_2026_FILES = "./src/test/resources/com/itextpdf/signatures/validation" +
68+
"/lotl/LotlState2026_04_17/";
69+
6870
@BeforeAll
6971
public static void beforeAll() {
7072
// Initialize the LotlService with a default EuropeanResourceFetcher
@@ -234,8 +236,10 @@ public void euJournalCertificatesEmptyTest() {
234236
new EuropeanResourceFetcher() {
235237
@Override
236238
public Result getEUJournalCertificates() {
237-
Result result = super.getEUJournalCertificates();
239+
Result result = new Result();
238240
result.setCertificates(Collections.<Certificate>emptyList());
241+
result.setCurrentlySupportedPublication(
242+
"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.C_.2019.276.01.0001.01.ENG");
239243
return result;
240244
}
241245
})) {
@@ -245,6 +249,16 @@ public Result getEUJournalCertificates() {
245249
Assertions.assertEquals(LotlValidator.LOTL_VALIDATION_UNSUCCESSFUL, e.getMessage());
246250
}
247251

252+
@Test
253+
@LogMessages(messages = @LogMessage(messageTemplate = OJ_TRANSITION_PERIOD))
254+
public void europeanReleaseVersion2026_04_17Test() {
255+
try (LotlService service = new EuropeanLotlService(new LotlFetchingProperties(new RemoveOnFailingCountryData()))) {
256+
service.withCustomResourceRetriever(new FromDiskResourceRetriever(SOURCE_FOLDER_LOTL_2026_FILES));
257+
service.initializeCache();
258+
AssertUtil.doesNotThrow(() -> service.getLotlValidator().validate());
259+
}
260+
}
261+
248262
@Test
249263
public void euJournalEmptyResultTest() {
250264
Exception e;
@@ -307,8 +321,10 @@ public void mainLotlFileContainsTwoJournalsAndNewOneIsUsedTest() {
307321
@Override
308322
protected List<String> getPivotsUrlList(byte[] lotlXml) {
309323
return Arrays.asList(new String[] {
310-
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-341.xml",
324+
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-378.xml",
311325
"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.C_.9999.999.99.9999.99.ENG.test",
326+
"https://eur-lex.europa.eu/eli/C/2026/1944/oj",
327+
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-341.xml",
312328
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-335.xml",
313329
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-300.xml",
314330
"https://ec.europa.eu/tools/lotl/eu-lotl-pivot-282.xml",

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/all-countries.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-AT.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-BE.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-BG.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-CY.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-CZ.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sign/src/test/resources/com/itextpdf/signatures/validation/lotl/LotlServiceTest/single-country-DE.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)