Skip to content

Commit

Permalink
DD4J-466 new default LOTL url
Browse files Browse the repository at this point in the history
  • Loading branch information
siimsuu committed Aug 21, 2019
1 parent bfcbb5f commit 4cd991f
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 90 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -55,7 +55,7 @@ DigiDoc4j is a Java library for digitally signing documents and creating digital
* Java 1.7
* Internet access to external verification services
* OCSP (Online Certificate Status Protocol) - http://ocsp.sk.ee
* EU TSL (European Commission's Trusted Status List) - https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml
* EU TSL (European Commission's Trusted Status List) - https://ec.europa.eu/tools/lotl/eu-lotl.xml
* All the EU member states' TL servers referred in the EU TSL. Note that this list may change. (e.g. https://sr.riik.ee/tsl/estonian-tsl.xml, https://sede.minetur.gob.es/Prestadores/TSL/TSL.xml, https://www.viestintavirasto.fi/attachments/TSL-Ficora.xml etc.)
* TSA (Time Stamping Authority) - http://tsa.sk.ee

Expand Down
6 changes: 3 additions & 3 deletions digidoc4j/src/main/doc/overview.html
Expand Up @@ -61,7 +61,7 @@ <h2>Validating signature container and all of its contents</h2>
<p>See also: {@link org.digidoc4j.SignatureValidationResult org.digidoc4j.ValidationResult}</p>
<h2>Using TSL lists as trust anchors</h2>
<p>TSL (Trust Service status List) list is a signed XML document that provides information about the status of trust services. The format is based on <a href="http://www.etsi.org/deliver/etsi_ts/119600_119699/119612/01.02.01_60/ts_119612v010201p.pdf" target="_blank">ETSI 119 612</a> standard. </p>
<p>digidoc4j uses TSL lists for checking the trustworthiness of the certificates that are used in the signature. The <a href="https://ec.europa.eu/information_society/policy/esignature/trusted-list/" target="_blank">European Commission's TSL</a> list is used as the List Of Trusted List (LOTL) (accessible from: <a href="https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml" target="_blank">https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml</a>).</p>
<p>digidoc4j uses TSL lists for checking the trustworthiness of the certificates that are used in the signature. The <a href="https://ec.europa.eu/information_society/policy/esignature/trusted-list/" target="_blank">European Commission's TSL</a> list is used as the List Of Trusted List (LOTL) (accessible from: <a href="https://ec.europa.eu/tools/lotl/eu-lotl.xml" target="_blank">https://ec.europa.eu/tools/lotl/eu-lotl.xml</a>).</p>
<p>The main use case regarding TSL lists usage is:</p>
<ol>
<li>Using TSL lists for checking the trustworthiness of the signer's certificate, OCSP service and time-stamping service certificates during signature creation and validation processes.</li>
Expand Down Expand Up @@ -123,7 +123,7 @@ <h2>Component diagram</h2>
</tr>
<tr>
<td>TSL repository</td>
<td><p>Repository for the European Commission's central TSL list with links to the locations where the trusted lists are published as notified by EU Member States, accessible from <a href="https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml" target="_blank">https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml</a>. <br>
<td><p>Repository for the European Commission's central TSL list with links to the locations where the trusted lists are published as notified by EU Member States, accessible from <a href="https://ec.europa.eu/tools/lotl/eu-lotl.xml" target="_blank">https://ec.europa.eu/tools/lotl/eu-lotl.xml</a>. <br>
<br>
See also: <br>
- Standard document: <a href="http://www.etsi.org/deliver/etsi_ts/119600_119699/119612/01.02.01_60/ts_119612v010201p.pdf" target="_blank">ETSI 119 612</a><br>
Expand Down Expand Up @@ -445,4 +445,4 @@ <h2>Test mode</h2>

<p><code><strong>java -Ddigidoc4j.mode=TEST -jar digidoc4j-util.jar</strong></code></p>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion digidoc4j/src/main/java/org/digidoc4j/Constant.java
Expand Up @@ -66,7 +66,7 @@ public static class Test {
public static class Production {

public static final String TSP_SOURCE = "http://tsa.sk.ee";
public static final String TSL_LOCATION = "https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml";
public static final String TSL_LOCATION = "https://ec.europa.eu/tools/lotl/eu-lotl.xml";
public static final String TSL_KEYSTORE_LOCATION = "keystore/keystore.jks";
public static final String VALIDATION_POLICY = "conf/constraint.xml";
public static final String OCSP_SOURCE = "http://ocsp.sk.ee/";
Expand Down
55 changes: 28 additions & 27 deletions digidoc4j/src/test/java/org/digidoc4j/ConfigurationTest.java
Expand Up @@ -10,11 +10,27 @@

package org.digidoc4j;

import eu.europa.esig.dss.tsl.Condition;
import eu.europa.esig.dss.tsl.KeyUsageBit;
import eu.europa.esig.dss.tsl.ServiceInfo;
import eu.europa.esig.dss.tsl.ServiceInfoStatus;
import eu.europa.esig.dss.x509.CertificateToken;
import static org.digidoc4j.Constant.BDOC_CONTAINER_TYPE;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.assertFalse;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.InetAddress;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.FileTime;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.digidoc4j.exceptions.ConfigurationException;
Expand All @@ -34,26 +50,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.InetAddress;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.FileTime;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.digidoc4j.Constant.BDOC_CONTAINER_TYPE;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.assertFalse;
import eu.europa.esig.dss.tsl.Condition;
import eu.europa.esig.dss.tsl.KeyUsageBit;
import eu.europa.esig.dss.tsl.ServiceInfo;
import eu.europa.esig.dss.tsl.ServiceInfoStatus;
import eu.europa.esig.dss.x509.CertificateToken;

public class ConfigurationTest extends AbstractTest {

Expand Down Expand Up @@ -441,7 +442,7 @@ public void defaultOcspSource() throws Exception {
@Test
public void defaultProductionConfiguration() throws Exception {
this.configuration = Configuration.of(Configuration.Mode.PROD);
Assert.assertEquals("https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml",
Assert.assertEquals("https://ec.europa.eu/tools/lotl/eu-lotl.xml",
this.configuration.getTslLocation());
}

Expand Down Expand Up @@ -496,7 +497,7 @@ public void maxDataFileCachedNotAllowedValueFromFile() {
public void defaultConstructorWithUnSetSystemProperty() throws Exception {
this.clearGlobalMode();
this.configuration = new Configuration();
Assert.assertEquals("https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml",
Assert.assertEquals("https://ec.europa.eu/tools/lotl/eu-lotl.xml",
this.configuration.getTslLocation());
}

Expand Down

0 comments on commit 4cd991f

Please sign in to comment.