Skip to content

Commit

Permalink
Update DigiDoc4j dependency
Browse files Browse the repository at this point in the history
Updated the DigiDoc4j library version from 6.0 to 6.1 in `pom.xml` to address potential improvements and maintain compatibility. Adjusted imports in `AbstractSigner.java` to ensure consistency with the updated library version.
  • Loading branch information
Adrian Lapierre committed Jan 4, 2025
1 parent 67840ea commit 26c2506
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion digital-signature-master/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<digidoc4j.version>6.0</digidoc4j.version>
<digidoc4j.version>6.1</digidoc4j.version>
</properties>

<dependencyManagement>
Expand Down
15 changes: 13 additions & 2 deletions digital-signature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>digital-signature</artifactId>

<properties>
<digidoc4j.version>6.0</digidoc4j.version>
<digidoc4j.version>6.1</digidoc4j.version>
</properties>

<build>
Expand Down Expand Up @@ -74,10 +74,21 @@
<version>${digidoc4j.version}</version>
</dependency>

<dependency>
<groupId>eu.europa.ec.joinup.sd-dss</groupId>
<artifactId>dss-jaxb-common</artifactId>
<version>${digidoc4j.version}</version>
</dependency>

<!-- <dependency>-->
<!-- <groupId>eu.europa.ec.joinup.sd-dss</groupId>-->
<!-- <artifactId>dss-service</artifactId>-->
<!-- <version>${digidoc4j.version}</version>-->
<!-- </dependency>-->

<dependency>
<groupId>eu.europa.ec.joinup.sd-dss</groupId>
<artifactId>dss-service</artifactId>
<artifactId>specs-xades</artifactId>
<version>${digidoc4j.version}</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import eu.europa.esig.dss.enumerations.SignatureLevel;
import eu.europa.esig.dss.enumerations.SignaturePackaging;
import eu.europa.esig.dss.model.*;
import eu.europa.esig.dss.spi.validation.CommonCertificateVerifier;
import eu.europa.esig.dss.token.DSSPrivateKeyEntry;
import eu.europa.esig.dss.token.SignatureTokenConnection;
import eu.europa.esig.dss.validation.CommonCertificateVerifier;
import eu.europa.esig.dss.xades.XAdESSignatureParameters;
import eu.europa.esig.dss.xades.signature.XAdESService;
import lombok.Setter;
Expand Down
2 changes: 1 addition & 1 deletion digital-signature/src/test/resources/signed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
<P_72>2</P_72>
</PozycjeSzczegolowe>
<Pouczenie>Za uchybienie obowiązkom płatnika grozi odpowiedzialność przewidziana w Kodeksie karnym skarbowym.</Pouczenie>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="id-600dda0e528d93d7032e2e83b0f604b3"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><ds:Reference Id="r-id-600dda0e528d93d7032e2e83b0f604b3-1" URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"><dsig-filter2:XPath xmlns:dsig-filter2="http://www.w3.org/2002/06/xmldsig-filter2" Filter="subtract">/descendant::ds:Signature</dsig-filter2:XPath></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>ubI3TWnFDizWAR7oX/tmOnMGGL0cjs6Tpy6JYsmj9qw=</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xades-id-600dda0e528d93d7032e2e83b0f604b3"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>byGOtmO13b/Lk+SJRuEXiFnZCLk5awKqdC0YbJaSFyM=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id="value-id-600dda0e528d93d7032e2e83b0f604b3">pcqkqzgdXLZ8N4gSRsnM0FxWEfeYUJczhhBIYFylPJ372gPoclmZH+6LqjG7QA4smRkdvfvdKqOau5Ll07W+kbQDZKJkErgP8//l5oO6m+OLbLTWRVuIFicA9ljWftjO1WpX6F6rZYyzZLMm4ZjwGy8yXYo5qZO0GAbNJUfou0XH437FFmCh74ChgTShBbFPPeA77r8rWajmIr8LaTtaCz5ajgMlcSbcNAS+TODc4zUxUtf5rCDZEx8Z0r8VgGsXsTuvCNr4zzqAnk140idd68J2NKKH9Ilf3BS+v1VJhHm2p9D8sX0Q/JatM59G98d3d76++YApwYxPhVHbov9DbIaqHjLRGedOgOHZczYP0zWZhgsFocojfE88C5V0UoGHsou6s5+wkiCs3NLbb3XevRU33+3kSlKaZfzx8/PpwhuF5rquM0QuM8zljxwgmfPseLlZP/pirRekayTYwt1fxBnLzoLEgL3aytUED+Abd+CpxZSDpKbgVZL4cFYU0TBA</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIHNDCCBRygAwIBAgIQXS85x7gKmcberibX//7FOTANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJQTDEhMB8GA1UECgwYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMRgwFgYDVQQDDA9DZXJ0dW0gUUNBIDIwMTcxGTAXBgNVBGEMEFZBVFBMLTUxNzAzNTk0NTgwHhcNMjMxMjE1MTI0MzQ4WhcNMjYxMjIwMjI1OTU5WjBzMR4wHAYDVQQDDBVBZHJpYW4gTGFwaWVycmUtTXLDs3oxDzANBgNVBCoMBkFkcmlhbjEXMBUGA1UEBAwOTGFwaWVycmUtTXLDs3oxGjAYBgNVBAUTEVBOT1BMLTc2MDQyNTAxMDU4MQswCQYDVQQGEwJQTDCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCC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e528d93d7032e2e83b0f604b3"><xades:SignedProperties Id="xades-id-600dda0e528d93d7032e2e83b0f604b3"><xades:SignedSignatureProperties><xades:SigningTime>2024-06-12T09:23:58Z</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/><ds:DigestValue>A6bfTQDJDki/vBjeYfRLdLAPoXCEJEx4lV7roXDBrzPZGVcQwMuvBToIDNlj0NDETPAn/VZYoZ0HbqRn6cx2Bw==</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>2.5.4.97=#0c10564154504c2d35313730333539343538,CN=Certum QCA 2017,O=Asseco Data Systems S.A.,C=PL</ds:X509IssuerName><ds:X509SerialNumber>123863413481058118818308985860952868153</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate></xades:SignedSignatureProperties><xades:SignedDataObjectProperties><xades:DataObjectFormat ObjectReference="#r-id-600dda0e528d93d7032e2e83b0f604b3-1"><xades:MimeType>text/xml</xades:MimeType></xades:DataObjectFormat></xades:SignedDataObjectProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object></ds:Signature></Deklaracja>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="id-9237a7ffbc4a098fb75aacaf84c922cb"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><ds:Reference Id="r-id-9237a7ffbc4a098fb75aacaf84c922cb-1" URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"><dsig-filter2:XPath xmlns:dsig-filter2="http://www.w3.org/2002/06/xmldsig-filter2" Filter="subtract">/descendant::ds:Signature</dsig-filter2:XPath></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>ubI3TWnFDizWAR7oX/tmOnMGGL0cjs6Tpy6JYsmj9qw=</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xades-id-9237a7ffbc4a098fb75aacaf84c922cb"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>OW8lH50gBvltER8lHWmUdOHOgBKpRQ0LtJ5gGdb1thE=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id="value-id-9237a7ffbc4a098fb75aacaf84c922cb">vTObeJhzbYO3h2orrwks5fcyTgYPC0VewynHYLJ1GWnC9KZndStNpg+4pelyfhSdkxWp96tD8K4nG7/V1bj+9GQRpoAuBggut/wc+CrlDJPOwn6ld0MDBm5esKEx3SXLrgCZt/f7dvX/TT0c2pX0ZCNHZ4MvFhJZaIVRnL8R645sVs7hUgtBOiib5AlDxOD+pHnazqgZ3r6NgMBrL03QpYiiPTc0Uov/JtfEFeWb1qyW9UdGJ1HBS/rRAWDY0i90s4sep6wP3o+UyfzCdsVvFCwUlmE6OOVn+KTo8mQtWjhrDDs5FvJvzwrkhcAlKZc1HeT9X9qdqaXPP375y3ydm8xllXeGRz6Cbv2COQsJUQCVxpab39i07MpVB7jmAOfedqCKv7quAqfFwmT4IBwHjopSqoCEGr/OhLH7Z4PPnxFMhmt/LDJDjHBynWQe0mWPMwFJC+cJB5tHhqNutBwolZIyoRoefki7ljTXJWJ9rhMljsMoFp8PbozcmlMRxaRx</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIHNDCCBRygAwIBAgIQXS85x7gKmcberibX//7FOTANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJQTDEhMB8GA1UECgwYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMRgwFgYDVQQ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9aJqFP8Dmo2alX7XB7Qi6r36g7Ul9qQJMXD5gvLnySQ7duLNvbEClkmVPwUSQAWZz6ew79jZpyB/1RbALIJn1J2Yg6uHzua9/URYvfjy8lUOWZzDNrZmPoe+5lVBJSSYmWNSLdH8+R/7daN2LoBuQFnCrhLrR7IYpNME1PelO2+Hq8TBkCqNR+0Murfq4O4XMHglOeHZhqk1nhwNXN</ds:X509Certificate></ds:X509Data></ds:KeyInfo><ds:Object><xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#id-9237a7ffbc4a098fb75aacaf84c922cb"><xades:SignedProperties Id="xades-id-9237a7ffbc4a098fb75aacaf84c922cb"><xades:SignedSignatureProperties><xades:SigningTime>2025-01-04T10:49:36Z</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/><ds:DigestValue>A6bfTQDJDki/vBjeYfRLdLAPoXCEJEx4lV7roXDBrzPZGVcQwMuvBToIDNlj0NDETPAn/VZYoZ0HbqRn6cx2Bw==</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>2.5.4.97=#0c10564154504c2d35313730333539343538,CN=Certum QCA 2017,O=Asseco Data Systems S.A.,C=PL</ds:X509IssuerName><ds:X509SerialNumber>123863413481058118818308985860952868153</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate></xades:SignedSignatureProperties><xades:SignedDataObjectProperties><xades:DataObjectFormat ObjectReference="#r-id-9237a7ffbc4a098fb75aacaf84c922cb-1"><xades:MimeType>text/xml</xades:MimeType></xades:DataObjectFormat></xades:SignedDataObjectProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object></ds:Signature></Deklaracja>
Loading

0 comments on commit 26c2506

Please sign in to comment.