aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2019-06-19 13:26:59 +0200
committeremusic <emina.music@egiz.gv.at>2019-06-19 13:26:59 +0200
commit266af04f55476f568377b413f02257a43fae791b (patch)
treeb9ac0fe54974895d1af4c5d2e815666231c58e2b
parent516334bd777b1e3dcc2f060f12dd7a78be79b0bf (diff)
downloadpdf-as-4-266af04f55476f568377b413f02257a43fae791b.tar.gz
pdf-as-4-266af04f55476f568377b413f02257a43fae791b.tar.bz2
pdf-as-4-266af04f55476f568377b413f02257a43fae791b.zip
pdf-as documentation changes, qr placeholder search on profile level enabled
-rw-r--r--.idea/libraries/Gradle__org_apache_commons_commons_collections4_4_2.xml11
-rw-r--r--doc/PDFAS4_Dokumentation.docxbin124326 -> 124774 bytes
-rwxr-xr-xdoc/PDFAS4_Dokumentation.pdfbin543664 -> 550516 bytes
-rw-r--r--pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java12
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java9
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java10
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java2
-rw-r--r--pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/configuration/ProfileValidator.java3
-rw-r--r--pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java4
-rw-r--r--pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java1
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/sl20/JsonSecurityUtils.java2
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java2
12 files changed, 12 insertions, 44 deletions
diff --git a/.idea/libraries/Gradle__org_apache_commons_commons_collections4_4_2.xml b/.idea/libraries/Gradle__org_apache_commons_commons_collections4_4_2.xml
deleted file mode 100644
index 1351c542..00000000
--- a/.idea/libraries/Gradle__org_apache_commons_commons_collections4_4_2.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
- <library name="Gradle: org.apache.commons:commons-collections4:4.2">
- <CLASSES>
- <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-collections4/4.2/54ebea0a5b653d3c680131e73fe807bb8f78c4ed/commons-collections4-4.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-collections4/4.2/e8dd003d43b1f7dba173fb7e63f5c0b823f5e5c6/commons-collections4-4.2-sources.jar!/" />
- </SOURCES>
- </library>
-</component> \ No newline at end of file
diff --git a/doc/PDFAS4_Dokumentation.docx b/doc/PDFAS4_Dokumentation.docx
index 5a1eb872..dd058bb3 100644
--- a/doc/PDFAS4_Dokumentation.docx
+++ b/doc/PDFAS4_Dokumentation.docx
Binary files differ
diff --git a/doc/PDFAS4_Dokumentation.pdf b/doc/PDFAS4_Dokumentation.pdf
index 510102d3..2514129d 100755
--- a/doc/PDFAS4_Dokumentation.pdf
+++ b/doc/PDFAS4_Dokumentation.pdf
Binary files differ
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 f384a140..32f18867 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
@@ -60,18 +60,6 @@ import at.gv.egiz.pdfas.moa.MOAConnector;
import at.gv.egiz.pdfas.sigs.pades.PAdESSigner;
import at.gv.egiz.pdfas.sigs.pades.PAdESSignerKeystore;
import at.gv.egiz.sl.util.BKUSLConnector;
-import org.apache.commons.cli.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.activation.DataSource;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.UUID;
public class Main {
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
index b0b45464..7a67160a 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
@@ -28,6 +28,8 @@ import at.gv.egiz.pdfas.lib.api.IConfigurationConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Map;
+
public class PlaceholderConfiguration extends SpecificBaseConfiguration
implements IConfigurationConstants {
@@ -57,8 +59,9 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration
{
logger.info("SelectedProfileID in ProfileConfEnabled: "+selectedProfileID);
String profileMatch = SIG_OBJECT+SEPERATOR+selectedProfileID+SEPERATOR+PLACEHOLDER_SEARCH_ENABLED;
- if (configuration.hasValue(profileMatch)) {
- String value = configuration.getValue(profileMatch);
+ if (configuration.getValuesPrefix(profileMatch)!=null) {
+ Map<String, String> map = configuration.getValuesPrefix(profileMatch);
+ String value = map.get(profileMatch);
if (value.equalsIgnoreCase(TRUE)) {
logger.info("Configuration has Value: "+value);
return true;
@@ -68,5 +71,3 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration
}
}
-
-
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
index 455077a8..f511525d 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
@@ -70,14 +70,13 @@ public class PlaceholderFilter implements IConfigurationConstants,
.extract(status.getPdfObject(), placeholderID, placeholderMode);
return signaturePlaceholderData;
- } else
+ } else if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) {
//filter for local placeholder in selected profiles
- if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) {
- PlaceholderExtractor extractor = status.getBackend()
+ PlaceholderExtractor extractor = status.getBackend()
.getPlaceholderExtractor();
String placeholderID = settings.getValue(PLACEHOLDER_ID);
String placeholderModeString = settings.getValue(PLACEHOLDER_MODE);
- int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE;
+ int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED;
if (placeholderModeString != null) {
try {
placeholderMode = Integer.parseInt(placeholderModeString);
@@ -96,9 +95,6 @@ public class PlaceholderFilter implements IConfigurationConstants,
.extract(status.getPdfObject(), placeholderID, placeholderMode);
return signaturePlaceholderData;
-
-
-
}
return null;
}} \ No newline at end of file
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java
index b851af88..01a3a298 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java
@@ -115,10 +115,12 @@ public class TableFactory implements IProfileConstants {
// ".value.";
// ArrayList table_def_keys = settings_.getKeys(table_key);
Vector<String> table_defs = configuration.getFirstLevelKeys(table_key);
+
if (table_defs == null)
{
return null;
}
+
Table sig_table = new Table(tableID);
//SignatureProfileSettings profile = createProfile(profileID);
boolean found_style = false;
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/configuration/ProfileValidator.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/configuration/ProfileValidator.java
index 8d02d1b3..fc21755f 100644
--- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/configuration/ProfileValidator.java
+++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/configuration/ProfileValidator.java
@@ -102,8 +102,7 @@ public class ProfileValidator implements ConfigurationValidator{
} catch (Exception e) {
logger.info("Configuration Validation for profile "+id+" failed!");
throw new PdfAsSettingsValidationException("Configuration Validation for profile "+id+" failed!", e);
- }
-
+ }
}
}
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
index 3cb103a7..326ba74f 100644
--- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
+++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
@@ -67,7 +67,6 @@ import org.apache.pdfbox.pdmodel.common.PDNumberTreeNode;
import org.apache.pdfbox.pdmodel.common.PDRectangle;
import org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDStructureElement;
import org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDStructureTreeRoot;
-import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
import org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory;
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
@@ -96,7 +95,6 @@ import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
@@ -594,8 +592,6 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
byte[] outputDocument = bos.toByteArray();
doc.save(bos);
pdfObject.setSignedDocument(outputDocument);
-
-
}
/*
Check if resulting pdf is PDF-A conform
diff --git a/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java
index e65cf98a..c4a55521 100644
--- a/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java
+++ b/pdf-as-web-client/src/main/java/at/gv/egiz/pdfas/web/client/RemotePDFSigner.java
@@ -39,7 +39,6 @@ import at.gv.egiz.pdfas.api.ws.PDFASSigning;
public class RemotePDFSigner implements PDFASSigning {
private Service service;
-
private PDFASSigning proxy;
public RemotePDFSigner(URL endpoint, boolean useMTOM) {
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/sl20/JsonSecurityUtils.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/sl20/JsonSecurityUtils.java
index 141808de..4f496a75 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/sl20/JsonSecurityUtils.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/sl20/JsonSecurityUtils.java
@@ -13,8 +13,6 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
-import javax.annotation.PostConstruct;
-
import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.util.encoders.Base64Encoder;
import org.jose4j.jwa.AlgorithmConstraints;
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
index 68d54cde..6332153f 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
@@ -51,7 +51,7 @@ public class PAdESVerifier implements IVerifyFilter, PAdESConstants {
public List<VerifyResult> verify(byte[] contentData,
byte[] signatureContent, Date verificationTime, int[] byteRange, IVerifier verifier)
throws PdfAsException {
-
+
byte[] data = contentData;
byte[] signature = signatureContent;