Skip to content
Permalink
Browse files

DD4J-476 Initial update of DSS to version 5.5.d4j.1

  • Loading branch information
rsarendus committed Oct 21, 2019
1 parent 3f6e136 commit 0e35a5ce5134d1aa7d3e7f434ebdb81d667f6617
Showing with 1,155 additions and 713 deletions.
  1. +3 −3 .idea/compiler.xml
  2. +2 −2 ddoc4j/pom.xml
  3. +4 −19 digidoc4j/pom.xml
  4. +1 −1 digidoc4j/src/main/java/org/digidoc4j/CertificateValidator.java
  5. +3 −3 digidoc4j/src/main/java/org/digidoc4j/CertificateValidatorBuilder.java
  6. +1 −1 digidoc4j/src/main/java/org/digidoc4j/Configuration.java
  7. +1 −1 digidoc4j/src/main/java/org/digidoc4j/Container.java
  8. +1 −1 digidoc4j/src/main/java/org/digidoc4j/ContainerBuilder.java
  9. +1 −1 digidoc4j/src/main/java/org/digidoc4j/ContainerOpener.java
  10. +8 −8 digidoc4j/src/main/java/org/digidoc4j/DataFile.java
  11. +3 −3 digidoc4j/src/main/java/org/digidoc4j/DetachedXadesSignatureBuilder.java
  12. +2 −2 digidoc4j/src/main/java/org/digidoc4j/DigestAlgorithm.java
  13. +2 −2 digidoc4j/src/main/java/org/digidoc4j/DigestDataFile.java
  14. +1 −1 digidoc4j/src/main/java/org/digidoc4j/ExtendedCertificateSource.java
  15. +1 −1 digidoc4j/src/main/java/org/digidoc4j/LargeDataFile.java
  16. +1 −1 digidoc4j/src/main/java/org/digidoc4j/OCSPSourceBuilder.java
  17. +7 −0 digidoc4j/src/main/java/org/digidoc4j/Signature.java
  18. +5 −5 digidoc4j/src/main/java/org/digidoc4j/SignatureBuilder.java
  19. +12 −12 digidoc4j/src/main/java/org/digidoc4j/SignatureParameters.java
  20. +4 −4 digidoc4j/src/main/java/org/digidoc4j/SignatureValidationResult.java
  21. +2 −2 digidoc4j/src/main/java/org/digidoc4j/SignedInfo.java
  22. +4 −4 digidoc4j/src/main/java/org/digidoc4j/TSLCertificateSource.java
  23. +1 −1 digidoc4j/src/main/java/org/digidoc4j/exceptions/SignatureVerificationException.java
  24. +4 −4 digidoc4j/src/main/java/org/digidoc4j/impl/AbstractSignatureValidationResult.java
  25. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/CommonOCSPCertificateSource.java
  26. +3 −3 digidoc4j/src/main/java/org/digidoc4j/impl/CommonOCSPSource.java
  27. +13 −16 digidoc4j/src/main/java/org/digidoc4j/impl/OCSPCertificateValidator.java
  28. +8 −9 digidoc4j/src/main/java/org/digidoc4j/impl/SKOnlineOCSPSource.java
  29. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/SignatureFinalizer.java
  30. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/SkDataLoader.java
  31. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/SkOCSPDataLoader.java
  32. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/SkTimestampDataLoader.java
  33. +6 −6 digidoc4j/src/main/java/org/digidoc4j/impl/StreamDocument.java
  34. +4 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicContainer.java
  35. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicContainerCreator.java
  36. +3 −3 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicContainerParser.java
  37. +4 −4 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicContainerValidationResult.java
  38. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicDataFile.java
  39. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicEntry.java
  40. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicFileContainerParser.java
  41. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicParseResult.java
  42. +7 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignature.java
  43. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignatureBuilder.java
  44. +12 −12 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignatureFinalizer.java
  45. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignatureParser.java
  46. +2 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicStreamContainerParser.java
  47. +6 −6 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicValidationReportBuilder.java
  48. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/CachingDataLoader.java
  49. +3 −3 digidoc4j/src/main/java/org/digidoc4j/impl/asic/DataLoaderDecorator.java
  50. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/DetachedContentCreator.java
  51. +13 −24 digidoc4j/src/main/java/org/digidoc4j/impl/asic/OcspNonceValidator.java
  52. +28 −7 digidoc4j/src/main/java/org/digidoc4j/impl/asic/SKCommonCertificateVerifier.java
  53. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/TimeStampContainerValidationResult.java
  54. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/TimeStampTokenValidator.java
  55. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/AsicEContainerValidator.java
  56. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/bdoc/BDocSignatureFinalizer.java
  57. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/manifest/AsicManifest.java
  58. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/manifest/ManifestParser.java
  59. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/manifest/ManifestValidator.java
  60. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/ocsp/BDocTMOcspSource.java
  61. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/report/ContainerValidationReport.java
  62. +2 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/report/SignatureValidationReport.java
  63. +7 −6 digidoc4j/src/main/java/org/digidoc4j/impl/asic/report/SignatureValidationReportCreator.java
  64. +6 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/tsl/LazyCertificatePool.java
  65. +12 −14 digidoc4j/src/main/java/org/digidoc4j/impl/asic/tsl/LazyTslCertificateSource.java
  66. +10 −4 digidoc4j/src/main/java/org/digidoc4j/impl/asic/tsl/TSLCertificateSourceImpl.java
  67. +5 −6 digidoc4j/src/main/java/org/digidoc4j/impl/asic/tsl/TslLoader.java
  68. +16 −11 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/BesSignature.java
  69. +5 −5 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/SignatureExtender.java
  70. +8 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/TimemarkSignature.java
  71. +3 −3 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/TimestampSignature.java
  72. +7 −0 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesSignature.java
  73. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesSignatureParser.java
  74. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesSignatureWrapper.java
  75. +20 −20 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesSigningDssFacade.java
  76. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesValidationDssFacade.java
  77. +2 −2 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesValidationReportGenerator.java
  78. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesValidationReportProcessor.java
  79. +5 −5 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/validation/FullSimpleReportBuilder.java
  80. +0 −8 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/validation/TimemarkSignatureValidator.java
  81. +12 −11 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/validation/TimestampSignatureValidator.java
  82. +11 −13 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/validation/XadesSignatureValidator.java
  83. +1 −1 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/validation/XadesValidationResult.java
  84. +5 −0 digidoc4j/src/main/java/org/digidoc4j/impl/ddoc/DDocSignature.java
  85. +8 −8 digidoc4j/src/main/java/org/digidoc4j/impl/pades/PadesContainer.java
  86. +3 −3 digidoc4j/src/main/java/org/digidoc4j/impl/pades/PadesContainerValidationResult.java
  87. +2 −2 digidoc4j/src/main/java/org/digidoc4j/main/CommandLineExecutor.java
  88. +3 −3 digidoc4j/src/main/java/org/digidoc4j/main/ContainerVerifier.java
  89. +3 −3 digidoc4j/src/main/java/org/digidoc4j/main/KeystoreGenerator.java
  90. +1 −1 digidoc4j/src/main/java/org/digidoc4j/main/MultipleContainersExecutor.java
  91. +5 −5 digidoc4j/src/main/java/org/digidoc4j/signers/PKCS11SignatureToken.java
  92. +4 −4 digidoc4j/src/main/java/org/digidoc4j/signers/PKCS12SignatureToken.java
  93. +6 −6 digidoc4j/src/main/java/org/digidoc4j/signers/TimestampToken.java
  94. +4 −4 digidoc4j/src/main/java/org/digidoc4j/utils/Helper.java
  95. +1 −1 digidoc4j/src/main/java/org/digidoc4j/utils/MimeTypeUtil.java
  96. +2 −2 digidoc4j/src/main/java/org/digidoc4j/utils/PolicyUtils.java
  97. +64 −0 digidoc4j/src/main/java/org/digidoc4j/utils/ZipEntryInputStream.java
  98. +2 −2 digidoc4j/src/main/resources/conf/constraint.xml
  99. +2 −2 digidoc4j/src/main/resources/conf/eIDAS_test_constraint.xml
  100. +2 −2 digidoc4j/src/main/resources/conf/test_constraint.xml
  101. +5 −5 digidoc4j/src/test/java/org/digidoc4j/AbstractTest.java
  102. +1 −1 digidoc4j/src/test/java/org/digidoc4j/CertificateValidatorBuilderTest.java
  103. +7 −7 digidoc4j/src/test/java/org/digidoc4j/ConfigurationTest.java
  104. +3 −1 digidoc4j/src/test/java/org/digidoc4j/DetachedXadesSignatureBuilderTest.java
  105. +1 −1 digidoc4j/src/test/java/org/digidoc4j/FileWritingOperationsTest.java
  106. +5 −5 digidoc4j/src/test/java/org/digidoc4j/SignatureBuilderTest.java
  107. +25 −20 digidoc4j/src/test/java/org/digidoc4j/SignatureTest.java
  108. +2 −2 digidoc4j/src/test/java/org/digidoc4j/impl/DataToSignSerializationTest.java
  109. +4 −4 digidoc4j/src/test/java/org/digidoc4j/impl/SkDataLoaderTest.java
  110. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/SkOCSPDataLoaderTest.java
  111. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/SkTimestampDataLoaderTest.java
  112. +3 −3 digidoc4j/src/test/java/org/digidoc4j/impl/StreamDocumentTest.java
  113. +32 −30 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/BDocContainerTest.java
  114. +6 −3 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/BDocSerializationTest.java
  115. +13 −9 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/BDocSignatureOpenerTest.java
  116. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ContainerParticlesRemovalTest.java
  117. +94 −86 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ValidationTests.java
  118. +8 −8 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/asic/TimeStampTokenTest.java
  119. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/manifest/ManifestParserTest.java
  120. +4 −4 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/manifest/ManifestValidatorTest.java
  121. +9 −7 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ocsp/SKOnlineOCSPSourceTest.java
  122. +9 −8 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/report/SignatureValidationReportTest.java
  123. +35 −11 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/report/ValidationReportTest.java
  124. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/tsl/LazyTslLoadingTest.java
  125. +1 −1 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/tsl/TslLoaderTest.java
  126. +15 −8 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/xades/XadesSignatureParserTest.java
  127. +8 −8 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/xades/XadesSigningDssFacadeTest.java
  128. +5 −5 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/xades/XadesValidationReportProcessorTest.java
  129. +2 −2 digidoc4j/src/test/java/org/digidoc4j/jvm/JvmParametersTest.java
  130. +6 −6 digidoc4j/src/test/java/org/digidoc4j/main/DigiDoc4JTest.java
  131. +1 −1 digidoc4j/src/test/java/org/digidoc4j/signers/ExternalSignerTest.java
  132. +1 −1 digidoc4j/src/test/java/org/digidoc4j/test/MockDataFile.java
  133. +7 −8 digidoc4j/src/test/java/org/digidoc4j/test/MockOCSPSource.java
  134. +5 −0 digidoc4j/src/test/java/org/digidoc4j/test/MockSignature.java
  135. +1 −1 digidoc4j/src/test/java/org/digidoc4j/test/MockSignatureBuilder.java
  136. +1 −1 digidoc4j/src/test/java/org/digidoc4j/test/MockStreamDocument.java
  137. +22 −14 digidoc4j/src/test/java/org/digidoc4j/test/TestAssert.java
  138. +1 −1 digidoc4j/src/test/java/org/digidoc4j/test/util/TestDataBuilderUtil.java
  139. +50 −0 digidoc4j/src/test/java/org/digidoc4j/test/util/TestIdUtil.java
  140. +2 −2 digidoc4j/src/test/java/org/digidoc4j/test/util/TestTSLUtil.java
  141. +4 −5 digidoc4j/src/test/java/org/digidoc4j/utils/CertificatesForTests.java
  142. +1 −1 digidoc4j/src/test/java/org/digidoc4j/utils/HelperTest.java
  143. +2 −2 digidoc4j/src/test/java/org/digidoc4j/utils/PolicyUtilsTest.java
  144. +242 −0 digidoc4j/src/test/java/org/digidoc4j/utils/ZipEntryInputStreamTest.java
  145. +20 −23 digidoc4j/src/test/resources/testFiles/certs/exampleCA.cer
  146. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/eIDAS_test_constraint_all_fail_level.xml
  147. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/eIDAS_test_constraint_all_inform_level.xml
  148. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/eIDAS_test_constraint_all_warn_level.xml
  149. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/eIDAS_test_constraint_version_fail.xml
  150. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/eIDAS_test_constraint_well_signed_fail.xml
  151. +2 −2 digidoc4j/src/test/resources/testFiles/constraints/moved_constraint.xml
  152. BIN digidoc4j/src/test/resources/testFiles/p12/user_one.p12
  153. +5 −15 pom.xml
  154. +1 −1 publish.sh
@@ -11,9 +11,9 @@
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="ddoc4j" target="1.7" />
<module name="digidoc4j" target="1.7" />
<module name="digidoc4j-parent" target="1.7" />
<module name="ddoc4j" target="1.8" />
<module name="digidoc4j" target="1.8" />
<module name="digidoc4j-parent" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
@@ -6,7 +6,7 @@
<groupId>org.digidoc4j</groupId>
<artifactId>ddoc4j</artifactId>
<packaging>jar</packaging>
<version>3.3.0</version>
<version>4.0.0-SNAPSHOT</version>

<name>DDoc4J</name>
<description>DDoc4J is Java Library for validating DDOC documents. It's not recommended to use it directly but rather through DigiDoc4J's API.</description>
@@ -15,7 +15,7 @@
<parent>
<artifactId>digidoc4j-parent</artifactId>
<groupId>org.digidoc4j</groupId>
<version>3.3.0</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<dependencies>
@@ -7,7 +7,7 @@
<groupId>org.digidoc4j</groupId>
<artifactId>digidoc4j</artifactId>
<packaging>jar</packaging>
<version>3.3.0</version>
<version>4.0.0-SNAPSHOT</version>

<name>DigiDoc4j</name>
<description>DigiDoc4j is a Java library for digitally signing documents and creating digital signature containers
@@ -18,14 +18,14 @@
<parent>
<artifactId>digidoc4j-parent</artifactId>
<groupId>org.digidoc4j</groupId>
<version>3.3.0</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<properties>
<logback-classic.version>1.2.3</logback-classic.version>
<junit.version>4.12</junit.version>
<dss.groupId>org.digidoc4j.dss</dss.groupId>
<dss.version>5.4.d4j.1</dss.version>
<dss.version>5.5.d4j.1</dss.version>
<dss.util.build>${project.build.directory}/build/util</dss.util.build>
<dss.util.lib>${project.build.directory}/library/util</dss.util.lib>
<dss.zip.lib>${project.build.directory}/library/zip</dss.zip.lib>
@@ -43,7 +43,7 @@
<dependency>
<artifactId>ddoc4j</artifactId>
<groupId>org.digidoc4j</groupId>
<version>3.3.0</version>
<version>4.0.0-SNAPSHOT</version>
</dependency>

<dependency>
@@ -120,11 +120,6 @@
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-common-validation-jaxb</artifactId>
<version>${dss.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-detailed-report-jaxb</artifactId>
@@ -150,11 +145,6 @@
<artifactId>dss-policy-jaxb</artifactId>
<version>${dss.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-reports</artifactId>
<version>${dss.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-service</artifactId>
@@ -175,11 +165,6 @@
<artifactId>dss-token</artifactId>
<version>${dss.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-tsl-jaxb</artifactId>
<version>${dss.version}</version>
</dependency>
<dependency>
<groupId>${dss.groupId}</groupId>
<artifactId>dss-tsl-validation</artifactId>
@@ -4,7 +4,7 @@

import org.digidoc4j.exceptions.CertificateValidationException;

import eu.europa.esig.dss.x509.CertificateSource;
import eu.europa.esig.dss.spi.x509.CertificateSource;

/**
* Created by Janar Rahumeel (CGI Estonia)
@@ -7,9 +7,9 @@
import org.digidoc4j.impl.CommonOCSPCertificateSource;
import org.digidoc4j.impl.OCSPCertificateValidator;

import eu.europa.esig.dss.DSSException;
import eu.europa.esig.dss.x509.CertificateSource;
import eu.europa.esig.dss.x509.ocsp.OCSPSource;
import eu.europa.esig.dss.model.DSSException;
import eu.europa.esig.dss.spi.x509.CertificateSource;
import eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPSource;

/**
* Builder for certificate validator. Currently only OCSP is supported
@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.client.http.Protocol;
import eu.europa.esig.dss.spi.client.http.Protocol;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
@@ -17,7 +17,7 @@
import java.security.cert.X509Certificate;
import java.util.List;

import eu.europa.esig.dss.MimeType;
import eu.europa.esig.dss.model.MimeType;

/**
* Offers functionality for handling data files and signatures in a container.
@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.DigestAlgorithm;
import eu.europa.esig.dss.enumerations.DigestAlgorithm;
import org.apache.commons.lang3.StringUtils;
import org.digidoc4j.exceptions.DigiDoc4JException;
import org.digidoc4j.exceptions.InvalidDataFileException;
@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.MimeType;
import eu.europa.esig.dss.model.MimeType;
import org.digidoc4j.exceptions.DigiDoc4JException;
import org.digidoc4j.impl.asic.AsicFileContainerParser;
import org.digidoc4j.impl.asic.AsicParseResult;
@@ -10,14 +10,14 @@

package org.digidoc4j;

import eu.europa.esig.dss.DSSDocument;
import eu.europa.esig.dss.DSSException;
import eu.europa.esig.dss.DSSUtils;
import eu.europa.esig.dss.Digest;
import eu.europa.esig.dss.DigestAlgorithm;
import eu.europa.esig.dss.FileDocument;
import eu.europa.esig.dss.InMemoryDocument;
import eu.europa.esig.dss.MimeType;
import eu.europa.esig.dss.model.DSSDocument;
import eu.europa.esig.dss.model.DSSException;
import eu.europa.esig.dss.spi.DSSUtils;
import eu.europa.esig.dss.model.Digest;
import eu.europa.esig.dss.enumerations.DigestAlgorithm;
import eu.europa.esig.dss.model.FileDocument;
import eu.europa.esig.dss.model.InMemoryDocument;
import eu.europa.esig.dss.model.MimeType;
import org.apache.commons.io.IOUtils;
import org.digidoc4j.exceptions.DigiDoc4JException;
import org.digidoc4j.exceptions.InvalidDataFileException;
@@ -10,8 +10,8 @@

package org.digidoc4j;

import eu.europa.esig.dss.InMemoryDocument;
import eu.europa.esig.dss.Policy;
import eu.europa.esig.dss.model.InMemoryDocument;
import eu.europa.esig.dss.model.Policy;
import org.digidoc4j.exceptions.DataFileMissingException;
import org.digidoc4j.exceptions.InvalidSignatureException;
import org.digidoc4j.exceptions.NotSupportedException;
@@ -153,7 +153,7 @@ public DetachedXadesSignatureBuilder withRoles(String... roles) {
* @return builder for creating a signature.
*/
public DetachedXadesSignatureBuilder withSignatureId(String signatureId) {
signatureParameters.setSignatureId(signatureId);
signatureParameters.setXmlDigitalSignatureId(signatureId);
return this;
}

@@ -55,8 +55,8 @@ public URL uri() {
return digestInfoPrefix;
}

public eu.europa.esig.dss.DigestAlgorithm getDssDigestAlgorithm() {
return eu.europa.esig.dss.DigestAlgorithm.forXML(uri.toString());
public eu.europa.esig.dss.enumerations.DigestAlgorithm getDssDigestAlgorithm() {
return eu.europa.esig.dss.enumerations.DigestAlgorithm.forXML(uri.toString());
}

/**
@@ -7,8 +7,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import eu.europa.esig.dss.DigestDocument;
import eu.europa.esig.dss.MimeType;
import eu.europa.esig.dss.model.DigestDocument;
import eu.europa.esig.dss.model.MimeType;

public class DigestDataFile extends DataFile {

@@ -3,7 +3,7 @@
import java.io.FileFilter;
import java.nio.file.Path;

import eu.europa.esig.dss.x509.CertificateSource;
import eu.europa.esig.dss.spi.x509.CertificateSource;

/**
* Created by Janar Rahumeel (CGI Estonia)
@@ -17,7 +17,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import eu.europa.esig.dss.DSSDocument;
import eu.europa.esig.dss.model.DSSDocument;

/**
* Handling large files from a stream to be stored temporarily on disk.
@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.x509.ocsp.OCSPSource;
import eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPSource;
import org.digidoc4j.impl.CommonOCSPSource;
import org.digidoc4j.impl.ConfigurationSingeltonHolder;
import org.digidoc4j.impl.SKOnlineOCSPSource;
@@ -42,6 +42,13 @@
*/
String getId();

/**
* Returns XML digital signature id if present.
*
* @return XML digital signature id.
*/
String getXmlDigitalSignatureId();

/**
* Returns the signature OCSP response nonce.
* <p>
@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.Policy;
import eu.europa.esig.dss.model.Policy;
import org.apache.commons.lang3.StringUtils;
import org.digidoc4j.exceptions.ContainerWithoutFilesException;
import org.digidoc4j.exceptions.NotSupportedException;
@@ -48,7 +48,7 @@
* &nbsp;&nbsp; {@link SignatureBuilder#withSignatureDigestAlgorithm(DigestAlgorithm) withSignatureDigestAlgorithm(DigestAlgorithm.SHA256)}. // Digest algorithm is SHA-256 <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withSignatureProfile(SignatureProfile) withSignatureProfile(SignatureProfile.LT_TM)}. // Signature profile is Time-Mark <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withSigningCertificate(X509Certificate) withSigningCertificate(x509Certificate)}. <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withSignatureId(String) withSignatureId("1")}. <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withXmlDigitalSignatureId(String) withXmlDigitalSignatureId("1")}. <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withSignatureToken(SignatureToken) withSignatureToken(signatureToken)}. // Use signature token <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withEncryptionAlgorithm(EncryptionAlgorithm) withEncryptionAlgorithm(EncryptionAlgorithm.RSA)}. // Encryption algorithm is RSA <br/>
* &nbsp;&nbsp; {@link SignatureBuilder#withOwnSignaturePolicy(Policy) withOwnSignaturePolicy(policy)}. <br/>
@@ -293,11 +293,11 @@ public SignatureBuilder withSigningCertificate(X509Certificate certificate) {
/**
* Set signature ID.
*
* @param signatureId signature id.
* @param xmlDigitalSignatureId XML digital signature id.
* @return builder for creating a signature.
*/
public SignatureBuilder withSignatureId(String signatureId) {
signatureParameters.setSignatureId(signatureId);
public SignatureBuilder withXmlDigitalSignatureId(String xmlDigitalSignatureId) {
signatureParameters.setXmlDigitalSignatureId(xmlDigitalSignatureId);
return this;
}

@@ -10,7 +10,7 @@

package org.digidoc4j;

import eu.europa.esig.dss.Policy;
import eu.europa.esig.dss.model.Policy;
import org.apache.commons.io.IOUtils;
import org.digidoc4j.exceptions.DigiDoc4JException;
import org.slf4j.Logger;
@@ -31,7 +31,7 @@
* <ul>
* <li>Signature production place</li>
* <li>Roles of the signer</li>
* <li>Signature id</li>
* <li>XML digital signature id</li>
* <li>Digest algorithm</li>
* <li>Encryption algorithm</li>
* <li>Signature profile</li>
@@ -44,7 +44,7 @@
private static final Logger logger = LoggerFactory.getLogger(SignatureParameters.class);
private SignatureProductionPlace productionPlace = new SignatureProductionPlace();
private List<String> roles = new ArrayList<>();
private String signatureId;
private String xmlDigitalSignatureId;
private DigestAlgorithm digestAlgorithm;
private EncryptionAlgorithm encryptionAlgorithm;
private SignatureProfile signatureProfile;
@@ -123,22 +123,22 @@ public void setRoles(List<String> roles) {
}

/**
* Set signature id.
* Set XML digital signature id.
*
* @param signatureId signature ID
* @param xmlDigitalSignatureId signature ID
*/
public void setSignatureId(String signatureId) {
logger.debug("Set signature id to " + signatureId);
this.signatureId = signatureId;
public void setXmlDigitalSignatureId(String xmlDigitalSignatureId) {
logger.debug("Set XML digital signature id to " + xmlDigitalSignatureId);
this.xmlDigitalSignatureId = xmlDigitalSignatureId;
}

/**
* Get signature id.
* Get XML digital signature id.
*
* @return signatureId signature ID
* @return xmlDigitalSignatureId signature ID
*/
public String getSignatureId() {
return signatureId;
public String getXmlDigitalSignatureId() {
return xmlDigitalSignatureId;
}

/**
@@ -15,10 +15,10 @@

import org.digidoc4j.impl.asic.report.SignatureValidationReport;

import eu.europa.esig.dss.validation.SignatureQualification;
import eu.europa.esig.dss.validation.policy.rules.Indication;
import eu.europa.esig.dss.validation.policy.rules.SubIndication;
import eu.europa.esig.dss.validation.reports.SimpleReport;
import eu.europa.esig.dss.enumerations.SignatureQualification;
import eu.europa.esig.dss.enumerations.Indication;
import eu.europa.esig.dss.enumerations.SubIndication;
import eu.europa.esig.dss.simplereport.SimpleReport;

/**
* Validation result information.
@@ -10,13 +10,13 @@

package org.digidoc4j;

import eu.europa.esig.dss.DSSUtils;
import eu.europa.esig.dss.spi.DSSUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Serializable;

import static eu.europa.esig.dss.DigestAlgorithm.forXML;
import static eu.europa.esig.dss.enumerations.DigestAlgorithm.forXML;

public class SignedInfo implements Serializable {

0 comments on commit 0e35a5c

Please sign in to comment.
You can’t perform that action at this time.