From 6cf0d1b90a0e5a686344ed66d50c2b2ad93d6679 Mon Sep 17 00:00:00 2001 From: tknall Date: Tue, 14 Dec 2010 13:57:02 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@708 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/demo/SignatureVerificationDemo.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3