From 1dbfafa09ae53ea404875fdbc7683e60945b260c Mon Sep 17 00:00:00 2001 From: ferbas Date: Fri, 13 Nov 2009 12:40:44 +0000 Subject: added timestamp support git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@394 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java b/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java index f161b3a..fd899fe 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/api/verify/VerifyResultAdapter.java @@ -15,6 +15,7 @@ import at.gv.egiz.pdfas.api.verify.SignatureCheck; import at.gv.egiz.pdfas.api.verify.VerifyResult; import at.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter; import at.knowcenter.wag.egov.egiz.exceptions.SettingNotFoundException; +import at.knowcenter.wag.egov.egiz.pdf.BinarySignatureHolder; import at.knowcenter.wag.egov.egiz.pdf.SignatureHolder; import at.knowcenter.wag.egov.egiz.sig.SignatureResponse; @@ -35,6 +36,8 @@ public class VerifyResultAdapter extends SignatureInformationAdapter implements protected Date vTime = null; + private String timestamp; + /** * Constructor. * @@ -50,6 +53,9 @@ public class VerifyResultAdapter extends SignatureInformationAdapter implements super(sh); this.sigRes = sigRes; this.vTime = verificationTime; + if (sh instanceof BinarySignatureHolder) { + this.timestamp = ((BinarySignatureHolder)sh).getSignatureObject().getTimeStamp(); + } // [tknall] start: missing time of verification fixed if (this.vTime == null) { // verification time not been set (= null) therefore signingtime equals verificationtime @@ -153,5 +159,9 @@ public class VerifyResultAdapter extends SignatureInformationAdapter implements public boolean isPublicAuthority() { return this.sigRes.isPublicAuthority(); } + + public String getTimestampValue() { + return this.timestamp; + } } -- cgit v1.2.3