Skip to content
Permalink
Browse files

Merge branch 'develop'

# Conflicts:
#	digidoc4j/src/main/java/org/digidoc4j/DetachedXadesSignatureBuilder.java
  • Loading branch information...
JorgenHeinsoo committed Jun 27, 2019
2 parents d1b34bd + a29c775 commit 7f99bde4423cafccc3b9bcf78a0748c5b6712e80
Showing with 4,859 additions and 1,497 deletions.
  1. +55 −0 .mvn/settings.xml
  2. BIN .mvn/wrapper/dists/apache-maven-3.5.2-bin.zip
  3. BIN .mvn/wrapper/maven-wrapper.jar
  4. +1 −0 .mvn/wrapper/maven-wrapper.properties
  5. +1 −0 .travis.yml
  6. +1 −0 AUTHORS
  7. +2 −2 ddoc4j/pom.xml
  8. +1 −1 ddoc4j/src/main/java/org/digidoc4j/ddoc/factory/SAXDigiDocFactory.java
  9. +26 −26 digidoc4j/pom.xml
  10. +28 −30 digidoc4j/src/main/java/org/digidoc4j/DataFile.java
  11. +8 −11 digidoc4j/src/main/java/org/digidoc4j/DataToSign.java
  12. +44 −300 digidoc4j/src/main/java/org/digidoc4j/DetachedXadesSignatureBuilder.java
  13. +5 −5 digidoc4j/src/main/java/org/digidoc4j/OCSPSourceBuilder.java
  14. +18 −0 digidoc4j/src/main/java/org/digidoc4j/ServiceType.java
  15. +24 −27 digidoc4j/src/main/java/org/digidoc4j/SignatureBuilder.java
  16. +85 −0 digidoc4j/src/main/java/org/digidoc4j/SignatureFinalizerBuilder.java
  17. +30 −6 digidoc4j/src/main/java/org/digidoc4j/SignatureParameters.java
  18. +4 −7 digidoc4j/src/main/java/org/digidoc4j/SignedInfo.java
  19. +8 −19 digidoc4j/src/main/java/org/digidoc4j/X509Cert.java
  20. +36 −37 digidoc4j/src/main/java/org/digidoc4j/exceptions/CertificateValidationException.java
  21. +20 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/ConnectionTimedOutException.java
  22. +8 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/DuplicateSignatureFilesException.java
  23. +20 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/InvalidServiceUrlException.java
  24. +39 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/NetworkException.java
  25. +20 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/ServiceAccessDeniedException.java
  26. +20 −0 digidoc4j/src/main/java/org/digidoc4j/exceptions/ServiceUnavailableException.java
  27. +0 −11 digidoc4j/src/main/java/org/digidoc4j/exceptions/TimestampAfterOCSPResponseTimeException.java
  28. +43 −21 digidoc4j/src/main/java/org/digidoc4j/impl/CommonOCSPSource.java
  29. +26 −46 digidoc4j/src/main/java/org/digidoc4j/impl/OCSPCertificateValidator.java
  30. +149 −73 digidoc4j/src/main/java/org/digidoc4j/impl/SKOnlineOCSPSource.java
  31. +57 −13 digidoc4j/src/main/java/org/digidoc4j/impl/SignatureFinalizer.java
  32. +35 −47 digidoc4j/src/main/java/org/digidoc4j/impl/{asic → }/SkDataLoader.java
  33. +34 −0 digidoc4j/src/main/java/org/digidoc4j/impl/SkOCSPDataLoader.java
  34. +28 −0 digidoc4j/src/main/java/org/digidoc4j/impl/SkTimestampDataLoader.java
  35. +10 −15 digidoc4j/src/main/java/org/digidoc4j/impl/StreamDocument.java
  36. +26 −27 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicContainer.java
  37. +0 −3 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignature.java
  38. +36 −295 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignatureBuilder.java
  39. +293 −0 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicSignatureFinalizer.java
  40. +14 −21 digidoc4j/src/main/java/org/digidoc4j/impl/asic/AsicValidationReportBuilder.java
  41. +42 −11 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/AsicEContainerValidator.java
  42. +0 −3 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/AsicESignatureBuilder.java
  43. +44 −0 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/AsicESignatureFinalizer.java
  44. +2 −23 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/bdoc/BDocContainerValidator.java
  45. +0 −32 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/bdoc/BDocSignatureBuilder.java
  46. +60 −0 digidoc4j/src/main/java/org/digidoc4j/impl/asic/asice/bdoc/BDocSignatureFinalizer.java
  47. +10 −13 digidoc4j/src/main/java/org/digidoc4j/impl/asic/manifest/ManifestValidator.java
  48. +20 −5 digidoc4j/src/main/java/org/digidoc4j/impl/asic/ocsp/BDocTMOcspSource.java
  49. +25 −25 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/SignatureExtender.java
  50. +1 −11 digidoc4j/src/main/java/org/digidoc4j/impl/asic/xades/XadesValidationReportGenerator.java
  51. +13 −3 digidoc4j/src/main/java/org/digidoc4j/impl/ddoc/DDocFacade.java
  52. +0 −2 digidoc4j/src/main/java/org/digidoc4j/impl/ddoc/DDocSignature.java
  53. +17 −27 digidoc4j/src/main/java/org/digidoc4j/main/ContainerVerifier.java
  54. +10 −21 digidoc4j/src/main/java/org/digidoc4j/signers/PKCS12SignatureToken.java
  55. +24 −14 digidoc4j/src/main/java/org/digidoc4j/signers/TimestampToken.java
  56. +25 −0 digidoc4j/src/main/java/org/digidoc4j/utils/CertificateUtils.java
  57. +49 −0 digidoc4j/src/main/java/org/digidoc4j/utils/PolicyUtils.java
  58. +30 −6 digidoc4j/src/test/java/org/digidoc4j/AbstractTest.java
  59. +2 −4 digidoc4j/src/test/java/org/digidoc4j/CertificateValidatorBuilderTest.java
  60. +0 −1 digidoc4j/src/test/java/org/digidoc4j/ConfigurationTest.java
  61. +17 −0 digidoc4j/src/test/java/org/digidoc4j/ContainerBuilderTest.java
  62. +91 −5 digidoc4j/src/test/java/org/digidoc4j/ContainerTest.java
  63. +152 −11 digidoc4j/src/test/java/org/digidoc4j/DetachedXadesSignatureBuilderTest.java
  64. +8 −9 digidoc4j/src/test/java/org/digidoc4j/FileWritingOperationsTest.java
  65. +0 −23 digidoc4j/src/test/java/org/digidoc4j/LibraryInteroperabilityTest.java
  66. +7 −4 digidoc4j/src/test/java/org/digidoc4j/PerformanceTest.java
  67. +153 −2 digidoc4j/src/test/java/org/digidoc4j/SignatureBuilderTest.java
  68. +86 −0 digidoc4j/src/test/java/org/digidoc4j/SignatureFinalizerBuilderTest.java
  69. +3 −3 digidoc4j/src/test/java/org/digidoc4j/SignatureTest.java
  70. +217 −0 digidoc4j/src/test/java/org/digidoc4j/impl/ContainerSigningWithOutDataToSignSerializationTest.java
  71. +270 −0 digidoc4j/src/test/java/org/digidoc4j/impl/DataToSignSerializationTest.java
  72. +14 −54 digidoc4j/src/test/java/org/digidoc4j/{ → impl}/SkDataLoaderTest.java
  73. +113 −0 digidoc4j/src/test/java/org/digidoc4j/impl/SkOCSPDataLoaderTest.java
  74. +116 −0 digidoc4j/src/test/java/org/digidoc4j/impl/SkTimestampDataLoaderTest.java
  75. +48 −27 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/BDocContainerTest.java
  76. +46 −12 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/BDocSerializationTest.java
  77. +20 −7 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ValidationTests.java
  78. +27 −13 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/asic/AsicSContainerTest.java
  79. +81 −0 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/asic/AsicSerializationTest.java
  80. +97 −0 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/asic/AsicSignatureFinalizerTest.java
  81. +2 −0 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ocsp/CommonOCSPSourceTest.java
  82. +319 −20 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/ocsp/SKOnlineOCSPSourceTest.java
  83. +0 −2 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/tsl/TslLoaderTest.java
  84. +15 −16 digidoc4j/src/test/java/org/digidoc4j/impl/bdoc/xades/XadesSigningDssFacadeTest.java
  85. +38 −5 digidoc4j/src/test/java/org/digidoc4j/impl/ddoc/DDocFacadeTest.java
  86. +2 −3 digidoc4j/src/test/java/org/digidoc4j/impl/edoc/TimeStampValidationForEDocTest.java
  87. +0 −5 digidoc4j/src/test/java/org/digidoc4j/impl/pades/PadesValidationTest.java
  88. +5 −5 digidoc4j/src/test/java/org/digidoc4j/main/DigiDoc4JTest.java
  89. +22 −3 digidoc4j/src/test/java/org/digidoc4j/test/MockSignatureBuilder.java
  90. +7 −1 digidoc4j/src/test/java/org/digidoc4j/test/MockSkDataLoader.java
  91. +7 −0 digidoc4j/src/test/java/org/digidoc4j/test/retry/Retry.java
  92. +46 −0 digidoc4j/src/test/java/org/digidoc4j/test/retry/RetryRule.java
  93. +5 −4 digidoc4j/src/test/java/org/digidoc4j/test/util/TestDataBuilderUtil.java
  94. +6 −7 digidoc4j/src/test/java/org/digidoc4j/test/util/TestSigningUtil.java
  95. +49 −0 digidoc4j/src/test/java/org/digidoc4j/utils/PolicyUtilsTest.java
  96. +4 −4 digidoc4j/src/test/java/org/digidoc4j/utils/TokenAlgorithmSupportTest.java
  97. +1 −0 digidoc4j/src/test/resources/testFiles/helper-files/sized-files/10000KB.txt
  98. +1 −0 digidoc4j/src/test/resources/testFiles/helper-files/sized-files/100KB.txt
  99. +1 −0 digidoc4j/src/test/resources/testFiles/helper-files/sized-files/1KB.txt
  100. BIN digidoc4j/src/test/resources/testFiles/invalid-containers/KS-15_signatures_xml_topelt.bdoc
  101. +190 −0 digidoc4j/src/test/resources/testFiles/invalid-containers/allakirjutatud.fail.ddoc
  102. +556 −0 digidoc4j/src/test/resources/testFiles/valid-containers/BOM_algusega.ddoc
  103. +227 −0 mvnw
  104. +145 −0 mvnw.cmd
  105. +15 −7 pom.xml
  106. +1 −1 publish.sh
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. User Level. This settings.xml file provides configuration for a single user,
| and is normally provided in ${user.home}/.m2/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -s /path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all Maven
| users on a machine (assuming they're all using the same Maven
| installation). It's normally provided in
| ${maven.conf}/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -gs /path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start at
| getting the most out of your Maven installation. Where appropriate, the default
| values (values used when the setting is not specified) are provided.
|
|-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository-->
<localRepository>.mvn/repository</localRepository>

<offline>true</offline>

</settings>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
@@ -16,5 +16,6 @@ notifications:
- andres.voll@nortal.com
- aare.nurm@nortal.com
- siim.suu@nortal.com
- jorgen.heinsoo@nortal.com
on_success: change
on_failure: always
@@ -11,3 +11,4 @@ Developers:
Priit Serk <priit.serk@cgi.com>
Janar Rahumeel <janar.rahumeel@cgi.com>
Andres Voll <andres.voll@nortal.com>
Jorgen Heinsoo <jorgen.heinsoo@nortal.com>
@@ -6,7 +6,7 @@
<groupId>org.digidoc4j</groupId>
<artifactId>ddoc4j</artifactId>
<packaging>jar</packaging>
<version>3.1.1</version>
<version>3.2.0</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.1.1</version>
<version>3.2.0</version>
</parent>

<dependencies>
@@ -260,7 +260,7 @@ private SignedDoc readSignedDocOfType(String fname, InputStream isSdoc, List err
if(fname != null)
saxParser.parse(new SignatureInputStream(new FileInputStream(fname)), this);
else if(isSdoc != null)
saxParser.parse(isSdoc, this);
saxParser.parse(new SignatureInputStream(isSdoc), this);
} catch(org.xml.sax.SAXParseException ex) {
m_logger.error("SAX Error: " + ex);
handleError(ex);
@@ -7,7 +7,7 @@
<groupId>org.digidoc4j</groupId>
<artifactId>digidoc4j</artifactId>
<packaging>jar</packaging>
<version>3.1.1</version>
<version>3.2.0</version>

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

<properties>
<logback-classic.version>1.2.3</logback-classic.version>
<junit.version>4.11</junit.version>
<junit.version>4.12</junit.version>
<dss.groupId>org.digidoc4j.dss</dss.groupId>
<dss.version>5.4.d4j.1</dss.version>
<dss.util.build>${project.build.directory}/build/util</dss.util.build>
@@ -43,7 +43,7 @@
<dependency>
<artifactId>ddoc4j</artifactId>
<groupId>org.digidoc4j</groupId>
<version>3.1.1</version>
<version>3.2.0</version>
</dependency>

<dependency>
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
<version>3.9</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
@@ -82,12 +82,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.2</version>
<version>4.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.6</version>
<version>4.5.8</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -97,7 +97,7 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>2.0.10</version>
<version>2.1.3</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.woodstox</groupId>
@@ -108,7 +108,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
<version>1.24</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -284,19 +284,19 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<version>2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-matchers</artifactId>
<version>1.3</version>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.23.4</version>
<version>2.28.2</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -320,37 +320,37 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<version>2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<groupId>com.github.javatlacati</groupId>
<artifactId>contiperf</artifactId>
<version>2.3.4</version>
<version>2.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>2.20.0</version>
<version>2.23.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.8</version>
<version>2.9.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.8</version>
<version>2.9.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.8</version>
<version>2.9.9</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -464,7 +464,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
<configuration>
<descriptors>
<descriptor>src/assembly/zip.xml</descriptor>
@@ -483,7 +483,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.2</version>
<executions>
<execution>
<id>custom-deploy</id>
@@ -673,7 +673,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<nonFilteredFileExtensions><!-- Avoid to modify keystore -->
@@ -685,17 +685,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -729,7 +729,7 @@
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.2</version>
<version>0.14.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

0 comments on commit 7f99bde

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