aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-24 16:19:16 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-24 16:19:16 +0000
commit669e2b7db13e42315b6b638cbbe2f03ef9ed0fa5 (patch)
tree761abe81b397fe6d54a89157331c7586538e6da4 /src/main/java/at/knowcenter/wag/egov
parentd61cc1b5da225196d32b3b0b38234c1ee27f0993 (diff)
downloadpdf-as-3-669e2b7db13e42315b6b638cbbe2f03ef9ed0fa5.tar.gz
pdf-as-3-669e2b7db13e42315b6b638cbbe2f03ef9ed0fa5.tar.bz2
pdf-as-3-669e2b7db13e42315b6b638cbbe2f03ef9ed0fa5.zip
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@104 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-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))
{