aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java9
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/TextualSignator_1_0_0.java4
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java1
4 files changed, 13 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
index 5b516f2..e4107eb 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -822,7 +822,7 @@ public abstract class PdfAS
throw new SignatureException(312, "Document can not be verified because no signature object are set.");
}
- // added by tknall
+ // fixed by tknall
if (so_to_be_verified.getX509Cert() == null) {
throw new SignatureException(313, "Document certificate is not defined.");
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
index be375ec..95a738c 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
@@ -102,6 +102,11 @@ public class VerificationFilter
*/
public List extractSignaturesFromPdf(final byte[] pdf) throws PresentableException
{
+ return extractSignaturesFromPdf(pdf, false);
+ }
+
+ public List extractSignaturesFromPdf(final byte[] pdf, boolean ignorePostSignModificationsRestriction) throws PresentableException
+ {
// tzefferer: get allow_post_sign_modifications property from property file
SettingsReader settings = SettingsReader.getInstance();
@@ -219,9 +224,9 @@ public class VerificationFilter
}
// tzefferer: check if illegal modifications have been performed on the document after performing a signation
- if(allow_post_sign_mods.equals("false"))
+ if (!("true".equalsIgnoreCase(allow_post_sign_mods)) && !ignorePostSignModificationsRestriction)
{
- if((signature_block_detected == true) && (current_block_contains_signature == false))
+ if (signature_block_detected && !current_block_contains_signature)
{
throw new PDFDocumentException(316, "Das Dokument wurde nach erfolgter Signierung verändert.");
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/TextualSignator_1_0_0.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/TextualSignator_1_0_0.java
index 0af80d9..f250b0d 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/TextualSignator_1_0_0.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/TextualSignator_1_0_0.java
@@ -120,6 +120,10 @@ public class TextualSignator_1_0_0 implements Signator
so.setSignationValue(iui.signed_signature_object.getSignatureValue());
so.setSignationIDs(iui.signed_signature_object.getSigID());
so.setKZ(getMyId());
+
+ // fixed by tknall
+ so.setSignationName(iui.signed_signature_object.getName());
+
PdfPTable pdf_table = PdfAS.createPdfPTableFromSignatureObject(so);
PositioningInstruction pi = PdfAS.determineTablePositioning(iui.pos, iui.signature_type, iui.original_document, pdf_table);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java
index b95f61b..62944e4 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java
@@ -482,6 +482,7 @@ public class SignatureObject implements Serializable
*/
private String getSigCaption(String key)
{
+
String caption = null;
if (sigEntries_.containsKey(key))
{