aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2018-09-03 16:19:18 +0200
committeremusic <emina.music@egiz.gv.at>2018-09-03 16:19:18 +0200
commit3a1eaed4175bb1ec5b2dc2d2d13e125af997f286 (patch)
tree3068e610063e7348486a2ab82cf61f7bbe09c094
parente82984cb37027349aa009d0809a706f2f3ec7bf9 (diff)
downloadpdf-as-4-3a1eaed4175bb1ec5b2dc2d2d13e125af997f286.tar.gz
pdf-as-4-3a1eaed4175bb1ec5b2dc2d2d13e125af997f286.tar.bz2
pdf-as-4-3a1eaed4175bb1ec5b2dc2d2d13e125af997f286.zip
delete unused statements
-rw-r--r--pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java25
-rw-r--r--pdf-as-lib/src/main/resources/config/config.zipbin1276569 -> 1276569 bytes
2 files changed, 0 insertions, 25 deletions
diff --git a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
index 4aceb329..a5dff854 100644
--- a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
+++ b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
@@ -26,8 +26,6 @@ package at.gv.egiz.pdfas.cli;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.nio.charset.StandardCharsets;
-import java.security.SecureRandom;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
@@ -43,9 +41,6 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
-import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
@@ -62,7 +57,6 @@ import at.gv.egiz.pdfas.sigs.pades.PAdESSigner;
import at.gv.egiz.pdfas.sigs.pades.PAdESSignerKeystore;
import at.gv.egiz.sl.util.BKUSLConnector;
-import static at.gv.egiz.pdfas.lib.api.IConfigurationConstants.DEFAULT_CONFIG_PROTECT_PDF;
public class Main {
@@ -455,25 +449,6 @@ public class Main {
fos.close();
System.out.println("Signed document " + outputFile);
- //make output file protected from copying and extraction content
-
- /*if(configuration.hasValue(DEFAULT_CONFIG_PROTECT_PDF) && IConfigurationConstants.TRUE.equalsIgnoreCase(configuration.getValue(DEFAULT_CONFIG_PROTECT_PDF)))
- {
- SecureRandom random = new SecureRandom();
- byte seed[] = random.generateSeed(50);
- String ownerPassword = new String(seed, StandardCharsets.UTF_8);
- PDDocument document = PDDocument.load(outputPdfFile);
- AccessPermission accessPermission = new AccessPermission();
- accessPermission.setCanExtractContent(false);
- accessPermission.setCanExtractForAccessibility(true);
- StandardProtectionPolicy spp = new StandardProtectionPolicy(ownerPassword,"",accessPermission);
- spp.setEncryptionKeyLength(128);
- spp.setPermissions(accessPermission);
- document.protect(spp);
- document.save(outputPdfFile);
- document.close();
- logger.info("Added Protection Parameters");
- }*/
}
private static void perform_verify(CommandLine cli) throws Exception {
diff --git a/pdf-as-lib/src/main/resources/config/config.zip b/pdf-as-lib/src/main/resources/config/config.zip
index 0b61bfdd..17fe5c6b 100644
--- a/pdf-as-lib/src/main/resources/config/config.zip
+++ b/pdf-as-lib/src/main/resources/config/config.zip
Binary files differ