aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-14 13:57:02 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-14 13:57:02 +0000
commit6cf0d1b90a0e5a686344ed66d50c2b2ad93d6679 (patch)
treef45d098f6864b04476022df6813e69099bd0b4ea
parent86d58bef746c914139f7189f2b4dfe5f77b45fb5 (diff)
downloadpdf-as-3-6cf0d1b90a0e5a686344ed66d50c2b2ad93d6679.tar.gz
pdf-as-3-6cf0d1b90a0e5a686344ed66d50c2b2ad93d6679.tar.bz2
pdf-as-3-6cf0d1b90a0e5a686344ed66d50c2b2ad93d6679.zip
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@708 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--src/main/java/demo/SignatureVerificationDemo.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/demo/SignatureVerificationDemo.java b/src/main/java/demo/SignatureVerificationDemo.java
index f7b8d53..5e172b4 100644
--- a/src/main/java/demo/SignatureVerificationDemo.java
+++ b/src/main/java/demo/SignatureVerificationDemo.java
@@ -199,16 +199,21 @@ public class SignatureVerificationDemo {
out.println("\n --- XMLDSIG start ---");
out.println(" " + xmlDSigData.getXmlDsig());
out.println(" --- XMLDSIG end ---");
+ // fetch data
+ // either use result.getHashInputData() (provided varp.setReturnHashInputData(...) has been set true
+ // or use
+ byte[] data = result.getSignedData().getAsByteArray();
+ out.println("\n Signed Data: " + data.length + " bytes (" + result.getSignatureType() + ")");
}
// check if there are timestamps
if (result.getTimeStampValue() != null) {
- out.println("\nTimeStamp value available for this signature");
+ out.println("\n TimeStamp value available for this signature");
}
// check if non textual elements have been detected for this signature
if (result.hasNonTextualObjects()) {
- out.println("\nWARNING: " + result.getNonTextualObjects().size() + " non textual object(s) detected for this signature");
+ out.println("\n WARNING: " + result.getNonTextualObjects().size() + " non textual object(s) detected for this signature");
Iterator noit = result.getNonTextualObjects().iterator();
while (noit.hasNext()) {
NonTextObjectInfo info = (NonTextObjectInfo) noit.next();
@@ -217,7 +222,7 @@ public class SignatureVerificationDemo {
out.println();
} else {
- out.println("\nNo non-textual objects detected for this signature.");
+ out.println("\n No non-textual objects detected for this signature.");
}
}
out.flush();