diff --git a/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asice/ASiCECAdESLevelBSignEnvelopingCAdESTest.java b/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asice/ASiCECAdESLevelBSignEnvelopingCAdESTest.java index ccd76e3185..c15510e935 100644 --- a/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asice/ASiCECAdESLevelBSignEnvelopingCAdESTest.java +++ b/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asice/ASiCECAdESLevelBSignEnvelopingCAdESTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.asic.cades.signature.asice; import eu.europa.esig.dss.asic.cades.ASiCWithCAdESSignatureParameters; diff --git a/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelBSignEnvelopingCAdESTest.java b/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelBSignEnvelopingCAdESTest.java index de5bf928bc..6c408a4bd2 100644 --- a/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelBSignEnvelopingCAdESTest.java +++ b/dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelBSignEnvelopingCAdESTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.asic.cades.signature.asics; import eu.europa.esig.dss.asic.cades.ASiCWithCAdESSignatureParameters; diff --git a/dss-asic-xades/src/test/java/eu/europa/esig/dss/asic/xades/validation/ASiCSWithXAdESRevocationForExpiredTrustAnchorTest.java b/dss-asic-xades/src/test/java/eu/europa/esig/dss/asic/xades/validation/ASiCSWithXAdESRevocationForExpiredTrustAnchorTest.java index adeee2b6d8..d975f0e2c8 100644 --- a/dss-asic-xades/src/test/java/eu/europa/esig/dss/asic/xades/validation/ASiCSWithXAdESRevocationForExpiredTrustAnchorTest.java +++ b/dss-asic-xades/src/test/java/eu/europa/esig/dss/asic/xades/validation/ASiCSWithXAdESRevocationForExpiredTrustAnchorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.asic.xades.validation; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedDetachedSignatureTest.java b/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedDetachedSignatureTest.java index b6d7a52c93..02b380d505 100644 --- a/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedDetachedSignatureTest.java +++ b/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedDetachedSignatureTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.cades.signature; import eu.europa.esig.dss.cades.CAdESSignatureParameters; diff --git a/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedSignatureTest.java b/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedSignatureTest.java index 12768f0874..ff8a18c6af 100644 --- a/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedSignatureTest.java +++ b/dss-cades/src/test/java/eu/europa/esig/dss/cades/signature/CAdESLevelBNestedSignatureTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.cades.signature; import eu.europa.esig.dss.cades.CAdESSignatureParameters; diff --git a/dss-cookbook/src/test/java/eu/europa/esig/dss/cookbook/example/sign/XAdESForASiCTest.java b/dss-cookbook/src/test/java/eu/europa/esig/dss/cookbook/example/sign/XAdESForASiCTest.java index 82d26d276a..cbba480b51 100644 --- a/dss-cookbook/src/test/java/eu/europa/esig/dss/cookbook/example/sign/XAdESForASiCTest.java +++ b/dss-cookbook/src/test/java/eu/europa/esig/dss/cookbook/example/sign/XAdESForASiCTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.cookbook.example.sign; import eu.europa.esig.dss.asic.common.definition.ASiCManifestElement; diff --git a/dss-cookbook/src/test/java/plugtests/SignaturePoolTest.java b/dss-cookbook/src/test/java/plugtests/SignaturePoolTest.java index e4d755a4e6..ad1cba2535 100644 --- a/dss-cookbook/src/test/java/plugtests/SignaturePoolTest.java +++ b/dss-cookbook/src/test/java/plugtests/SignaturePoolTest.java @@ -65,7 +65,6 @@ import eu.europa.esig.dss.tsl.sync.AcceptAllStrategy; import eu.europa.esig.dss.utils.Utils; import eu.europa.esig.dss.validation.SignedDocumentValidator; -import eu.europa.esig.dss.validation.identifier.UserFriendlyIdentifierProvider; import eu.europa.esig.dss.validation.reports.Reports; import eu.europa.esig.validationreport.ValidationReportUtils; import eu.europa.esig.validationreport.jaxb.SAContactInfoType; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/ManifestFile.java b/dss-model/src/main/java/eu/europa/esig/dss/model/ManifestFile.java index 69d7305857..7a860813a5 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/ManifestFile.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/ManifestFile.java @@ -25,7 +25,6 @@ import java.io.Serializable; import java.util.ArrayList; -import java.util.Base64; import java.util.List; /** diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/EntityIdentifierBuilder.java b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/EntityIdentifierBuilder.java index 053f82435f..1ad2c0f9e7 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/EntityIdentifierBuilder.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/EntityIdentifierBuilder.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.identifier; import eu.europa.esig.dss.model.DSSException; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/KeyIdentifier.java b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/KeyIdentifier.java index afbe82321e..87bb391acd 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/KeyIdentifier.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/KeyIdentifier.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.identifier; import java.security.Key; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/X500NameIdentifier.java b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/X500NameIdentifier.java index a57d2afe64..ffc236dbe2 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/X500NameIdentifier.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/identifier/X500NameIdentifier.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.identifier; import javax.security.auth.x500.X500Principal; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/CertificateTrustTime.java b/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/CertificateTrustTime.java index a457b9e7d5..d2e283ea3a 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/CertificateTrustTime.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/CertificateTrustTime.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.tsl; import eu.europa.esig.dss.model.timedependent.BaseTimeDependent; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/TrustedCertificateSourceWithTime.java b/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/TrustedCertificateSourceWithTime.java index 9c1141dc11..b3b223f744 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/TrustedCertificateSourceWithTime.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/tsl/TrustedCertificateSourceWithTime.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.tsl; import eu.europa.esig.dss.model.x509.CertificateToken; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/FreshestCRL.java b/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/FreshestCRL.java index 8a2d1438a8..e2bbdb6213 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/FreshestCRL.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/FreshestCRL.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.x509.extension; import eu.europa.esig.dss.enumerations.CertificateExtensionEnum; diff --git a/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/NoRevAvail.java b/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/NoRevAvail.java index ff2d7efcbf..909285350a 100644 --- a/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/NoRevAvail.java +++ b/dss-model/src/main/java/eu/europa/esig/dss/model/x509/extension/NoRevAvail.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.x509.extension; import eu.europa.esig.dss.enumerations.CertificateExtensionEnum; diff --git a/dss-model/src/test/java/eu/europa/esig/dss/model/tsl/CertificateTrustTimeTest.java b/dss-model/src/test/java/eu/europa/esig/dss/model/tsl/CertificateTrustTimeTest.java index 22b66223cf..3a19e4c669 100644 --- a/dss-model/src/test/java/eu/europa/esig/dss/model/tsl/CertificateTrustTimeTest.java +++ b/dss-model/src/test/java/eu/europa/esig/dss/model/tsl/CertificateTrustTimeTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.model.tsl; import org.junit.jupiter.api.Test; diff --git a/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReader.java b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReader.java index eeb5429b40..e442f33ead 100644 --- a/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReader.java +++ b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReader.java @@ -20,6 +20,19 @@ */ package eu.europa.esig.dss.pdf.openpdf; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.lowagie.text.Rectangle; import com.lowagie.text.exceptions.BadPasswordException; import com.lowagie.text.pdf.AcroFields; @@ -35,9 +48,12 @@ import com.lowagie.text.pdf.PdfReader; import com.lowagie.text.pdf.PdfString; import com.lowagie.text.pdf.PdfWriter; +import com.lowagie.text.pdf.RandomAccessFileOrArray; + import eu.europa.esig.dss.enumerations.CertificationPermission; import eu.europa.esig.dss.model.DSSDocument; import eu.europa.esig.dss.model.DSSException; +import eu.europa.esig.dss.model.FileDocument; import eu.europa.esig.dss.model.InMemoryDocument; import eu.europa.esig.dss.pades.PAdESCommonParameters; import eu.europa.esig.dss.pades.exception.InvalidPasswordException; @@ -48,23 +64,12 @@ import eu.europa.esig.dss.pdf.PdfDict; import eu.europa.esig.dss.pdf.PdfDocumentReader; import eu.europa.esig.dss.pdf.PdfDssDict; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.pdf.PdfSigDictWrapper; import eu.europa.esig.dss.pdf.SingleDssDict; import eu.europa.esig.dss.pdf.visible.ImageRotationUtils; import eu.europa.esig.dss.spi.DSSUtils; import eu.europa.esig.dss.utils.Utils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; /** * The IText (OpenPdf) implementation of {@code PdfDocumentReader} @@ -91,7 +96,7 @@ public class ITextDocumentReader implements PdfDocumentReader { * @throws InvalidPasswordException if the password is not provided or invalid for a protected document */ public ITextDocumentReader(DSSDocument dssDocument) throws IOException, InvalidPasswordException { - this(dssDocument, null); + this(dssDocument, null, PdfMemoryUsageSetting.memoryOnly()); } /** @@ -102,13 +107,26 @@ public ITextDocumentReader(DSSDocument dssDocument) throws IOException, InvalidP * @throws IOException if an exception occurs * @throws InvalidPasswordException if the password is not provided or invalid for a protected document */ - public ITextDocumentReader(DSSDocument dssDocument, byte[] passwordProtection) throws IOException, InvalidPasswordException { + public ITextDocumentReader(DSSDocument dssDocument, byte[] passwordProtection, PdfMemoryUsageSetting pdfMemoryUsageSetting) throws IOException, InvalidPasswordException { Objects.requireNonNull(dssDocument, "The document must be defined!"); this.dssDocument = dssDocument; - try (InputStream is = dssDocument.openStream()) { - this.pdfReader = new PdfReader(is, passwordProtection); + try { + ITextPdfMemoryUsageSetting memoryUsageSetting = ITextPdfMemoryUsageSetting.map(pdfMemoryUsageSetting); + if (dssDocument instanceof FileDocument) { + FileDocument fileDocument = (FileDocument) dssDocument; + String filenameSource = fileDocument.getFile().getAbsolutePath(); + if (ITextPdfMemoryUsageSetting.Mode.FULL.equals(memoryUsageSetting.getMode())) { + this.pdfReader = new PdfReader(filenameSource, passwordProtection); + } else { + this.pdfReader = new PdfReader(new RandomAccessFileOrArray(filenameSource, false, true), passwordProtection); + } + } else { + try (InputStream is = dssDocument.openStream()) { + this.pdfReader = new PdfReader(is, passwordProtection); + } + } } catch (BadPasswordException e) { - throw new InvalidPasswordException(String.format("Encrypted document : %s", e.getMessage())); + throw new InvalidPasswordException(String.format("Encrypted document : %s", e.getMessage())); } } diff --git a/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPDFSignatureService.java b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPDFSignatureService.java index 231ff9d54d..a5b3fba653 100644 --- a/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPDFSignatureService.java +++ b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPDFSignatureService.java @@ -269,10 +269,11 @@ private boolean containsFilledSignature(PdfReader reader) { @Override protected DSSMessageDigest computeDigest(final DSSDocument toSignDocument, final PAdESCommonParameters parameters) { - try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); - OutputStream os = resourcesHandler.createOutputStream(); - ITextDocumentReader documentReader = new ITextDocumentReader( - toSignDocument, getPasswordBytes(parameters.getPasswordProtection())) ) { + try ( + DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); + OutputStream os = resourcesHandler.createOutputStream(); + ITextDocumentReader documentReader = new ITextDocumentReader(toSignDocument, getPasswordBytes(parameters.getPasswordProtection()), pdfMemoryUsageSetting) + ) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -306,10 +307,11 @@ toSignDocument, getPasswordBytes(parameters.getPasswordProtection())) ) { @Override protected DSSDocument signDocument(final DSSDocument toSignDocument, final byte[] cmsSignedData, final PAdESCommonParameters parameters) { - try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); - OutputStream os = resourcesHandler.createOutputStream(); - ITextDocumentReader documentReader = new ITextDocumentReader( - toSignDocument, getPasswordBytes(parameters.getPasswordProtection())) ) { + try ( + DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); + OutputStream os = resourcesHandler.createOutputStream(); + ITextDocumentReader documentReader = new ITextDocumentReader(toSignDocument, getPasswordBytes(parameters.getPasswordProtection()), pdfMemoryUsageSetting) + ) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -543,9 +545,11 @@ public List getAvailableSignatureFields(final DSSDocument document, fina @Override public DSSDocument addNewSignatureField(final DSSDocument document, final SignatureFieldParameters parameters, final char[] pwd) { - try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); - OutputStream os = resourcesHandler.createOutputStream(); - ITextDocumentReader documentReader = new ITextDocumentReader(document, getPasswordBytes(pwd))) { + try ( + DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); + OutputStream os = resourcesHandler.createOutputStream(); + ITextDocumentReader documentReader = new ITextDocumentReader(document, getPasswordBytes(pwd), pdfMemoryUsageSetting) + ) { checkPdfPermissions(documentReader, parameters); final PdfReader reader = documentReader.getPdfReader(); @@ -602,7 +606,7 @@ public DSSDocument previewSignatureField(final DSSDocument toSignDocument, final @Override protected PdfDocumentReader loadPdfDocumentReader(DSSDocument dssDocument, char[] passwordProtection) throws IOException { - return new ITextDocumentReader(dssDocument, getPasswordBytes(passwordProtection)); + return new ITextDocumentReader(dssDocument, getPasswordBytes(passwordProtection), pdfMemoryUsageSetting); } @Override diff --git a/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPdfMemoryUsageSetting.java b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPdfMemoryUsageSetting.java new file mode 100644 index 0000000000..6ab8e1b243 --- /dev/null +++ b/dss-pades-openpdf/src/main/java/eu/europa/esig/dss/pdf/openpdf/ITextPdfMemoryUsageSetting.java @@ -0,0 +1,61 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package eu.europa.esig.dss.pdf.openpdf; + +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; + +/** + * IText memory usage setting + */ +public class ITextPdfMemoryUsageSetting { + + /** + * Load options + */ + public enum Mode { + FULL, PARTIAL + } + + private Mode mode; + + public ITextPdfMemoryUsageSetting(Mode mode) { + this.mode = mode; + } + + /** + * + * @return Load option {@link Mode} + */ + public Mode getMode() { + return mode; + } + + /** + * It converts generic {@link PdfMemoryUsageSetting} to IText domain + * + * @param pdfMemoryUsageSetting + * @return {@link ITextPdfMemoryUsageSetting} + */ + public static ITextPdfMemoryUsageSetting map(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + Mode mode = PdfMemoryUsageSetting.Mode.MEMORY.equals(pdfMemoryUsageSetting.getMode()) ? Mode.FULL : Mode.PARTIAL; + return new ITextPdfMemoryUsageSetting(mode); + } +} diff --git a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/ITextPdfObjFactoryTest.java b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/ITextPdfObjFactoryTest.java index fdeb0dfb4e..5f0b5f8e3b 100644 --- a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/ITextPdfObjFactoryTest.java +++ b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/ITextPdfObjFactoryTest.java @@ -22,6 +22,7 @@ import eu.europa.esig.dss.pdf.IPdfObjFactory; import eu.europa.esig.dss.pdf.PDFSignatureService; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.pdf.PdfPermissionsChecker; import eu.europa.esig.dss.pdf.PdfSignatureFieldPositionChecker; import eu.europa.esig.dss.pdf.ServiceLoaderPdfObjFactory; @@ -114,6 +115,11 @@ public void setPdfPermissionsChecker(PdfPermissionsChecker pdfPermissionsChecker public void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker) { // do nothing } + + @Override + public void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + // do nothing + } } diff --git a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/signature/ITextPAdESSignatureSuiteTest.java b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/signature/ITextPAdESSignatureSuiteTest.java index c623757f66..30d03b85df 100644 --- a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/signature/ITextPAdESSignatureSuiteTest.java +++ b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pades/signature/ITextPAdESSignatureSuiteTest.java @@ -53,6 +53,7 @@ import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBNonPdfDocumentTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBNotEnoughSpaceForSignatureTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBOnlySigningCertTest; +import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBSignWithFileMemoryUsageSettingTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBSignWithTempFileHandlerTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBWithAppNameTest; @@ -110,34 +111,44 @@ import org.junit.platform.suite.api.Suite; @Suite -@SelectClasses({ DigestStabilityTest.class, GetOriginalDocumentTest.class, PAdESDoubleSignatureTest.class, PAdESLevelBTest.class, - PAdESLevelBExternalSignatureTest.class, PAdESLevelBLoopTest.class, PAdESLevelBNotEnoughSpaceForSignatureTest.class, - PAdESLevelBOnlySigningCertTest.class, PAdESLevelBWithContentTimestampTest.class, PAdESLevelBWithDSATest.class, - PAdESLevelBWithECDSATest.class, PAdESLevelBWithSHA256andMGF1Test.class, PAdESLevelImpossibleLTAExceptionTest.class, - PAdESLevelImpossibleLTExceptionTest.class, PAdESLevelLTTest.class, PAdESLevelLTATest.class, PAdESLevelLTWrongAIATest.class, - PAdESLevelTTest.class, PDFTimestampFiltersTest.class, TwoPAdESSignaturesMustHaveDifferentIdTest.class, PAdESLevelBHugeTest.class, +@SelectClasses({ DigestStabilityTest.class, GetOriginalDocumentTest.class, PAdESDoubleSignatureTest.class, + PAdESLevelBTest.class, PAdESLevelBExternalSignatureTest.class, PAdESLevelBLoopTest.class, + PAdESLevelBNotEnoughSpaceForSignatureTest.class, PAdESLevelBOnlySigningCertTest.class, + PAdESLevelBWithContentTimestampTest.class, PAdESLevelBWithDSATest.class, PAdESLevelBWithECDSATest.class, + PAdESLevelBWithSHA256andMGF1Test.class, PAdESLevelImpossibleLTAExceptionTest.class, + PAdESLevelImpossibleLTExceptionTest.class, PAdESLevelLTTest.class, PAdESLevelLTATest.class, + PAdESLevelLTWrongAIATest.class, PAdESLevelTTest.class, PDFTimestampFiltersTest.class, + TwoPAdESSignaturesMustHaveDifferentIdTest.class, PAdESLevelBHugeTest.class, InvisibleSignatureFieldSignTest.class, PAdESSpaceEOFTest.class, PAdESDoubleLTAValidationDataTest.class, - PAdESNoDuplicateValidationDataTest.class, PAdESWithMGF1Test.class, PAdESWithSHA3Test.class, PAdESLevelTWithSHA1MessageImprintTest.class, - PAdESAllSelfSignedCertsTest.class, PAdESServiceTest.class, CertificateConflictTest.class, ProtectedDocumentsSignatureTest.class, - PAdESTwoSignersLTALevelTest.class, PAdESWithPemEncodedCrlTest.class, PAdESSignatureParametersSerializationTest.class, + PAdESNoDuplicateValidationDataTest.class, PAdESWithMGF1Test.class, PAdESWithSHA3Test.class, + PAdESLevelTWithSHA1MessageImprintTest.class, PAdESAllSelfSignedCertsTest.class, PAdESServiceTest.class, + CertificateConflictTest.class, ProtectedDocumentsSignatureTest.class, PAdESTwoSignersLTALevelTest.class, + PAdESWithPemEncodedCrlTest.class, PAdESSignatureParametersSerializationTest.class, PAdESSignedAssertionTest.class, PAdESLevelLTAAndLevelTTest.class, PAdESLevelTNotTrustedTSPTest.class, - PAdESLevelLTANotTrustedTSPTest.class, PAdESSignWithRevokedCertTest.class, PAdESLevelLTASignRevokedSigWithPOETest.class, - PAdESLevelBCustomTimeZoneTest.class, PAdESLevelLTCRLCounterTest.class, PAdESLevelBWithPlainECDSATest.class, - PAdESLevelBWithECDSATokenTest.class, PAdESLevelBWithPlainECDSATokenTest.class, PDFNotAdESLevelBWithoutCertificatesTest.class, - PDFNotAdESLevelTWithoutCertificatesTest.class, PDFNotAdESLevelLTWithoutCertificatesTest.class, PDFNotAdESLevelLTAWithoutCertificatesTest.class, - PAdESDoubleSignBAndExtendToLTATest.class, PDFSignWithPermissionsTest.class, PAdESNoChangesPermittedTest.class, - PAdESLevelBWithNoChangesPermittedTest.class, PAdESLevelBCertificationTest.class, PAdESDoubleSignatureLTAAndLTTest.class, - PAdESSignDocumentsConsequentlyTest.class, PAdESLevelBDigestDocumentTest.class, PAdESLevelBWithAppNameTest.class, - PAdESLevelBSignWithTempFileHandlerTest.class, PAdESSignWithAtomicMethodsTest.class, PAdESSignWithReInitParametersTest.class, - PAdESSignDocumentWithEmptySignatureTest.class, PAdESDoubleSignatureLTAndTTest.class, PAdESLevelLTASignDocumentWithXRefsTest.class, - PAdESLevelBWithValidationDataTest.class, PAdESLevelBWithValidationDataSameTstTrustAnchorTest.class, - PAdESLevelLTAWithSingleDocTstTest.class, PAdESLevelLTAWithSingleSelfSignedDocTstTest.class, PAdESExternalCMSSignatureBLevelTest.class, - PAdESExternalCMSSignatureTLevelTest.class, PAdESExternalCMSSignatureLTLevelTest.class, PAdESExternalCMSSignatureLTALevelTest.class, - PAdESExternalCMSSignatureTLevelDocTstTest.class, PAdESExternalCMSSignatureLTLevelDocTstTest.class, - PAdESExternalCMSSignatureLTALevelDocTstTest.class, PAdESExternalCMSSignatureServiceTest.class, CMSForPAdESGenerationServiceTest.class, - PAdESLevelBWithContentTimestampCustomDigestAlgoTest.class, PAdESLevelBEncryptedDocumentTest.class, PAdESLevelLTWithVRIDictTest.class, - PAdESDoubleSignatureLTWithVRIAndLTTest.class, PAdESDoubleSignatureLTAndLTWithVRITest.class, PAdESLevelBNonPdfDocumentTest.class, - PAdESWithMGF1Test.class, PAdESLevelBEnvelopedRSASSAPSSTest.class, PAdESLevelBEnvelopedNONEWithRSASSAPSSTest.class }) + PAdESLevelLTANotTrustedTSPTest.class, PAdESSignWithRevokedCertTest.class, + PAdESLevelLTASignRevokedSigWithPOETest.class, PAdESLevelBCustomTimeZoneTest.class, + PAdESLevelLTCRLCounterTest.class, PAdESLevelBWithPlainECDSATest.class, PAdESLevelBWithECDSATokenTest.class, + PAdESLevelBWithPlainECDSATokenTest.class, PDFNotAdESLevelBWithoutCertificatesTest.class, + PDFNotAdESLevelTWithoutCertificatesTest.class, PDFNotAdESLevelLTWithoutCertificatesTest.class, + PDFNotAdESLevelLTAWithoutCertificatesTest.class, PAdESDoubleSignBAndExtendToLTATest.class, + PDFSignWithPermissionsTest.class, PAdESNoChangesPermittedTest.class, + PAdESLevelBWithNoChangesPermittedTest.class, PAdESLevelBCertificationTest.class, + PAdESDoubleSignatureLTAAndLTTest.class, PAdESSignDocumentsConsequentlyTest.class, + PAdESLevelBDigestDocumentTest.class, PAdESLevelBWithAppNameTest.class, + PAdESLevelBSignWithTempFileHandlerTest.class, PAdESLevelBSignWithFileMemoryUsageSettingTest.class, + PAdESSignWithAtomicMethodsTest.class, PAdESSignWithReInitParametersTest.class, + PAdESSignDocumentWithEmptySignatureTest.class, PAdESDoubleSignatureLTAndTTest.class, + PAdESLevelLTASignDocumentWithXRefsTest.class, PAdESLevelBWithValidationDataTest.class, + PAdESLevelBWithValidationDataSameTstTrustAnchorTest.class, PAdESLevelLTAWithSingleDocTstTest.class, + PAdESLevelLTAWithSingleSelfSignedDocTstTest.class, PAdESExternalCMSSignatureBLevelTest.class, + PAdESExternalCMSSignatureTLevelTest.class, PAdESExternalCMSSignatureLTLevelTest.class, + PAdESExternalCMSSignatureLTALevelTest.class, PAdESExternalCMSSignatureTLevelDocTstTest.class, + PAdESExternalCMSSignatureLTLevelDocTstTest.class, PAdESExternalCMSSignatureLTALevelDocTstTest.class, + PAdESExternalCMSSignatureServiceTest.class, CMSForPAdESGenerationServiceTest.class, + PAdESLevelBWithContentTimestampCustomDigestAlgoTest.class, PAdESLevelBEncryptedDocumentTest.class, + PAdESLevelLTWithVRIDictTest.class, PAdESDoubleSignatureLTWithVRIAndLTTest.class, + PAdESDoubleSignatureLTAndLTWithVRITest.class, PAdESLevelBNonPdfDocumentTest.class, PAdESWithMGF1Test.class, + PAdESLevelBEnvelopedRSASSAPSSTest.class, PAdESLevelBEnvelopedNONEWithRSASSAPSSTest.class }) class ITextPAdESSignatureSuiteTest { } diff --git a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReaderTest.java b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReaderTest.java index 08f5ce410b..3352035230 100644 --- a/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReaderTest.java +++ b/dss-pades-openpdf/src/test/java/eu/europa/esig/dss/pdf/openpdf/ITextDocumentReaderTest.java @@ -20,21 +20,24 @@ */ package eu.europa.esig.dss.pdf.openpdf; -import com.lowagie.text.pdf.PdfObject; -import eu.europa.esig.dss.model.DSSDocument; -import eu.europa.esig.dss.model.InMemoryDocument; -import eu.europa.esig.dss.pades.PAdESSignatureParameters; -import eu.europa.esig.dss.test.PKIFactoryAccess; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import java.util.Calendar; import java.util.Date; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; + +import com.lowagie.text.pdf.PdfObject; + +import eu.europa.esig.dss.model.DSSDocument; +import eu.europa.esig.dss.model.InMemoryDocument; +import eu.europa.esig.dss.pades.PAdESSignatureParameters; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; +import eu.europa.esig.dss.test.PKIFactoryAccess; class ITextDocumentReaderTest extends PKIFactoryAccess { @@ -52,7 +55,7 @@ void permissionsSimpleDocument() throws IOException { @Test void permissionsProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/open_protected.pdf")); - try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[]{ ' ' })) { + try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[] { ' ' }, PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); @@ -63,7 +66,7 @@ void permissionsProtectedDocument() throws IOException { @Test void permissionsEditionProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/edition_protected_none.pdf")); - try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[]{ ' ' })) { + try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[]{ ' ' }, PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); @@ -74,7 +77,7 @@ void permissionsEditionProtectedDocument() throws IOException { @Test void permissionsEditionNoFieldsProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/edition_protected_signing_allowed_no_field.pdf")); - try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[]{ ' ' })) { + try (ITextDocumentReader documentReader = new ITextDocumentReader(dssDocument, new byte[]{ ' ' }, PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDefaultObjectFactory.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDefaultObjectFactory.java index 8e02fa303b..a151ea927d 100644 --- a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDefaultObjectFactory.java +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDefaultObjectFactory.java @@ -29,8 +29,8 @@ * The PDFBox default implementation of {@code IPdfObjFactory} * Creates an image for a text signature content */ -public class PdfBoxDefaultObjectFactory extends AbstractPdfObjFactory { - +public class PdfBoxDefaultObjectFactory extends AbstractPdfObjFactory { + /** * Default constructor */ diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReader.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReader.java index f36f2eb72e..35f2ff7c81 100644 --- a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReader.java +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReader.java @@ -20,8 +20,36 @@ */ package eu.europa.esig.dss.pdf.pdfbox; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.apache.pdfbox.cos.COSArray; +import org.apache.pdfbox.cos.COSBase; +import org.apache.pdfbox.cos.COSDictionary; +import org.apache.pdfbox.cos.COSName; +import org.apache.pdfbox.cos.COSObject; +import org.apache.pdfbox.io.MemoryUsageSetting; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDDocumentCatalog; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.common.PDRectangle; +import org.apache.pdfbox.pdmodel.encryption.AccessPermission; +import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException; +import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation; +import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField; +import org.apache.pdfbox.rendering.PDFRenderer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import eu.europa.esig.dss.enumerations.CertificationPermission; import eu.europa.esig.dss.model.DSSDocument; +import eu.europa.esig.dss.model.FileDocument; import eu.europa.esig.dss.model.InMemoryDocument; import eu.europa.esig.dss.pades.PAdESCommonParameters; import eu.europa.esig.dss.pades.validation.ByteRange; @@ -34,37 +62,13 @@ import eu.europa.esig.dss.pdf.PdfDict; import eu.europa.esig.dss.pdf.PdfDocumentReader; import eu.europa.esig.dss.pdf.PdfDssDict; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.pdf.PdfSigDictWrapper; import eu.europa.esig.dss.pdf.SingleDssDict; import eu.europa.esig.dss.pdf.visible.ImageRotationUtils; import eu.europa.esig.dss.pdf.visible.ImageUtils; import eu.europa.esig.dss.spi.DSSUtils; import eu.europa.esig.dss.utils.Utils; -import org.apache.pdfbox.cos.COSArray; -import org.apache.pdfbox.cos.COSBase; -import org.apache.pdfbox.cos.COSDictionary; -import org.apache.pdfbox.cos.COSName; -import org.apache.pdfbox.cos.COSObject; -import org.apache.pdfbox.pdmodel.PDDocument; -import org.apache.pdfbox.pdmodel.PDDocumentCatalog; -import org.apache.pdfbox.pdmodel.PDPage; -import org.apache.pdfbox.pdmodel.common.PDRectangle; -import org.apache.pdfbox.pdmodel.encryption.AccessPermission; -import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException; -import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation; -import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField; -import org.apache.pdfbox.rendering.PDFRenderer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; /** * The PDFBox implementation of {@code PdfDocumentReader} @@ -93,7 +97,7 @@ public class PdfBoxDocumentReader implements PdfDocumentReader { */ public PdfBoxDocumentReader(DSSDocument dssDocument) throws IOException, eu.europa.esig.dss.pades.exception.InvalidPasswordException { - this(dssDocument, null); + this(dssDocument, null, PdfMemoryUsageSetting.memoryOnly()); } /** @@ -101,16 +105,29 @@ public PdfBoxDocumentReader(DSSDocument dssDocument) * * @param dssDocument {@link DSSDocument} to read * @param passwordProtection {@link String} a password to open a protected document + * @param memoryUsageSetting {@link MemoryUsageSetting} load setting * @throws IOException if an exception occurs * @throws eu.europa.esig.dss.pades.exception.InvalidPasswordException if the password is not provided or * invalid for a protected document */ - public PdfBoxDocumentReader(DSSDocument dssDocument, String passwordProtection) + public PdfBoxDocumentReader(DSSDocument dssDocument, String passwordProtection, PdfMemoryUsageSetting pdfMemoryUsageSetting) throws IOException, eu.europa.esig.dss.pades.exception.InvalidPasswordException { Objects.requireNonNull(dssDocument, "The document must be defined!"); this.dssDocument = dssDocument; - try (InputStream is = dssDocument.openStream()) { - this.pdDocument = PDDocument.load(is, passwordProtection); + MemoryUsageSetting memoryUsageSetting = PdfBoxUtils.getMemoryUsageSetting(pdfMemoryUsageSetting); + try { + if (dssDocument instanceof FileDocument) { + FileDocument fileDocument = (FileDocument) dssDocument; + this.pdDocument = PDDocument.load(fileDocument.getFile(), passwordProtection, memoryUsageSetting); + } else if (dssDocument instanceof InMemoryDocument) { + InMemoryDocument inMemoryDocument = (InMemoryDocument) dssDocument; + this.pdDocument = PDDocument.load(inMemoryDocument.getBytes(), passwordProtection, null, null, + memoryUsageSetting); + } else { + try (InputStream is = dssDocument.openStream()) { + this.pdDocument = PDDocument.load(is, passwordProtection, memoryUsageSetting); + } + } } catch (InvalidPasswordException e) { throw new eu.europa.esig.dss.pades.exception.InvalidPasswordException( String.format("Encrypted document : %s", e.getMessage())); diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxNativeObjectFactory.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxNativeObjectFactory.java index 966c02ab9f..24f1da6d29 100644 --- a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxNativeObjectFactory.java +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxNativeObjectFactory.java @@ -20,6 +20,7 @@ */ package eu.europa.esig.dss.pdf.pdfbox; + import eu.europa.esig.dss.pdf.AbstractPdfObjFactory; import eu.europa.esig.dss.pdf.PDFServiceMode; import eu.europa.esig.dss.pdf.PDFSignatureService; diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxSignatureService.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxSignatureService.java index 3e808c287b..49183f4128 100644 --- a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxSignatureService.java +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxSignatureService.java @@ -20,11 +20,51 @@ */ package eu.europa.esig.dss.pdf.pdfbox; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.security.MessageDigest; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +import org.apache.pdfbox.cos.COSArray; +import org.apache.pdfbox.cos.COSBase; +import org.apache.pdfbox.cos.COSDictionary; +import org.apache.pdfbox.cos.COSName; +import org.apache.pdfbox.cos.COSObject; +import org.apache.pdfbox.cos.COSStream; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDDocumentCatalog; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.common.PDRectangle; +import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException; +import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget; +import org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary; +import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDPropBuild; +import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDPropBuildDataDict; +import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature; +import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; +import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions; +import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm; +import org.apache.pdfbox.pdmodel.interactive.form.PDField; +import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import eu.europa.esig.dss.enumerations.CertificationPermission; import eu.europa.esig.dss.enumerations.DigestAlgorithm; import eu.europa.esig.dss.enumerations.MimeTypeEnum; import eu.europa.esig.dss.model.DSSDocument; import eu.europa.esig.dss.model.DSSException; +import eu.europa.esig.dss.model.DSSMessageDigest; import eu.europa.esig.dss.model.x509.CertificateToken; import eu.europa.esig.dss.model.x509.Token; import eu.europa.esig.dss.pades.PAdESCommonParameters; @@ -35,63 +75,25 @@ import eu.europa.esig.dss.pades.validation.PdfValidationDataContainer; import eu.europa.esig.dss.pdf.AbstractPDFSignatureService; import eu.europa.esig.dss.pdf.AnnotationBox; -import eu.europa.esig.dss.model.DSSMessageDigest; import eu.europa.esig.dss.pdf.PAdESConstants; import eu.europa.esig.dss.pdf.PDFServiceMode; import eu.europa.esig.dss.pdf.PdfAnnotation; import eu.europa.esig.dss.pdf.PdfDocumentReader; import eu.europa.esig.dss.pdf.encryption.DSSSecureRandomProvider; import eu.europa.esig.dss.pdf.encryption.SecureRandomProvider; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; import eu.europa.esig.dss.pdf.pdfbox.visible.PdfBoxSignatureDrawer; import eu.europa.esig.dss.pdf.pdfbox.visible.PdfBoxSignatureDrawerFactory; import eu.europa.esig.dss.pdf.pdfbox.visible.nativedrawer.NativePdfBoxVisibleSignatureDrawer; import eu.europa.esig.dss.pdf.visible.ImageUtils; import eu.europa.esig.dss.signature.resources.DSSResourcesHandler; import eu.europa.esig.dss.spi.DSSUtils; -import eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken; -import eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken; -import eu.europa.esig.dss.utils.Utils; import eu.europa.esig.dss.spi.signature.AdvancedSignature; import eu.europa.esig.dss.spi.validation.ValidationData; +import eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken; +import eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken; import eu.europa.esig.dss.spi.x509.tsp.TimestampToken; -import org.apache.pdfbox.cos.COSArray; -import org.apache.pdfbox.cos.COSBase; -import org.apache.pdfbox.cos.COSDictionary; -import org.apache.pdfbox.cos.COSName; -import org.apache.pdfbox.cos.COSObject; -import org.apache.pdfbox.cos.COSStream; -import org.apache.pdfbox.pdmodel.PDDocument; -import org.apache.pdfbox.pdmodel.PDDocumentCatalog; -import org.apache.pdfbox.pdmodel.PDPage; -import org.apache.pdfbox.pdmodel.common.PDRectangle; -import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException; -import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget; -import org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary; -import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDPropBuild; -import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDPropBuildDataDict; -import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature; -import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; -import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions; -import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm; -import org.apache.pdfbox.pdmodel.interactive.form.PDField; -import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.security.MessageDigest; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; +import eu.europa.esig.dss.utils.Utils; /** * Implementation of PDFSignatureService using PDFBox @@ -132,7 +134,7 @@ protected DSSMessageDigest computeDigest(final DSSDocument toSignDocument, final try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); OutputStream os = resourcesHandler.createOutputStream(); PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(toSignDocument, - getPasswordString(parameters.getPasswordProtection()))) { + getPasswordString(parameters.getPasswordProtection()), pdfMemoryUsageSetting)) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -155,11 +157,16 @@ protected DSSMessageDigest computeDigest(final DSSDocument toSignDocument, final @Override protected DSSDocument signDocument(final DSSDocument toSignDocument, final byte[] cmsSignedData, - final PAdESCommonParameters parameters) { - try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); - OutputStream os = resourcesHandler.createOutputStream(); - PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(toSignDocument, - getPasswordString(parameters.getPasswordProtection()))) { + final PAdESCommonParameters parameters) { + try ( + + DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); + OutputStream os = resourcesHandler.createOutputStream(); + PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(toSignDocument, + getPasswordString(parameters.getPasswordProtection()), + pdfMemoryUsageSetting) + + ) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -690,7 +697,7 @@ public DSSDocument addNewSignatureField(final DSSDocument document, final Signat final char[] pwd) { try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); OutputStream os = resourcesHandler.createOutputStream(); - PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(document, getPasswordString(pwd))) { + PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(document, getPasswordString(pwd), pdfMemoryUsageSetting)) { checkPdfPermissions(documentReader, parameters); final PDDocument pdfDoc = documentReader.getPDDocument(); @@ -757,7 +764,7 @@ public DSSDocument previewPageWithVisualSignature(final DSSDocument toSignDocume try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); OutputStream os = resourcesHandler.createOutputStream(); PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(toSignDocument, - getPasswordString(parameters.getPasswordProtection()))) { + getPasswordString(parameters.getPasswordProtection()), pdfMemoryUsageSetting)) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -766,9 +773,9 @@ public DSSDocument previewPageWithVisualSignature(final DSSDocument toSignDocume signDocumentAndReturnDigest(parameters, signatureValue, os, documentReader); DSSDocument doc = resourcesHandler.writeToDSSDocument(); - return PdfBoxUtils.generateScreenshot(doc, parameters.getPasswordProtection(), - parameters.getImageParameters().getFieldParameters().getPage(), instantiateResourcesHandler()); - + + return PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(doc, parameters.getPasswordProtection(), parameters.getImageParameters().getFieldParameters().getPage()).withPdfMemoryUsageSetting(pdfMemoryUsageSetting), + instantiateResourcesHandler()); } catch (IOException e) { throw new DSSException(e); } @@ -779,7 +786,7 @@ public DSSDocument previewSignatureField(final DSSDocument toSignDocument, final try (DSSResourcesHandler resourcesHandler = instantiateResourcesHandler(); OutputStream os = resourcesHandler.createOutputStream(); PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(toSignDocument, - getPasswordString(parameters.getPasswordProtection()))) { + getPasswordString(parameters.getPasswordProtection()), pdfMemoryUsageSetting)) { final SignatureFieldParameters fieldParameters = parameters.getImageParameters().getFieldParameters(); checkPdfPermissions(documentReader, fieldParameters); @@ -801,7 +808,7 @@ public DSSDocument previewSignatureField(final DSSDocument toSignDocument, final private DSSDocument getNewSignatureFieldScreenshot(DSSDocument doc, PAdESCommonParameters parameters, List originalAnnotations) throws IOException { try (PdfBoxDocumentReader reader = new PdfBoxDocumentReader(doc, - getPasswordString(parameters.getPasswordProtection()))) { + getPasswordString(parameters.getPasswordProtection()), pdfMemoryUsageSetting)) { List newAnnotations = reader.getPdfAnnotations(parameters.getImageParameters().getFieldParameters().getPage()); AnnotationBox pageBox = reader.getPageBox(parameters.getImageParameters().getFieldParameters().getPage()); @@ -840,7 +847,7 @@ private DSSDocument getNewSignatureFieldScreenshot(DSSDocument doc, PAdESCommonP @Override protected PdfDocumentReader loadPdfDocumentReader(DSSDocument dssDocument, char[] passwordProtection) throws IOException, eu.europa.esig.dss.pades.exception.InvalidPasswordException { - return new PdfBoxDocumentReader(dssDocument, getPasswordString(passwordProtection)); + return new PdfBoxDocumentReader(dssDocument, getPasswordString(passwordProtection), pdfMemoryUsageSetting); } /** diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxUtils.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxUtils.java index 17ceb8a304..2415ce293c 100644 --- a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxUtils.java +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxUtils.java @@ -20,11 +20,13 @@ */ package eu.europa.esig.dss.pdf.pdfbox; -import eu.europa.esig.dss.model.DSSDocument; -import eu.europa.esig.dss.model.DSSException; -import eu.europa.esig.dss.pades.PAdESUtils; -import eu.europa.esig.dss.pdf.visible.ImageUtils; -import eu.europa.esig.dss.signature.resources.DSSResourcesHandler; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Objects; + +import org.apache.pdfbox.io.MemoryUsageSetting; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDResources; import org.apache.pdfbox.pdmodel.common.PDRectangle; @@ -33,11 +35,13 @@ import org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary; import org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.util.Objects; +import eu.europa.esig.dss.model.DSSDocument; +import eu.europa.esig.dss.model.DSSException; +import eu.europa.esig.dss.pades.PAdESUtils; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; +import eu.europa.esig.dss.pdf.visible.ImageUtils; +import eu.europa.esig.dss.signature.resources.DSSResourcesHandler; /** * Contains a set of utils for PdfBox implementation @@ -47,213 +51,77 @@ public class PdfBoxUtils { private PdfBoxUtils() { } - + /** * Generates a screenshot image of the specified page for the given PDF document * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param page a page number + * @param pdfBoxPageDocumentRequest {@link PdfBoxPageDocumentRequest} * @return {@link DSSDocument} PNG screenshot */ - public static DSSDocument generateScreenshot(DSSDocument pdfDocument, int page) { - return generateScreenshot(pdfDocument, (char[]) null, page); + public static DSSDocument generateScreenshot(PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest) { + return generateScreenshot(pdfBoxPageDocumentRequest, PAdESUtils.initializeDSSResourcesHandler()); } - + /** * Generates a screenshot image of the specified page for the given PDF document * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection {@link String} a PDF password protection phrase - * @param page a page number - * @return {@link DSSDocument} PNG screenshot - */ - public static DSSDocument generateScreenshot(DSSDocument pdfDocument, String passwordProtection, int page) { - return generateScreenshot(pdfDocument, passwordProtection, page, PAdESUtils.initializeDSSResourcesHandler()); - } - - /** - * Generates a screenshot image of the specified page for the given PDF document - * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection a PDF password protection phrase - * @param page a page number - * @return {@link DSSDocument} PNG screenshot - */ - public static DSSDocument generateScreenshot(DSSDocument pdfDocument, char[] passwordProtection, int page) { - return generateScreenshot(pdfDocument, passwordProtection, page, PAdESUtils.initializeDSSResourcesHandler()); - } - - /** - * Generates a screenshot image of the specified page for the given PDF document using a provided - * {@code eu.europa.esig.dss.signature.resources.DSSResourcesHandler} - * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection {@link String} a PDF password protection phrase - * @param page a page number + * @param pdfBoxPageDocumentRequest {@link PdfBoxPageDocumentRequest} * @param dssResourcesHandler {@link DSSResourcesHandler} * @return {@link DSSDocument} PNG screenshot */ - public static DSSDocument generateScreenshot(DSSDocument pdfDocument, String passwordProtection, int page, - DSSResourcesHandler dssResourcesHandler) { - BufferedImage bufferedImage = generateBufferedImageScreenshot(pdfDocument, passwordProtection, page); + public static DSSDocument generateScreenshot(PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest, DSSResourcesHandler dssResourcesHandler) { + Objects.requireNonNull(pdfBoxPageDocumentRequest, "pageDocumentRequest shall be defined!"); + BufferedImage bufferedImage = PdfBoxUtils.generateBufferedImageScreenshot(pdfBoxPageDocumentRequest); return ImageUtils.toDSSDocument(bufferedImage, dssResourcesHandler); } - - /** - * Generates a screenshot image of the specified page for the given PDF document using a provided - * {@code eu.europa.esig.dss.signature.resources.DSSResourcesHandler} - * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection a PDF password protection phrase - * @param page a page number - * @param dssResourcesHandler {@link DSSResourcesHandler} - * @return {@link DSSDocument} PNG screenshot - */ - public static DSSDocument generateScreenshot(DSSDocument pdfDocument, char[] passwordProtection, int page, - DSSResourcesHandler dssResourcesHandler) { - BufferedImage bufferedImage = generateBufferedImageScreenshot(pdfDocument, passwordProtection, page); - return ImageUtils.toDSSDocument(bufferedImage, dssResourcesHandler); - } - - /** - * The method generates a BufferedImage for the specified page of the document with String password - * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection {@link String} a PDF password protection phrase - * @param page a page number to be generates (starts from 1) - * @return {@link BufferedImage} - */ - public static BufferedImage generateBufferedImageScreenshot(DSSDocument pdfDocument, String passwordProtection, - int page) { - return generateBufferedImageScreenshot(pdfDocument, passwordProtection != null ? - passwordProtection.toCharArray() : null, page); - } - + /** * The method generates a BufferedImage for the specified page of the document * - * @param pdfDocument {@link DSSDocument} to generate screenshot for - * @param passwordProtection a PDF password protection phrase - * @param page a page number to be generates (starts from 1) + * @param pdfBoxPageDocumentRequest {@link PdfBoxPageDocumentRequest} * @return {@link BufferedImage} */ - public static BufferedImage generateBufferedImageScreenshot(DSSDocument pdfDocument, char[] passwordProtection, - int page) { - Objects.requireNonNull(pdfDocument, "pdfDocument shall be defined!"); - try (PdfBoxDocumentReader reader = new PdfBoxDocumentReader( - pdfDocument, passwordProtection != null ? new String(passwordProtection) : null)) { - return reader.generateImageScreenshot(page); + public static BufferedImage generateBufferedImageScreenshot(PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest) { + Objects.requireNonNull(pdfBoxPageDocumentRequest, "pageDocumentRequest shall be defined!"); + try (PdfBoxDocumentReader reader = new PdfBoxDocumentReader(pdfBoxPageDocumentRequest.getPdfDocument(), pdfBoxPageDocumentRequest.getPasswordProtection() != null ? new String(pdfBoxPageDocumentRequest.getPasswordProtection()) : null, + pdfBoxPageDocumentRequest.getPdfMemoryUsageSetting())) { + return reader.generateImageScreenshot(pdfBoxPageDocumentRequest.getPage()); } catch (IOException e) { - throw new DSSException(String.format("Unable to generate a screenshot for the document with name '%s' " - + "for the page number '%s'. Reason : %s", pdfDocument.getName(), page, e.getMessage()), e); + throw new DSSException( + String.format("Unable to generate a screenshot for the document with name '%s' " + "for the page number '%s'. Reason : %s", pdfBoxPageDocumentRequest.getPdfDocument().getName(), pdfBoxPageDocumentRequest.getPage(), e.getMessage()), + e); } - } - - /** - * This method returns an image representing a subtraction result between - * {@code document1} and {@code document2} for the given page number - * - * @param document1 {@link DSSDocument} - * @param document2 {@link DSSDocument} - * @param page page number - * @return {@link DSSDocument} subtraction result - */ - public static DSSDocument generateSubtractionImage(DSSDocument document1, DSSDocument document2, int page) { - return generateSubtractionImage(document1, (char[]) null, page, document2, (char[]) null, page); - } - - /** - * This method returns an image representing a subtraction result between - * {@code document1} and {@code document2} for the defined pages - * - * @param document1 {@link DSSDocument} the first document - * @param passwordDocument1 {@link String} a password protection for the - * {@code document1} when applicable (can be null) - * @param pageDocument1 page number identifying a page of the - * {@code document1} to be proceeded - * @param document2 {@link DSSDocument} the second document - * @param passwordDocument2 {@link String} a password protection for the - * {@code document2} when applicable (can be null) - * @param pageDocument2 page number identifying a page of the - * {@code document2} to be proceeded - * @return {@link DSSDocument} subtraction result - */ - public static DSSDocument generateSubtractionImage(DSSDocument document1, String passwordDocument1, int pageDocument1, - DSSDocument document2, String passwordDocument2, int pageDocument2) { - return generateSubtractionImage(document1, passwordDocument1, pageDocument1, - document2, passwordDocument2, pageDocument2, PAdESUtils.initializeDSSResourcesHandler()); - } - - /** - * This method returns an image representing a subtraction result between - * {@code document1} and {@code document2} for the defined pages - * - * @param document1 {@link DSSDocument} the first document - * @param passwordDocument1 a password protection for the - * {@code document1} when applicable (can be null) - * @param pageDocument1 page number identifying a page of the - * {@code document1} to be proceeded - * @param document2 {@link DSSDocument} the second document - * @param passwordDocument2 a password protection for the - * {@code document2} when applicable (can be null) - * @param pageDocument2 page number identifying a page of the - * {@code document2} to be proceeded - * @return {@link DSSDocument} subtraction result - */ - public static DSSDocument generateSubtractionImage(DSSDocument document1, char[] passwordDocument1, int pageDocument1, - DSSDocument document2, char[] passwordDocument2, int pageDocument2) { - return generateSubtractionImage(document1, passwordDocument1, pageDocument1, - document2, passwordDocument2, pageDocument2, PAdESUtils.initializeDSSResourcesHandler()); - } + } /** * This method returns an image representing a subtraction result between - * {@code document1} and {@code document2} for the defined pages. - * This method uses a provided {@code DSSResourcesHandler} + * {@code pdfBoxPageDocumentRequest1} and {@code pdfBoxPageDocumentRequest2} for the defined pages * - * @param document1 {@link DSSDocument} the first document - * @param passwordDocument1 {@link String} a password protection for the - * {@code document1} when applicable (can be null) - * @param pageDocument1 page number identifying a page of the - * {@code document1} to be proceeded - * @param document2 {@link DSSDocument} the second document - * @param passwordDocument2 {@link String} a password protection for the - * {@code document2} when applicable (can be null) - * @param pageDocument2 page number identifying a page of the - * {@code document2} to be proceeded - * @param dssResourcesHandler {@link DSSResourcesHandler} to be used + * @param pdfBoxPageDocumentRequest1 {@link PdfBoxPageDocumentRequest} the first document request + * @param pdfBoxPageDocumentRequest2 {@link PdfBoxPageDocumentRequest} the second document request * @return {@link DSSDocument} subtraction result */ - public static DSSDocument generateSubtractionImage(DSSDocument document1, String passwordDocument1, int pageDocument1, - DSSDocument document2, String passwordDocument2, int pageDocument2, - DSSResourcesHandler dssResourcesHandler) { - return generateSubtractionImage(document1, passwordDocument1 != null ? passwordDocument1.toCharArray() : null, pageDocument1, - document2, passwordDocument2 != null ? passwordDocument2.toCharArray() : null, pageDocument2, dssResourcesHandler); + public static DSSDocument generateSubtractionImage(PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest1, PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest2) { + return generateSubtractionImage(pdfBoxPageDocumentRequest1, pdfBoxPageDocumentRequest2, PAdESUtils.initializeDSSResourcesHandler()); } /** * This method returns an image representing a subtraction result between - * {@code document1} and {@code document2} for the defined pages. + * {@code pdfBoxPageDocumentRequest1} and {@code pdfBoxPageDocumentRequest2} for the defined + * pages. + * * This method uses a provided {@code DSSResourcesHandler} * - * @param document1 {@link DSSDocument} the first document - * @param passwordDocument1 a password protection for the - * {@code document1} when applicable (can be null) - * @param pageDocument1 page number identifying a page of the - * {@code document1} to be proceeded - * @param document2 {@link DSSDocument} the second document - * @param passwordDocument2 a password protection for the - * {@code document2} when applicable (can be null) - * @param pageDocument2 page number identifying a page of the - * {@code document2} to be proceeded - * @param dssResourcesHandler {@link DSSResourcesHandler} to be used + * @param pdfBoxPageDocumentRequest1 {@link PdfBoxPageDocumentRequest} the first document + * request + * @param pdfBoxPageDocumentRequest2 {@link PdfBoxPageDocumentRequest} the second document + * request + * @param dssResourcesHandler {@link DSSResourcesHandler} to be used * @return {@link DSSDocument} subtraction result */ - public static DSSDocument generateSubtractionImage(DSSDocument document1, char[] passwordDocument1, int pageDocument1, - DSSDocument document2, char[] passwordDocument2, int pageDocument2, - DSSResourcesHandler dssResourcesHandler) { - BufferedImage screenshotDoc1 = generateBufferedImageScreenshot(document1, passwordDocument1, pageDocument1); - BufferedImage screenshotDoc2 = generateBufferedImageScreenshot(document2, passwordDocument2, pageDocument2); + public static DSSDocument generateSubtractionImage(PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest1, PdfBoxPageDocumentRequest pdfBoxPageDocumentRequest2, DSSResourcesHandler dssResourcesHandler) { + BufferedImage screenshotDoc1 = generateBufferedImageScreenshot(pdfBoxPageDocumentRequest1); + BufferedImage screenshotDoc2 = generateBufferedImageScreenshot(pdfBoxPageDocumentRequest2); int width = Math.max(screenshotDoc1.getWidth(), screenshotDoc2.getWidth()); int height = Math.max(screenshotDoc1.getHeight(), screenshotDoc2.getHeight()); @@ -273,14 +141,16 @@ private static BufferedImage getOutputImage(int width, int height) { } /** - * This method creates a generic Appearance dictionary, containing a Normal Appearance + * This method creates a generic Appearance dictionary, containing a Normal + * Appearance * - * @param pdDocument {@link PDDocument} to create a new Appearance dictionary in + * @param pdDocument {@link PDDocument} to create a new Appearance dictionary + * in * @param pdRectangle {@link PDRectangle} used for annotation dictionary * @return {@link PDAppearanceDictionary} */ public static PDAppearanceDictionary createSignatureAppearanceDictionary(PDDocument pdDocument, - PDRectangle pdRectangle) { + PDRectangle pdRectangle) { Objects.requireNonNull(pdDocument, "PDDocument cannot be null!"); Objects.requireNonNull(pdRectangle, "PDRectangle cannot be null!"); @@ -301,4 +171,38 @@ public static PDAppearanceDictionary createSignatureAppearanceDictionary(PDDocum return appearance; } + /** + * It converts generic {@link PdfMemoryUsageSetting} to PDF Box domain + * + * @param pdfMemoryUsageSetting + * @return {@link MemoryUsageSetting} + */ + public static MemoryUsageSetting getMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + MemoryUsageSetting memoryUsageSetting = null; + switch (pdfMemoryUsageSetting.getMode()) { + case MEMORY: + if (pdfMemoryUsageSetting.getMaxMemoryBytes() != null) { + memoryUsageSetting = MemoryUsageSetting.setupMainMemoryOnly(pdfMemoryUsageSetting.getMaxMemoryBytes()); + } else { + memoryUsageSetting = MemoryUsageSetting.setupMainMemoryOnly(); + } + break; + case FILE: + if (pdfMemoryUsageSetting.getMaxFileBytes() != null) { + memoryUsageSetting = MemoryUsageSetting.setupTempFileOnly(pdfMemoryUsageSetting.getMaxFileBytes()); + } else { + memoryUsageSetting = MemoryUsageSetting.setupTempFileOnly(); + } + break; + case MIXED: + if (pdfMemoryUsageSetting.getMaxFileBytes() != null) { + memoryUsageSetting = MemoryUsageSetting.setupMixed(pdfMemoryUsageSetting.getMaxMemoryBytes(), pdfMemoryUsageSetting.getMaxFileBytes()); + } else { + memoryUsageSetting = MemoryUsageSetting.setupMixed(pdfMemoryUsageSetting.getMaxMemoryBytes()); + } + break; + } + return memoryUsageSetting; + } + } diff --git a/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/util/PdfBoxPageDocumentRequest.java b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/util/PdfBoxPageDocumentRequest.java new file mode 100644 index 0000000000..3e8bde8c2e --- /dev/null +++ b/dss-pades-pdfbox/src/main/java/eu/europa/esig/dss/pdf/pdfbox/util/PdfBoxPageDocumentRequest.java @@ -0,0 +1,94 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package eu.europa.esig.dss.pdf.pdfbox.util; + +import java.util.Objects; + +import eu.europa.esig.dss.model.DSSDocument; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; + +/** + * Represents a request for operating over a specific page of a given PDF + * document + */ +public class PdfBoxPageDocumentRequest { + + private DSSDocument pdfDocument; + private char[] passwordProtection; + private int page; + private PdfMemoryUsageSetting pdfMemoryUsageSetting = PdfMemoryUsageSetting.memoryOnly(); + + /** + * @param pdfDocument {@link DSSDocument} to generate screenshot for + * @param page a page number + */ + public PdfBoxPageDocumentRequest(DSSDocument pdfDocument, int page) { + this(pdfDocument, (String) null, page); + } + + /** + * @param pdfDocument {@link DSSDocument} to generate screenshot for + * @param passwordProtection {@link String} a PDF password protection phrase + * @param page a page number + */ + public PdfBoxPageDocumentRequest(DSSDocument pdfDocument, String passwordProtection, int page) { + this(pdfDocument, (char[]) (passwordProtection != null ? passwordProtection.toCharArray() : null), page); + } + + /** + * @param pdfDocument {@link DSSDocument} to generate screenshot for + * @param passwordProtection a PDF password protection phrase + * @param page a page number + */ + public PdfBoxPageDocumentRequest(DSSDocument pdfDocument, char[] passwordProtection, int page) { + Objects.requireNonNull(pdfDocument, "pdfDocument shall be defined!"); + this.pdfDocument = pdfDocument; + this.passwordProtection = passwordProtection; + this.page = page; + } + + /** + * + * @param pdfMemoryUsageSetting ({@link PdfMemoryUsageSetting} load setting + * @return {@link PdfBoxPageDocumentRequest} itself + */ + public PdfBoxPageDocumentRequest withPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + this.pdfMemoryUsageSetting = pdfMemoryUsageSetting; + return this; + } + + public DSSDocument getPdfDocument() { + return pdfDocument; + } + + public char[] getPasswordProtection() { + return passwordProtection; + } + + public int getPage() { + return page; + } + + public PdfMemoryUsageSetting getPdfMemoryUsageSetting() { + return pdfMemoryUsageSetting; + } + +} diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxObjectFactoryTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxObjectFactoryTest.java index 32475cda59..97296ad15a 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxObjectFactoryTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxObjectFactoryTest.java @@ -22,6 +22,7 @@ import eu.europa.esig.dss.pdf.IPdfObjFactory; import eu.europa.esig.dss.pdf.PDFSignatureService; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.pdf.PdfPermissionsChecker; import eu.europa.esig.dss.pdf.PdfSignatureFieldPositionChecker; import eu.europa.esig.dss.pdf.ServiceLoaderPdfObjFactory; @@ -114,6 +115,11 @@ public void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker // do nothing } + @Override + public void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + // do nothing + } + } } diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxUtilsTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxUtilsTest.java index 87b90f12dd..d7d7b71f1a 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxUtilsTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/PdfBoxUtilsTest.java @@ -20,26 +20,30 @@ */ package eu.europa.esig.dss.pades; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; + +import org.apache.pdfbox.io.MemoryUsageSetting; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + import eu.europa.esig.dss.enumerations.MimeTypeEnum; import eu.europa.esig.dss.model.DSSDocument; import eu.europa.esig.dss.model.DSSException; import eu.europa.esig.dss.model.FileDocument; import eu.europa.esig.dss.model.InMemoryDocument; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxUtils; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; import eu.europa.esig.dss.pdf.visible.ImageUtils; import eu.europa.esig.dss.signature.resources.TempFileResourcesHandlerBuilder; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.IOException; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; class PdfBoxUtilsTest { @@ -59,50 +63,45 @@ void init() { } @Test - void generateScreenshotTest() { - DSSDocument screenshot = PdfBoxUtils.generateScreenshot(sampleDocument, 1); + void generateScreenshotTest() { + DSSDocument screenshot = PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(sampleDocument, 1)); assertNotNull(screenshot); - - Exception exception = assertThrows(IndexOutOfBoundsException.class, - () -> PdfBoxUtils.generateScreenshot(sampleDocument, 0)); + + Exception exception = assertThrows(IndexOutOfBoundsException.class, () -> PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(sampleDocument, 0))); assertEquals("Index out of bounds: 0", exception.getMessage()); exception = assertThrows(IndexOutOfBoundsException.class, - () -> PdfBoxUtils.generateScreenshot(sampleDocument, 2)); + () -> PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(sampleDocument, 2))); assertEquals("1-based index out of bounds: 2", exception.getMessage()); - exception = assertThrows(NullPointerException.class, () -> PdfBoxUtils.generateScreenshot(null, 1)); + exception = assertThrows(NullPointerException.class, () -> PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(null, 1))); assertEquals("pdfDocument shall be defined!", exception.getMessage()); } @Test - void generateScreenshotWithPassTest() { - DSSDocument screenshot = PdfBoxUtils.generateScreenshot(protectedDocument, correctProtectionPhrase, 1); + void generateScreenshotWithPassTest() { + DSSDocument screenshot = PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(protectedDocument, correctProtectionPhrase, 1)); assertNotNull(screenshot); - - Exception exception = assertThrows(DSSException.class, - () -> PdfBoxUtils.generateScreenshot(protectedDocument, wrongProtectionPhrase, 1)); + + Exception exception = assertThrows(DSSException.class, () -> PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(protectedDocument, wrongProtectionPhrase, 1))); assertEquals("Encrypted document : Cannot decrypt PDF, the password is incorrect", exception.getMessage()); - - exception = assertThrows(DSSException.class, () -> PdfBoxUtils.generateScreenshot(protectedDocument, 1)); + + exception = assertThrows(DSSException.class, () -> PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(protectedDocument, 1))); assertEquals("Encrypted document : Cannot decrypt PDF, the password is incorrect", exception.getMessage()); } @Test void generateSubtractionImageTest() { - DSSDocument subtractionImage = PdfBoxUtils.generateSubtractionImage(sampleDocument, null, 1, - protectedDocument, correctProtectionPhrase, 1); + DSSDocument subtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(sampleDocument, (char[]) null, 1), new PdfBoxPageDocumentRequest(protectedDocument, correctProtectionPhrase, 1)); assertNotNull(subtractionImage); - subtractionImage = PdfBoxUtils.generateSubtractionImage(twoPagesDocument, (char[]) null, 1, - twoPagesDocument, (char[]) null, 2); + subtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(twoPagesDocument, (char[]) null, 1), new PdfBoxPageDocumentRequest(twoPagesDocument, (char[]) null, 2)); assertNotNull(subtractionImage); - subtractionImage = PdfBoxUtils.generateSubtractionImage(sampleDocument, twoPagesDocument, 1); + subtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(sampleDocument, 1), new PdfBoxPageDocumentRequest(twoPagesDocument, 1)); assertNotNull(subtractionImage); - Exception exception = assertThrows(IndexOutOfBoundsException.class, - () -> PdfBoxUtils.generateSubtractionImage(sampleDocument, twoPagesDocument, 2)); + Exception exception = assertThrows(IndexOutOfBoundsException.class, () -> PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(sampleDocument, 2), new PdfBoxPageDocumentRequest(twoPagesDocument, 2))); assertEquals("1-based index out of bounds: 2", exception.getMessage()); } @@ -111,23 +110,22 @@ void generateScreenshotWithTempFileTest() throws IOException { TempFileResourcesHandlerBuilder tempFileResourcesHandlerBuilder = new TempFileResourcesHandlerBuilder(); tempFileResourcesHandlerBuilder.setTempFileDirectory(new File("target")); - DSSDocument fileScreenshot = PdfBoxUtils.generateScreenshot(sampleDocument, (char[]) null, 1, - tempFileResourcesHandlerBuilder.createResourcesHandler()); + DSSDocument fileScreenshot = PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(sampleDocument, (char[]) null, 1), tempFileResourcesHandlerBuilder.createResourcesHandler()); assertNotNull(fileScreenshot); assertTrue(fileScreenshot instanceof FileDocument); - DSSDocument inMemoryScreenshot = PdfBoxUtils.generateScreenshot(sampleDocument, 1); + DSSDocument inMemoryScreenshot = PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(sampleDocument, 1)); assertNotNull(inMemoryScreenshot); assertFalse(inMemoryScreenshot instanceof FileDocument); assertVisuallyEqual(fileScreenshot, inMemoryScreenshot); - DSSDocument fileSubtractionImage = PdfBoxUtils.generateSubtractionImage(sampleDocument, (char[]) null, 1, - twoPagesDocument, (char[]) null, 1, tempFileResourcesHandlerBuilder.createResourcesHandler()); + DSSDocument fileSubtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(sampleDocument, (char[]) null, 1), new PdfBoxPageDocumentRequest(twoPagesDocument, (char[]) null, 1), + tempFileResourcesHandlerBuilder.createResourcesHandler()); assertNotNull(fileSubtractionImage); assertTrue(fileSubtractionImage instanceof FileDocument); - DSSDocument inMemorySubtractionImage = PdfBoxUtils.generateSubtractionImage(sampleDocument, twoPagesDocument, 1); + DSSDocument inMemorySubtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(sampleDocument, 1), new PdfBoxPageDocumentRequest(twoPagesDocument, 1)); assertNotNull(inMemorySubtractionImage); assertFalse(inMemorySubtractionImage instanceof FileDocument); @@ -140,5 +138,27 @@ private void assertVisuallyEqual(DSSDocument documentOne, DSSDocument documentTw assertEquals(0, ImageUtils.drawSubtractionImage(bufferedImageOnw, bufferedImageTwo, new BufferedImage(bufferedImageOnw.getWidth(), bufferedImageOnw.getHeight(), BufferedImage.TYPE_INT_RGB))); } + + @Test + void enforceMemoryUsageSettingMapping() { + PdfMemoryUsageSetting pdfMemoryUsageSetting = PdfMemoryUsageSetting.memoryOnly(999); + MemoryUsageSetting memoryUsageSetting = PdfBoxUtils.getMemoryUsageSetting(pdfMemoryUsageSetting); + assertEquals(true, memoryUsageSetting.useMainMemory()); + assertEquals(false, memoryUsageSetting.useTempFile()); + assertEquals(999, memoryUsageSetting.getMaxMainMemoryBytes()); + + pdfMemoryUsageSetting = PdfMemoryUsageSetting.fileOnly(888); + memoryUsageSetting = PdfBoxUtils.getMemoryUsageSetting(pdfMemoryUsageSetting); + assertEquals(false, memoryUsageSetting.useMainMemory()); + assertEquals(true, memoryUsageSetting.useTempFile()); + assertEquals(888, memoryUsageSetting.getMaxStorageBytes()); + + pdfMemoryUsageSetting = PdfMemoryUsageSetting.mixed(555, 666); + memoryUsageSetting = PdfBoxUtils.getMemoryUsageSetting(pdfMemoryUsageSetting); + assertEquals(true, memoryUsageSetting.useMainMemory()); + assertEquals(true, memoryUsageSetting.useTempFile()); + assertEquals(555, memoryUsageSetting.getMaxMainMemoryBytes()); + assertEquals(666, memoryUsageSetting.getMaxStorageBytes()); + } } diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/PdfBoxPAdESSignatureSuiteTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/PdfBoxPAdESSignatureSuiteTest.java index 43f62e5fb8..dce41c9639 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/PdfBoxPAdESSignatureSuiteTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/PdfBoxPAdESSignatureSuiteTest.java @@ -53,6 +53,7 @@ import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBNonPdfDocumentTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBNotEnoughSpaceForSignatureTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBOnlySigningCertTest; +import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBSignWithFileMemoryUsageSettingTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBSignWithTempFileHandlerTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBTest; import eu.europa.esig.dss.pades.signature.suite.PAdESLevelBWithAppNameTest; @@ -110,34 +111,44 @@ import org.junit.platform.suite.api.Suite; @Suite -@SelectClasses({ DigestStabilityTest.class, GetOriginalDocumentTest.class, PAdESDoubleSignatureTest.class, PAdESLevelBTest.class, - PAdESLevelBExternalSignatureTest.class, PAdESLevelBLoopTest.class, PAdESLevelBNotEnoughSpaceForSignatureTest.class, - PAdESLevelBOnlySigningCertTest.class, PAdESLevelBWithContentTimestampTest.class, PAdESLevelBWithDSATest.class, - PAdESLevelBWithECDSATest.class, PAdESLevelBWithSHA256andMGF1Test.class, PAdESLevelImpossibleLTAExceptionTest.class, - PAdESLevelImpossibleLTExceptionTest.class, PAdESLevelLTTest.class, PAdESLevelLTATest.class, PAdESLevelLTWrongAIATest.class, - PAdESLevelTTest.class, PDFTimestampFiltersTest.class, TwoPAdESSignaturesMustHaveDifferentIdTest.class, PAdESLevelBHugeTest.class, +@SelectClasses({ DigestStabilityTest.class, GetOriginalDocumentTest.class, PAdESDoubleSignatureTest.class, + PAdESLevelBTest.class, PAdESLevelBExternalSignatureTest.class, PAdESLevelBLoopTest.class, + PAdESLevelBNotEnoughSpaceForSignatureTest.class, PAdESLevelBOnlySigningCertTest.class, + PAdESLevelBWithContentTimestampTest.class, PAdESLevelBWithDSATest.class, PAdESLevelBWithECDSATest.class, + PAdESLevelBWithSHA256andMGF1Test.class, PAdESLevelImpossibleLTAExceptionTest.class, + PAdESLevelImpossibleLTExceptionTest.class, PAdESLevelLTTest.class, PAdESLevelLTATest.class, + PAdESLevelLTWrongAIATest.class, PAdESLevelTTest.class, PDFTimestampFiltersTest.class, + TwoPAdESSignaturesMustHaveDifferentIdTest.class, PAdESLevelBHugeTest.class, InvisibleSignatureFieldSignTest.class, PAdESSpaceEOFTest.class, PAdESDoubleLTAValidationDataTest.class, - PAdESNoDuplicateValidationDataTest.class, PAdESWithMGF1Test.class, PAdESWithSHA3Test.class, PAdESLevelTWithSHA1MessageImprintTest.class, - PAdESAllSelfSignedCertsTest.class, PAdESServiceTest.class, CertificateConflictTest.class, ProtectedDocumentsSignatureTest.class, - PAdESTwoSignersLTALevelTest.class, PAdESWithPemEncodedCrlTest.class, PAdESSignatureParametersSerializationTest.class, + PAdESNoDuplicateValidationDataTest.class, PAdESWithMGF1Test.class, PAdESWithSHA3Test.class, + PAdESLevelTWithSHA1MessageImprintTest.class, PAdESAllSelfSignedCertsTest.class, PAdESServiceTest.class, + CertificateConflictTest.class, ProtectedDocumentsSignatureTest.class, PAdESTwoSignersLTALevelTest.class, + PAdESWithPemEncodedCrlTest.class, PAdESSignatureParametersSerializationTest.class, PAdESSignedAssertionTest.class, PAdESLevelLTAAndLevelTTest.class, PAdESLevelTNotTrustedTSPTest.class, - PAdESLevelLTANotTrustedTSPTest.class, PAdESSignWithRevokedCertTest.class, PAdESLevelLTASignRevokedSigWithPOETest.class, - PAdESLevelBCustomTimeZoneTest.class, PAdESLevelLTCRLCounterTest.class, PAdESLevelBWithPlainECDSATest.class, - PAdESLevelBWithECDSATokenTest.class, PAdESLevelBWithPlainECDSATokenTest.class, PDFNotAdESLevelBWithoutCertificatesTest.class, - PDFNotAdESLevelTWithoutCertificatesTest.class, PDFNotAdESLevelLTWithoutCertificatesTest.class, PDFNotAdESLevelLTAWithoutCertificatesTest.class, - PAdESDoubleSignBAndExtendToLTATest.class, PDFSignWithPermissionsTest.class, PAdESNoChangesPermittedTest.class, - PAdESLevelBWithNoChangesPermittedTest.class, PAdESLevelBCertificationTest.class, PAdESDoubleSignatureLTAAndLTTest.class, - PAdESSignDocumentsConsequentlyTest.class, PAdESLevelBDigestDocumentTest.class, PAdESLevelBWithAppNameTest.class, - PAdESLevelBSignWithTempFileHandlerTest.class, PAdESSignWithAtomicMethodsTest.class, PAdESSignWithReInitParametersTest.class, - PAdESSignDocumentWithEmptySignatureTest.class, PAdESDoubleSignatureLTAndTTest.class, PAdESLevelLTASignDocumentWithXRefsTest.class, - PAdESLevelBWithValidationDataTest.class, PAdESLevelBWithValidationDataSameTstTrustAnchorTest.class, - PAdESLevelLTAWithSingleDocTstTest.class, PAdESLevelLTAWithSingleSelfSignedDocTstTest.class, PAdESExternalCMSSignatureBLevelTest.class, - PAdESExternalCMSSignatureTLevelTest.class, PAdESExternalCMSSignatureLTLevelTest.class, PAdESExternalCMSSignatureLTALevelTest.class, - PAdESExternalCMSSignatureTLevelDocTstTest.class, PAdESExternalCMSSignatureLTLevelDocTstTest.class, - PAdESExternalCMSSignatureLTALevelDocTstTest.class, PAdESExternalCMSSignatureServiceTest.class, CMSForPAdESGenerationServiceTest.class, - PAdESLevelBWithContentTimestampCustomDigestAlgoTest.class, PAdESLevelBEncryptedDocumentTest.class, PAdESLevelLTWithVRIDictTest.class, - PAdESDoubleSignatureLTWithVRIAndLTTest.class, PAdESDoubleSignatureLTAndLTWithVRITest.class, PAdESLevelBNonPdfDocumentTest.class, - PAdESWithMGF1Test.class, PAdESLevelBEnvelopedRSASSAPSSTest.class, PAdESLevelBEnvelopedNONEWithRSASSAPSSTest.class }) + PAdESLevelLTANotTrustedTSPTest.class, PAdESSignWithRevokedCertTest.class, + PAdESLevelLTASignRevokedSigWithPOETest.class, PAdESLevelBCustomTimeZoneTest.class, + PAdESLevelLTCRLCounterTest.class, PAdESLevelBWithPlainECDSATest.class, PAdESLevelBWithECDSATokenTest.class, + PAdESLevelBWithPlainECDSATokenTest.class, PDFNotAdESLevelBWithoutCertificatesTest.class, + PDFNotAdESLevelTWithoutCertificatesTest.class, PDFNotAdESLevelLTWithoutCertificatesTest.class, + PDFNotAdESLevelLTAWithoutCertificatesTest.class, PAdESDoubleSignBAndExtendToLTATest.class, + PDFSignWithPermissionsTest.class, PAdESNoChangesPermittedTest.class, + PAdESLevelBWithNoChangesPermittedTest.class, PAdESLevelBCertificationTest.class, + PAdESDoubleSignatureLTAAndLTTest.class, PAdESSignDocumentsConsequentlyTest.class, + PAdESLevelBDigestDocumentTest.class, PAdESLevelBWithAppNameTest.class, + PAdESLevelBSignWithTempFileHandlerTest.class, PAdESLevelBSignWithFileMemoryUsageSettingTest.class, + PAdESSignWithAtomicMethodsTest.class, PAdESSignWithReInitParametersTest.class, + PAdESSignDocumentWithEmptySignatureTest.class, PAdESDoubleSignatureLTAndTTest.class, + PAdESLevelLTASignDocumentWithXRefsTest.class, PAdESLevelBWithValidationDataTest.class, + PAdESLevelBWithValidationDataSameTstTrustAnchorTest.class, PAdESLevelLTAWithSingleDocTstTest.class, + PAdESLevelLTAWithSingleSelfSignedDocTstTest.class, PAdESExternalCMSSignatureBLevelTest.class, + PAdESExternalCMSSignatureTLevelTest.class, PAdESExternalCMSSignatureLTLevelTest.class, + PAdESExternalCMSSignatureLTALevelTest.class, PAdESExternalCMSSignatureTLevelDocTstTest.class, + PAdESExternalCMSSignatureLTLevelDocTstTest.class, PAdESExternalCMSSignatureLTALevelDocTstTest.class, + PAdESExternalCMSSignatureServiceTest.class, CMSForPAdESGenerationServiceTest.class, + PAdESLevelBWithContentTimestampCustomDigestAlgoTest.class, PAdESLevelBEncryptedDocumentTest.class, + PAdESLevelLTWithVRIDictTest.class, PAdESDoubleSignatureLTWithVRIAndLTTest.class, + PAdESDoubleSignatureLTAndLTWithVRITest.class, PAdESLevelBNonPdfDocumentTest.class, PAdESWithMGF1Test.class, + PAdESLevelBEnvelopedRSASSAPSSTest.class, PAdESLevelBEnvelopedNONEWithRSASSAPSSTest.class }) class PdfBoxPAdESSignatureSuiteTest { } diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/AbstractTestVisualComparator.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/AbstractTestVisualComparator.java index 97c8bb3845..3d22b5dff1 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/AbstractTestVisualComparator.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/AbstractTestVisualComparator.java @@ -29,8 +29,10 @@ import eu.europa.esig.dss.pdf.pdfbox.PdfBoxDocumentReader; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxNativeObjectFactory; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxUtils; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; import eu.europa.esig.dss.pdf.visible.ImageUtils; import eu.europa.esig.dss.test.PKIFactoryAccess; + import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.PDPageTree; @@ -92,10 +94,10 @@ protected void drawAndCompareExplicitly() throws IOException { DSSDocument previewNative = getService().previewPageWithVisualSignature(getDocumentToSign(), getSignatureParameters()); DSSDocument signatureFieldNative = getService().previewSignatureField(getDocumentToSign(), getSignatureParameters()); - - assertFalse(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(getDocumentToSign(), 1))); + + assertFalse(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(getDocumentToSign(), 1)))); assertFalse(areImagesVisuallyEqual(previewNative, signatureFieldNative)); - assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(nativeDrawerPdf, 1))); + assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(nativeDrawerPdf, 1)))); } protected boolean arePdfDocumentsVisuallyEqual(DSSDocument dssDoc1, DSSDocument dssDoc2) throws IOException { diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/DefaultVsNativeDrawerComparatorTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/DefaultVsNativeDrawerComparatorTest.java index 3e7e2f21cf..83afd88de5 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/DefaultVsNativeDrawerComparatorTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/signature/visible/DefaultVsNativeDrawerComparatorTest.java @@ -20,6 +20,23 @@ */ package eu.europa.esig.dss.pades.signature.visible; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.awt.Color; +import java.awt.Font; +import java.io.IOException; +import java.util.Date; + +import org.apache.pdfbox.pdmodel.font.PDType1Font; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInfo; + import eu.europa.esig.dss.alert.exception.AlertException; import eu.europa.esig.dss.enumerations.ImageScaling; import eu.europa.esig.dss.enumerations.MimeTypeEnum; @@ -43,23 +60,8 @@ import eu.europa.esig.dss.pdf.pdfbox.PdfBoxDefaultObjectFactory; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxNativeObjectFactory; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxUtils; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; import eu.europa.esig.dss.pdf.pdfbox.visible.PdfBoxNativeFont; -import org.apache.pdfbox.pdmodel.font.PDType1Font; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInfo; - -import java.awt.Color; -import java.awt.Font; -import java.io.IOException; -import java.util.Date; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; @Tag("slow") class DefaultVsNativeDrawerComparatorTest extends AbstractTestVisualComparator { @@ -138,10 +140,10 @@ void textFullyTransparentTest() throws IOException { DSSDocument previewNative = getService().previewPageWithVisualSignature(getDocumentToSign(), getSignatureParameters()); DSSDocument signatureFieldNative = getService().previewSignatureField(getDocumentToSign(), getSignatureParameters()); - - assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(getDocumentToSign(), 1))); + + assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(getDocumentToSign(), 1)))); assertFalse(areImagesVisuallyEqual(previewNative, signatureFieldNative)); - assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(nativeDrawerPdf, 1))); + assertTrue(areImagesVisuallyEqual(previewNative, PdfBoxUtils.generateScreenshot(new PdfBoxPageDocumentRequest(nativeDrawerPdf, 1)))); } @Test diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/validation/DetectionModificationAfterSignTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/validation/DetectionModificationAfterSignTest.java index 328ac809c5..4e5c7cfd47 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/validation/DetectionModificationAfterSignTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pades/validation/DetectionModificationAfterSignTest.java @@ -27,6 +27,7 @@ import eu.europa.esig.dss.pades.signature.PAdESService; import eu.europa.esig.dss.pades.signature.visible.AbstractTestVisualComparator; import eu.europa.esig.dss.pdf.pdfbox.PdfBoxUtils; +import eu.europa.esig.dss.pdf.pdfbox.util.PdfBoxPageDocumentRequest; import eu.europa.esig.dss.spi.signature.AdvancedSignature; import eu.europa.esig.dss.spi.validation.CommonCertificateVerifier; import eu.europa.esig.dss.validation.SignedDocumentValidator; @@ -65,7 +66,7 @@ void testWithModification() throws IOException { // Additional code to detect visual difference assertFalse(arePdfDocumentsVisuallyEqual(dssDocument, expected)); - DSSDocument subtractionImage = PdfBoxUtils.generateSubtractionImage(dssDocument, expected, 1); + DSSDocument subtractionImage = PdfBoxUtils.generateSubtractionImage(new PdfBoxPageDocumentRequest(dssDocument, 1), new PdfBoxPageDocumentRequest(expected, 1)); assertNotNull(subtractionImage); } diff --git a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReaderTest.java b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReaderTest.java index 7f46b2c390..c65c79f8cb 100644 --- a/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReaderTest.java +++ b/dss-pades-pdfbox/src/test/java/eu/europa/esig/dss/pdf/pdfbox/PdfBoxDocumentReaderTest.java @@ -25,7 +25,9 @@ import eu.europa.esig.dss.pades.PAdESSignatureParameters; import eu.europa.esig.dss.pdf.PdfDocumentReader; import eu.europa.esig.dss.pdf.PdfDssDict; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; import eu.europa.esig.dss.test.PKIFactoryAccess; + import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.encryption.AccessPermission; import org.junit.jupiter.api.Test; @@ -87,7 +89,7 @@ void permissionsReadOnlyDocument() throws IOException { @Test void permissionsProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/open_protected.pdf")); - try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ")) { + try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ", PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); @@ -98,7 +100,7 @@ void permissionsProtectedDocument() throws IOException { @Test void permissionsEditionProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/edition_protected_none.pdf")); - try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ")) { + try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ", PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); @@ -109,7 +111,7 @@ void permissionsEditionProtectedDocument() throws IOException { @Test void permissionsEditionNoFieldsProtectedDocument() throws IOException { DSSDocument dssDocument = new InMemoryDocument(getClass().getResourceAsStream("/protected/edition_protected_signing_allowed_no_field.pdf")); - try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ")) { + try (PdfBoxDocumentReader documentReader = new PdfBoxDocumentReader(dssDocument, " ", PdfMemoryUsageSetting.memoryOnly())) { assertTrue(documentReader.isEncrypted()); assertTrue(documentReader.isOpenWithOwnerAccess()); assertTrue(documentReader.canFillSignatureForm()); diff --git a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPDFSignatureService.java b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPDFSignatureService.java index 18cffb1a36..92d8cd3126 100644 --- a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPDFSignatureService.java +++ b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPDFSignatureService.java @@ -115,6 +115,11 @@ public abstract class AbstractPDFSignatureService implements PDFSignatureService * Used to verify the signature field position placement validity */ protected PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker = new PdfSignatureFieldPositionChecker(); + + /** + * Used to specify load mode of the PDF document + */ + protected PdfMemoryUsageSetting pdfMemoryUsageSetting = PdfMemoryUsageSetting.memoryOnly(); /** * Constructor for the PDFSignatureService @@ -159,6 +164,12 @@ public void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker Objects.requireNonNull(pdfSignatureFieldPositionChecker, "PdfSignatureFieldPositionChecker cannot be null!"); this.pdfSignatureFieldPositionChecker = pdfSignatureFieldPositionChecker; } + + @Override + public void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + Objects.requireNonNull(pdfMemoryUsageSetting, "PdfMemoryUsageSetting cannot be null!"); + this.pdfMemoryUsageSetting = pdfMemoryUsageSetting; + } /** * Returns a SignatureDrawer initialized from a provided diff --git a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPdfObjFactory.java b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPdfObjFactory.java index eb610a955e..7f6fedf9b1 100644 --- a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPdfObjFactory.java +++ b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/AbstractPdfObjFactory.java @@ -54,6 +54,11 @@ public abstract class AbstractPdfObjFactory implements IPdfObjFactory { * Used to verify the signature field position placement validity */ private PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker; + + /** + * Used to specify load mode of the PDF document + */ + private PdfMemoryUsageSetting pdfMemoryUsageSetting; /** * Default constructor instantiating object with null values @@ -86,6 +91,11 @@ public void setPdfPermissionsChecker(PdfPermissionsChecker pdfPermissionsChecker public void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker) { this.pdfSignatureFieldPositionChecker = pdfSignatureFieldPositionChecker; } + + @Override + public void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting) { + this.pdfMemoryUsageSetting = pdfMemoryUsageSetting; + } /** * This method is used to provide configuration to the given {@code pdfSignatureService} @@ -110,6 +120,9 @@ protected PDFSignatureService configure(PDFSignatureService pdfSignatureService) if (pdfSignatureFieldPositionChecker != null) { pdfSignatureService.setPdfSignatureFieldPositionChecker(pdfSignatureFieldPositionChecker); } + if (pdfMemoryUsageSetting != null) { + pdfSignatureService.setPdfMemoryUsageSetting(pdfMemoryUsageSetting); + } return pdfSignatureService; } diff --git a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/IPdfObjFactory.java b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/IPdfObjFactory.java index 01529345a4..708261ebd9 100644 --- a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/IPdfObjFactory.java +++ b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/IPdfObjFactory.java @@ -96,5 +96,12 @@ public interface IPdfObjFactory { * @param pdfSignatureFieldPositionChecker {@link PdfPermissionsChecker} */ void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker); + + /** + * This method is used to set a custom {@code PdfMemoryUsageSetting} to specify the load mode of the PDF document + * + * @param pdfMemoryUsageSetting {@link PdfMemoryUsageSetting} + */ + void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting); } diff --git a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PDFSignatureService.java b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PDFSignatureService.java index 262e256f65..b3ceee9bb9 100644 --- a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PDFSignatureService.java +++ b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PDFSignatureService.java @@ -248,5 +248,13 @@ DSSDocument addNewSignatureField(final DSSDocument document, final SignatureFiel * @param pdfSignatureFieldPositionChecker {@link PdfPermissionsChecker} */ void setPdfSignatureFieldPositionChecker(PdfSignatureFieldPositionChecker pdfSignatureFieldPositionChecker); + + /** + * Sets the {@code PdfMemoryUsageSetting} used to specify the load mode of the + * PDF document + * + * @param pdfMemoryUsageSetting {@link PdfMemoryUsageSetting} + */ + void setPdfMemoryUsageSetting(PdfMemoryUsageSetting pdfMemoryUsageSetting); } diff --git a/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PdfMemoryUsageSetting.java b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PdfMemoryUsageSetting.java new file mode 100644 index 0000000000..4bf296438a --- /dev/null +++ b/dss-pades/src/main/java/eu/europa/esig/dss/pdf/PdfMemoryUsageSetting.java @@ -0,0 +1,134 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package eu.europa.esig.dss.pdf; + +/** + * Represents the PDF document loading setting + */ +public class PdfMemoryUsageSetting { + + /** + * MemoryUsageSetting's load options + */ + public enum Mode { + MEMORY, FILE, MIXED; + } + + private Mode mode; + private Long maxMemoryBytes; + private Long maxFileBytes; + + /** + * + * @return MemoryUsageSetting's load option {@link Mode} + */ + public Mode getMode() { + return mode; + } + + /** + * Meaningful when mode is {@code Mode.MEMORY} or {@code Mode.MIXED} + * + * @return max bytes to be loaded into memory + */ + public Long getMaxMemoryBytes() { + return maxMemoryBytes; + } + + /** + * Meaningful when mode is {@code Mode.FILE} or {@code Mode.MIXED} + * + * @return max bytes to be loaded into file + */ + public Long getMaxFileBytes() { + return maxFileBytes; + } + + private PdfMemoryUsageSetting(Mode mode, Long maxMemoryBytes, Long maxFileBytes) { + this.mode = mode; + this.maxMemoryBytes = maxMemoryBytes; + this.maxFileBytes = maxFileBytes; + } + + /** + * It represents memory only unrestricted allocation size load mode. + * + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting memoryOnly() { + return new PdfMemoryUsageSetting(Mode.MEMORY, null, null); + } + + /** + * It represents memory only restricted allocation size load mode. + * + * @param maxBytes max allocation size + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting memoryOnly(long maxBytes) { + return new PdfMemoryUsageSetting(Mode.MEMORY, maxBytes, null); + } + + /** + * It represents file only unrestricted allocation size load mode. + * + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting fileOnly() { + return new PdfMemoryUsageSetting(Mode.FILE, null, null); + } + + /** + * It represents file only unrestricted allocation size load mode. + * + * @param maxBytes max allocation size + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting fileOnly(long maxBytes) { + return new PdfMemoryUsageSetting(Mode.FILE, null, maxBytes); + } + + /** + * It represents mixed memory-first unrestricted file allocation size load mode. + * + * @param maxMemoryBytes max memory allocation size + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting mixed(long maxMemoryBytes) { + return new PdfMemoryUsageSetting(Mode.MIXED, maxMemoryBytes, null); + } + + /** + * It represents mixed memory-first restricted file allocation size load mode. + * + * @param maxMemoryBytes max memory allocation size + * @param maxFileBytes max file allocation size + * @return the PDF document load setting {@link PdfMemoryUsageSetting} + */ + public static PdfMemoryUsageSetting mixed(long maxMemoryBytes, long maxFileBytes) { + return new PdfMemoryUsageSetting(Mode.MIXED, maxMemoryBytes, maxFileBytes); + } + + @Override + public String toString() { + return String.format("%s[%s, %d, %d]", PdfMemoryUsageSetting.class.getSimpleName(), mode, maxMemoryBytes, maxFileBytes); + } +} diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/extension/suite/PAdESExtensionBToLTAWithExpiredUserTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/extension/suite/PAdESExtensionBToLTAWithExpiredUserTest.java index fb958489e5..ae915e1c53 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/extension/suite/PAdESExtensionBToLTAWithExpiredUserTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/extension/suite/PAdESExtensionBToLTAWithExpiredUserTest.java @@ -29,7 +29,6 @@ import eu.europa.esig.dss.enumerations.SignatureLevel; import eu.europa.esig.dss.enumerations.TimestampType; import eu.europa.esig.dss.model.DSSDocument; -import eu.europa.esig.dss.pades.PAdESSignatureParameters; import eu.europa.esig.dss.pades.signature.PAdESService; import eu.europa.esig.dss.utils.Utils; import eu.europa.esig.dss.spi.validation.CertificateVerifier; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/signature/suite/PAdESLevelBSignWithFileMemoryUsageSettingTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/signature/suite/PAdESLevelBSignWithFileMemoryUsageSettingTest.java new file mode 100644 index 0000000000..5be6401d08 --- /dev/null +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/signature/suite/PAdESLevelBSignWithFileMemoryUsageSettingTest.java @@ -0,0 +1,243 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package eu.europa.esig.dss.pades.signature.suite; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; +import org.junit.jupiter.api.BeforeEach; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.europa.esig.dss.enumerations.SignatureLevel; +import eu.europa.esig.dss.model.DSSDocument; +import eu.europa.esig.dss.model.FileDocument; +import eu.europa.esig.dss.model.SignatureValue; +import eu.europa.esig.dss.model.ToBeSigned; +import eu.europa.esig.dss.pades.PAdESSignatureParameters; +import eu.europa.esig.dss.pades.signature.PAdESService; +import eu.europa.esig.dss.pdf.IPdfObjFactory; +import eu.europa.esig.dss.pdf.PdfMemoryUsageSetting; +import eu.europa.esig.dss.pdf.ServiceLoaderPdfObjFactory; +import eu.europa.esig.dss.signature.resources.TempFileResourcesHandlerBuilder; +import eu.europa.esig.dss.utils.Utils; + +public class PAdESLevelBSignWithFileMemoryUsageSettingTest extends AbstractPAdESTestSignature { + + private static final Logger LOG = LoggerFactory.getLogger(PAdESLevelBSignWithFileMemoryUsageSettingTest.class); + + private PAdESService service; + private PAdESSignatureParameters signatureParameters; + private DSSDocument documentToSign; + + @BeforeEach + void init() throws Exception { + documentToSign = new FileDocument(new File(PAdESLevelBSignWithFileMemoryUsageSettingTest.class.getClassLoader().getResource("./big_file.pdf").toURI())); + + signatureParameters = new PAdESSignatureParameters(); + signatureParameters.setSigningCertificate(getSigningCert()); + signatureParameters.setCertificateChain(getCertificateChain()); + signatureParameters.setSignatureLevel(SignatureLevel.PAdES_BASELINE_B); + + service = new PAdESService(getCompleteCertificateVerifier()); + service.setTspSource(getAlternateGoodTsa()); + } + + @Override + protected DSSDocument sign() { + TempFileResourcesHandlerBuilder tempFileResourcesHandlerBuilder = new TempFileResourcesHandlerBuilder(); + tempFileResourcesHandlerBuilder.setTempFileDirectory(new File("target")); + + Pair, File> memoryOnlySignTuple = doAllSigns(PdfMemoryUsageSetting.memoryOnly(), tempFileResourcesHandlerBuilder); + List memoryOnlyMemoryConsumptions = memoryOnlySignTuple.getLeft(); + + attemptFreeRuntimeMemory(); + + Pair, File> fileOnlySignTuple = doAllSigns(PdfMemoryUsageSetting.fileOnly(), tempFileResourcesHandlerBuilder); + List fileOnlyMemoryConsumptions = fileOnlySignTuple.getLeft(); + + attemptFreeRuntimeMemory(); + +// assertEquals(memoryOnlyMemoryConsumptions.size(), fileOnlyMemoryConsumptions.size()); +// +// double memoryOnlyMemoryConsumptionsSum = memoryOnlyMemoryConsumptions.stream().collect(Collectors.summingDouble(a -> a)); +// double fileOnlyMemoryConsumptionsSum = fileOnlyMemoryConsumptions.stream().collect(Collectors.summingDouble(a -> a)); +// double difference = memoryOnlyMemoryConsumptionsSum - fileOnlyMemoryConsumptionsSum; +// LOG.info("Memory Sum difference is: {}Mb", difference); +// assertTrue(difference > 0); + + File ltaSignatureFile = fileOnlySignTuple.getRight(); + + assertTrue(ltaSignatureFile.exists()); + + File tempFile = null; + try { + tempFile = Files.createTempFile("dss", ".pdf").toFile(); + try (InputStream is = Files.newInputStream(ltaSignatureFile.toPath()); OutputStream os = Files.newOutputStream(tempFile.toPath())) { + Utils.copy(is, os); + } + + } catch (IOException e) { + fail(e); + } + + assertTrue(ltaSignatureFile.exists()); + + assertNotNull(tempFile); + assertTrue(tempFile.exists()); + + tempFileResourcesHandlerBuilder.clear(); + + assertFalse(ltaSignatureFile.exists()); + assertTrue(tempFile.exists()); + + return new FileDocument(tempFile); + } + + private Pair, File> doAllSigns(PdfMemoryUsageSetting pdfMemoryUsageSetting, TempFileResourcesHandlerBuilder tempFileResourcesHandlerBuilder) { + PAdESService service = getService(); + PAdESSignatureParameters params = getSignatureParameters(); + DSSDocument toBeSigned = getDocumentToSign(); + + ArrayList memoryConsumptions = new ArrayList<>(); + + IPdfObjFactory pdfObjFactory = new ServiceLoaderPdfObjFactory(); + pdfObjFactory.setResourcesHandlerBuilder(tempFileResourcesHandlerBuilder); + pdfObjFactory.setPdfMemoryUsageSetting(pdfMemoryUsageSetting); + service.setPdfObjFactory(pdfObjFactory); + + signatureParameters.setSignatureLevel(SignatureLevel.PAdES_BASELINE_B); + + attemptFreeRuntimeMemory(); + double memoryBefore = getRuntimeMemoryInMegabytes(); + + ToBeSigned dataToSign = service.getDataToSign(toBeSigned, params); + + double memoryAfterGetDataToSign = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryAfterGetDataToSign - memoryBefore); + LOG.info("[{}] Memory used for getDataToSign() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryAfterGetDataToSign - memoryBefore); + + attemptFreeRuntimeMemory(); + memoryBefore = getRuntimeMemoryInMegabytes(); + + SignatureValue signatureValue = getToken().sign(dataToSign, getSignatureParameters().getDigestAlgorithm(), getPrivateKeyEntry()); + assertTrue(service.isValidSignatureValue(dataToSign, signatureValue, getSigningCert())); + + double memoryAfterTokenSign = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryAfterTokenSign - memoryBefore); + LOG.info("[{}] Memory used for token sign() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryAfterTokenSign - memoryBefore); + + attemptFreeRuntimeMemory(); + memoryBefore = getRuntimeMemoryInMegabytes(); + + DSSDocument signedDocument = service.signDocument(toBeSigned, params, signatureValue); + + double memoryAfterSignDocument = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryAfterSignDocument - memoryBefore); + LOG.info("[{}] Memory used for signDocument() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryAfterSignDocument - memoryBefore); + + params.setSignatureLevel(SignatureLevel.PAdES_BASELINE_T); + + attemptFreeRuntimeMemory(); + memoryBefore = getRuntimeMemoryInMegabytes(); + + DSSDocument tLevelSignature = service.extendDocument(signedDocument, params); + + double memoryTLevelExtendDocument = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryTLevelExtendDocument - memoryBefore); + LOG.info("[{}] Memory used for T-Level extendDocument() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryTLevelExtendDocument - memoryBefore); + + params.setSignatureLevel(SignatureLevel.PAdES_BASELINE_LT); + + attemptFreeRuntimeMemory(); + memoryBefore = getRuntimeMemoryInMegabytes(); + + DSSDocument ltLevelSignature = service.extendDocument(tLevelSignature, params); + + double memoryLTLevelExtendDocument = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryLTLevelExtendDocument - memoryBefore); + LOG.info("[{}] Memory used for LT-Level extendDocument() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryLTLevelExtendDocument - memoryBefore); + + params.setSignatureLevel(SignatureLevel.PAdES_BASELINE_LTA); + + attemptFreeRuntimeMemory(); + memoryBefore = getRuntimeMemoryInMegabytes(); + + DSSDocument ltaLevelSignature = service.extendDocument(ltLevelSignature, params); + + double memoryLTALevelExtendDocument = getRuntimeMemoryInMegabytes(); + memoryConsumptions.add(memoryLTALevelExtendDocument - memoryBefore); + LOG.info("[{}] Memory used for LTA-Level extendDocument() : {}Mb", pdfMemoryUsageSetting.getMode(), memoryLTALevelExtendDocument - memoryBefore); + + FileDocument ltaSignatureFileDocument = (FileDocument) ltaLevelSignature; + File ltaSignatureFile = ltaSignatureFileDocument.getFile(); + return Pair.of(memoryConsumptions, ltaSignatureFile); + } + + private void attemptFreeRuntimeMemory() { + Runtime.getRuntime().gc(); + LOG.debug("Freeing up memory.."); + Runtime.getRuntime().gc(); // Empirically it is required to do more calls in order to properly clean-up + } + + private static double getRuntimeMemoryInMegabytes() { + // Get the Java runtime + Runtime runtime = Runtime.getRuntime(); + // Calculate the used memory + double memory = runtime.totalMemory() - runtime.freeMemory(); + return bytesToMegabytes(memory); + } + + private static double bytesToMegabytes(double bytes) { + return bytes / (1024L * 1024L); + } + + @Override + protected PAdESService getService() { + return service; + } + + @Override + protected PAdESSignatureParameters getSignatureParameters() { + return signatureParameters; + } + + @Override + protected DSSDocument getDocumentToSign() { + return documentToSign; + } + + @Override + protected String getSigningAlias() { + return GOOD_USER; + } +} diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESNoCertificatesValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESNoCertificatesValidationTest.java index 015661df0a..993bcf823c 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESNoCertificatesValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESNoCertificatesValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESValidationTest.java index 73b02ac47a..5d89292fa4 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESWithSigPolicyIdentifierValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESWithSigPolicyIdentifierValidationTest.java index c26927b189..30bdf5c2d3 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESWithSigPolicyIdentifierValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESBESWithSigPolicyIdentifierValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESEPESValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESEPESValidationTest.java index 9049ade6d7..1a64245e10 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESEPESValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESEPESValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVBasedOnEPESValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVBasedOnEPESValidationTest.java index 18cd6841ce..02574f0a3e 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVBasedOnEPESValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVBasedOnEPESValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVValidationTest.java index c38a30ea23..56fde60374 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVWithReasonValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVWithReasonValidationTest.java index 14431dde48..f79b0b799a 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVWithReasonValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESLTVWithReasonValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESMultipleLTLevelSignaturesTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESMultipleLTLevelSignaturesTest.java index 116eaa3a49..d7fff96ba8 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESMultipleLTLevelSignaturesTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESMultipleLTLevelSignaturesTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESWithEofSignatureTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESWithEofSignatureTest.java index aab889f933..4ad000f2d1 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESWithEofSignatureTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PAdESWithEofSignatureTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PDFWithMultipleSignerInfoValidationTest.java b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PDFWithMultipleSignerInfoValidationTest.java index 27161d2d1a..e5954c32d0 100644 --- a/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PDFWithMultipleSignerInfoValidationTest.java +++ b/dss-pades/src/test/java/eu/europa/esig/dss/pades/validation/suite/PDFWithMultipleSignerInfoValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.pades.validation.suite; import eu.europa.esig.dss.diagnostic.DiagnosticData; diff --git a/dss-spi/src/main/java/eu/europa/esig/dss/spi/DSSASN1Utils.java b/dss-spi/src/main/java/eu/europa/esig/dss/spi/DSSASN1Utils.java index 601d9e78e2..ec417451b4 100644 --- a/dss-spi/src/main/java/eu/europa/esig/dss/spi/DSSASN1Utils.java +++ b/dss-spi/src/main/java/eu/europa/esig/dss/spi/DSSASN1Utils.java @@ -41,7 +41,6 @@ import org.bouncycastle.asn1.ASN1OutputStream; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; -import org.bouncycastle.asn1.ASN1Set; import org.bouncycastle.asn1.BERTags; import org.bouncycastle.asn1.DERBitString; import org.bouncycastle.asn1.DERIA5String; @@ -101,9 +100,6 @@ import java.util.List; import java.util.Map; -import static eu.europa.esig.dss.spi.OID.id_aa_ATSHashIndex; -import static eu.europa.esig.dss.spi.OID.id_aa_ATSHashIndexV2; -import static eu.europa.esig.dss.spi.OID.id_aa_ATSHashIndexV3; /** * Utility class that contains some ASN1 related method. diff --git a/dss-spi/src/main/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifier.java b/dss-spi/src/main/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifier.java index 11890bf4c9..a4b8f7130a 100644 --- a/dss-spi/src/main/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifier.java +++ b/dss-spi/src/main/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifier.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.spi.validation; import eu.europa.esig.dss.enumerations.Context; diff --git a/dss-spi/src/main/java/eu/europa/esig/dss/spi/x509/CommonTrustedCertificateSource.java b/dss-spi/src/main/java/eu/europa/esig/dss/spi/x509/CommonTrustedCertificateSource.java index 6ffd8dce42..6a38315a75 100644 --- a/dss-spi/src/main/java/eu/europa/esig/dss/spi/x509/CommonTrustedCertificateSource.java +++ b/dss-spi/src/main/java/eu/europa/esig/dss/spi/x509/CommonTrustedCertificateSource.java @@ -22,7 +22,6 @@ import eu.europa.esig.dss.enumerations.CertificateSourceType; import eu.europa.esig.dss.model.x509.CertificateToken; -import eu.europa.esig.dss.model.tsl.TrustProperties; import java.util.Collections; import java.util.List; diff --git a/dss-spi/src/test/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifierTest.java b/dss-spi/src/test/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifierTest.java index b12d4d1359..1a480684aa 100644 --- a/dss-spi/src/test/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifierTest.java +++ b/dss-spi/src/test/java/eu/europa/esig/dss/spi/validation/TrustAnchorVerifierTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.spi.validation; import eu.europa.esig.dss.enumerations.Context; diff --git a/dss-spi/src/test/java/eu/europa/esig/dss/spi/x509/revocation/ListRevocationSourceTest.java b/dss-spi/src/test/java/eu/europa/esig/dss/spi/x509/revocation/ListRevocationSourceTest.java index bc598ca426..a6ab9ff420 100644 --- a/dss-spi/src/test/java/eu/europa/esig/dss/spi/x509/revocation/ListRevocationSourceTest.java +++ b/dss-spi/src/test/java/eu/europa/esig/dss/spi/x509/revocation/ListRevocationSourceTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.spi.x509.revocation; import eu.europa.esig.dss.model.DSSDocument; diff --git a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicate.java b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicate.java index 4d6af9e322..4281f80a7e 100644 --- a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicate.java +++ b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicate.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.tsl.function; import eu.europa.esig.dss.model.tsl.TrustServiceStatusAndInformationExtensions; diff --git a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicate.java b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicate.java index 7dd6c4f958..574b39f1d0 100644 --- a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicate.java +++ b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicate.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.tsl.function; import eu.europa.esig.dss.model.tsl.TrustServiceStatusAndInformationExtensions; diff --git a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/TrustAnchorPeriodPredicate.java b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/TrustAnchorPeriodPredicate.java index f9ba626f1d..c54918b261 100644 --- a/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/TrustAnchorPeriodPredicate.java +++ b/dss-tsl-validation/src/main/java/eu/europa/esig/dss/tsl/function/TrustAnchorPeriodPredicate.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.tsl.function; import eu.europa.esig.dss.model.tsl.TrustServiceStatusAndInformationExtensions; diff --git a/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicateTest.java b/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicateTest.java index 3cf8353441..b4215c5b1b 100644 --- a/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicateTest.java +++ b/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedOrRecognizedAtNationalLevelTrustAnchorPeriodPredicateTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.tsl.function; import eu.europa.esig.dss.model.tsl.TrustServiceStatusAndInformationExtensions; diff --git a/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicateTest.java b/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicateTest.java index 65e2c88e37..f4e7683ae7 100644 --- a/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicateTest.java +++ b/dss-tsl-validation/src/test/java/eu/europa/esig/dss/tsl/function/GrantedTrustAnchorPeriodPredicateTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.tsl.function; import eu.europa.esig.dss.model.tsl.TrustServiceStatusAndInformationExtensions; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactory.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactory.java index 80fa6aeb8d..4b4c0cabcf 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactory.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactory.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation; import eu.europa.esig.dss.policy.ValidationPolicy; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheck.java index fc5b765720..c2346019d6 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateWithIdCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateWithIdCheck.java index 912e983fa4..eedfc34840 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateWithIdCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateWithIdCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheck.java index afe6749883..f8302b51b6 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlXCV; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/NoRevAvailCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/NoRevAvailCheck.java index 19d9628cf5..261336fc53 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/NoRevAvailCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/NoRevAvailCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.sub.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlSubXCV; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/OtherTrustAnchorExistsCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/OtherTrustAnchorExistsCheck.java index c905f085a3..776e8e0a4c 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/OtherTrustAnchorExistsCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/checks/OtherTrustAnchorExistsCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.sub.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/pcv/checks/SuccessfulValidationTimeSlidingFoundCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/pcv/checks/SuccessfulValidationTimeSlidingFoundCheck.java index 8db377fa46..024f6e4893 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/pcv/checks/SuccessfulValidationTimeSlidingFoundCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/pcv/checks/SuccessfulValidationTimeSlidingFoundCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.vpfswatsp.checks.pcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/ControlTimeCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/ControlTimeCheck.java index 815cc28aa0..c2cf7c14e3 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/ControlTimeCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/ControlTimeCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.vpfswatsp.checks.vts.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlVTS; diff --git a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/SunsetDateCheck.java b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/SunsetDateCheck.java index 20d80ef1f4..51c8843e07 100644 --- a/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/SunsetDateCheck.java +++ b/dss-validation/src/main/java/eu/europa/esig/dss/validation/process/vpfswatsp/checks/vts/checks/SunsetDateCheck.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.vpfswatsp.checks.vts.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactoryTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactoryTest.java index f3fd05daeb..44c5632cee 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactoryTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/TrustAnchorVerifierFactoryTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation; import eu.europa.esig.dss.enumerations.Context; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ASICValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ASICValidationExecutorTest.java index 0f937eee5a..104ad0d8d4 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ASICValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ASICValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateChainValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateChainValidationExecutorTest.java index 273c248f6d..7e55ed2577 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateChainValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateChainValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateOnHoldValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateOnHoldValidationExecutorTest.java index 2d47d5abf1..a9bc004c9e 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateOnHoldValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CertificateOnHoldValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CounterSignatureValidationTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CounterSignatureValidationTest.java index 6065f9fac8..6c8b89209a 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CounterSignatureValidationTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CounterSignatureValidationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CryptographicValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CryptographicValidationExecutorTest.java index 2f46c0337b..f51fe76cf2 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CryptographicValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/CryptographicValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1207ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1207ExecutorTest.java index 1e548d9520..f7822d4cbc 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1207ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1207ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1330ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1330ExecutorTest.java index 4390d9fbe0..af0acd19bb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1330ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1330ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1344ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1344ExecutorTest.java index 788207a6fa..2d7bcc030f 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1344ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1344ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1453ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1453ExecutorTest.java index b5f7e49368..866f2a2d72 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1453ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1453ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1469ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1469ExecutorTest.java index 8fba36835f..5a8c7cb23c 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1469ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1469ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1647ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1647ExecutorTest.java index 2216143c88..1497dcf205 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1647ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1647ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1670ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1670ExecutorTest.java index 85a5321f4f..d3ed6d61f4 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1670ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1670ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1686ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1686ExecutorTest.java index 8ee5f070c8..8b7d458eb5 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1686ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1686ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1768ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1768ExecutorTest.java index 380469489d..ed3f672079 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1768ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1768ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1988ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1988ExecutorTest.java index 15594625f0..467a491af6 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1988ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS1988ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2025ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2025ExecutorTest.java index 77edd1cca1..9192be829c 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2025ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2025ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2056ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2056ExecutorTest.java index c963748aeb..c9e3abf9c9 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2056ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2056ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2115ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2115ExecutorTest.java index 245ecf3eaf..8035ff58eb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2115ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2115ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2214ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2214ExecutorTest.java index e56edcead5..9f43b3ef43 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2214ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2214ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2338ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2338ExecutorTest.java index 21530ad56e..c943f84822 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2338ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2338ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2730ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2730ExecutorTest.java index e995e926be..7ffed992cd 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2730ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2730ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2805ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2805ExecutorTest.java index a069b5ab0d..3dfb35bc15 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2805ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2805ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2824ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2824ExecutorTest.java index 114b28f9a7..5578f3b4bf 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2824ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2824ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2913ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2913ExecutorTest.java index 2b5f3e6358..e36bba4f3c 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2913ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2913ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2972ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2972ExecutorTest.java index 1eae3339f6..0fca62f654 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2972ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS2972ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS3236ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS3236ExecutorTest.java index ac5020517f..3fb8a5b784 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS3236ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS3236ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS943ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS943ExecutorTest.java index 77cb137ef7..5453c19707 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS943ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS943ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS956ExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS956ExecutorTest.java index 3d0acd8a35..8d165b1f03 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS956ExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/DSS956ExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/EvidenceRecordValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/EvidenceRecordValidationExecutorTest.java index f641b66317..7a8a63fa73 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/EvidenceRecordValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/EvidenceRecordValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredCertsOnCRLValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredCertsOnCRLValidationExecutorTest.java index 7e4b8f5b5f..406702b703 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredCertsOnCRLValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredCertsOnCRLValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredSignatureExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredSignatureExecutorTest.java index 89b8d94650..b7dbe326ba 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredSignatureExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/ExpiredSignatureExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/HashFailureExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/HashFailureExecutorTest.java index df347b843f..2cdca78cfd 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/HashFailureExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/HashFailureExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/JAdESValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/JAdESValidationExecutorTest.java index 937ccc6fd9..fa48f80e13 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/JAdESValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/JAdESValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MRAProcessExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MRAProcessExecutorTest.java index 28206683f2..c3b7f8a3c1 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MRAProcessExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MRAProcessExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MultipleSignatureValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MultipleSignatureValidationExecutorTest.java index 7fa078be61..270f12b8f4 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MultipleSignatureValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/MultipleSignatureValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPNextUpdateValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPNextUpdateValidationExecutorTest.java index 3fd2adefed..356a17dccb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPNextUpdateValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPNextUpdateValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPResponderValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPResponderValidationExecutorTest.java index f0ba80bb20..fba7e6db60 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPResponderValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPResponderValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPSelfIssuedValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPSelfIssuedValidationExecutorTest.java index bf20e79c5d..b28a8d190b 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPSelfIssuedValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/OCSPSelfIssuedValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFAValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFAValidationExecutorTest.java index 3acb869318..231b64ed1a 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFAValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFAValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFValidationExecutorTest.java index 8e73ca2422..f1be32f483 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/PDFValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QcStatementsValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QcStatementsValidationExecutorTest.java index 55949622f3..b8ae10f8fa 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QcStatementsValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QcStatementsValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QualificationProcessExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QualificationProcessExecutorTest.java index bf90e2f992..985ce1306d 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QualificationProcessExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/QualificationProcessExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RFC5280ValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RFC5280ValidationExecutorTest.java index b7a715d549..64931a7e53 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RFC5280ValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RFC5280ValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationDataExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationDataExecutorTest.java index bbc84ad82f..b91056d9bb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationDataExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationDataExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationFreshnessExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationFreshnessExecutorTest.java index c3743310c6..f0749ff4a7 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationFreshnessExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationFreshnessExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationSkipExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationSkipExecutorTest.java index 2f87133b7c..d96042d5c1 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationSkipExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevocationSkipExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevokedCertificateValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevokedCertificateValidationExecutorTest.java index a6af2aedb9..8ede9c403c 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevokedCertificateValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/RevokedCertificateValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureConstraintsValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureConstraintsValidationExecutorTest.java index 5b74cff1fc..7800011ae0 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureConstraintsValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureConstraintsValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureNotIntactExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureNotIntactExecutorTest.java index 0fb5688d69..c44e58c288 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureNotIntactExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureNotIntactExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignaturePolicyStoreValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignaturePolicyStoreValidationExecutorTest.java index f10dfcfc39..cb3985fb61 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignaturePolicyStoreValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignaturePolicyStoreValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureWithERValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureWithERValidationExecutorTest.java index 3544905a4e..8e2535a1fb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureWithERValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignatureWithERValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignedDataNotFoundExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignedDataNotFoundExecutorTest.java index 2c50a5c12c..e87339a440 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignedDataNotFoundExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SignedDataNotFoundExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/StructureValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/StructureValidationExecutorTest.java index 46040f20b5..fea238ee56 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/StructureValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/StructureValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SubX509CertificateValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SubX509CertificateValidationExecutorTest.java index 58d5ca5f2d..b417e428d5 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SubX509CertificateValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SubX509CertificateValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.diagnostic.DiagnosticDataFacade; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SunsetExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SunsetExecutorTest.java index 979fc31685..55a89e15cf 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SunsetExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/SunsetExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TLValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TLValidationExecutorTest.java index 7940fcaa28..7505a02983 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TLValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TLValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TimestampValidationExecutorTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TimestampValidationExecutorTest.java index 7a92980e1a..afdeb404fb 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TimestampValidationExecutorTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/executor/process/TimestampValidationExecutorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.executor.process; import eu.europa.esig.dss.detailedreport.DetailedReport; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheckTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheckTest.java index a7f29bd6a2..7d35b7b69f 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheckTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/CertificateValidationBeforeSunsetDateCheckTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraint; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheckTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheckTest.java index de50113804..4c95ac0e83 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheckTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainAtValidationTimeCheckTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraint; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainCheckTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainCheckTest.java index 9d540850f7..b9023f7ab5 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainCheckTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/checks/ProspectiveCertificateChainCheckTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.checks; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraint; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/NoRevAvailCheckTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/NoRevAvailCheckTest.java index 89ced05410..e03e3e7474 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/NoRevAvailCheckTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/NoRevAvailCheckTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.sub; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraint; diff --git a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/OtherTrustAnchorExistsCheckTest.java b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/OtherTrustAnchorExistsCheckTest.java index 56f8eb8b43..ecfbfe820e 100644 --- a/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/OtherTrustAnchorExistsCheckTest.java +++ b/dss-validation/src/test/java/eu/europa/esig/dss/validation/process/bbb/xcv/sub/OtherTrustAnchorExistsCheckTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.validation.process.bbb.xcv.sub; import eu.europa.esig.dss.detailedreport.jaxb.XmlConstraint; diff --git a/dss-xades/src/main/java/eu/europa/esig/dss/xades/reference/XAdESReferenceValidation.java b/dss-xades/src/main/java/eu/europa/esig/dss/xades/reference/XAdESReferenceValidation.java index aacc605268..35e2cdc1a3 100644 --- a/dss-xades/src/main/java/eu/europa/esig/dss/xades/reference/XAdESReferenceValidation.java +++ b/dss-xades/src/main/java/eu/europa/esig/dss/xades/reference/XAdESReferenceValidation.java @@ -21,7 +21,6 @@ package eu.europa.esig.dss.xades.reference; import eu.europa.esig.dss.model.ReferenceValidation; -import eu.europa.esig.dss.utils.Utils; import eu.europa.esig.dss.xades.DSSXMLUtils; import eu.europa.esig.dss.xades.validation.TransformsDescriptionBuilder; import org.apache.xml.security.exceptions.XMLSecurityException; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationTest.java index 2fa814271a..318d9db2b9 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.diagnostic.CertificateWrapper; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationWithAltTrustAnchorTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationWithAltTrustAnchorTest.java index 639addf180..0623652152 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationWithAltTrustAnchorTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBCrossCertificationWithAltTrustAnchorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.diagnostic.CertificateWrapper; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBEnvelopedCustomObjectClearXmlTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBEnvelopedCustomObjectClearXmlTest.java index 9af986e5b3..21e762b318 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBEnvelopedCustomObjectClearXmlTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBEnvelopedCustomObjectClearXmlTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.enumerations.DigestAlgorithm; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesTest.java index 1364ecda28..0b82da3463 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.diagnostic.CertificateWrapper; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorProvidedTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorProvidedTest.java index b9d7cd4aec..3b6575a0a9 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorProvidedTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorProvidedTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.diagnostic.CertificateWrapper; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorTest.java index 9dacb1720f..b1fdf9d67c 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/signature/XAdESLevelBWithTrustServicesWrongTrustAnchorTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.signature; import eu.europa.esig.dss.diagnostic.CertificateWrapper; diff --git a/dss-xades/src/test/java/eu/europa/esig/dss/xades/validation/XAdESLTAWithTrustTimeTest.java b/dss-xades/src/test/java/eu/europa/esig/dss/xades/validation/XAdESLTAWithTrustTimeTest.java index 2539d934fc..4bf18234a6 100644 --- a/dss-xades/src/test/java/eu/europa/esig/dss/xades/validation/XAdESLTAWithTrustTimeTest.java +++ b/dss-xades/src/test/java/eu/europa/esig/dss/xades/validation/XAdESLTAWithTrustTimeTest.java @@ -1,3 +1,23 @@ +/** + * DSS - Digital Signature Services + * Copyright (C) 2015 European Commission, provided under the CEF programme + * + * This file is part of the "DSS - Digital Signature Services" project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ package eu.europa.esig.dss.xades.validation; import eu.europa.esig.dss.diagnostic.CertificateRefWrapper;