From d61cc1b5da225196d32b3b0b38234c1ee27f0993 Mon Sep 17 00:00:00 2001 From: tknall Date: Thu, 24 May 2007 11:32:49 +0000 Subject: NPE solved (PdfAS.java, in case of certificate is not found) git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@103 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 98a164d..5b516f2 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java @@ -821,6 +821,11 @@ public abstract class PdfAS { throw new SignatureException(312, "Document can not be verified because no signature object are set."); } + + // added by tknall + if (so_to_be_verified.getX509Cert() == null) { + throw new SignatureException(313, "Document certificate is not defined."); + } // FIXME this has to be made better SignatureData sd = null; @@ -878,6 +883,11 @@ public abstract class PdfAS throw new SignatureException(312, "Document can not be verified because no signature object are set."); } + // added by tknall + if (so_to_be_verified.getX509Cert() == null) { + throw new SignatureException(313, "Document certificate is not defined."); + } + // FIXME this has to be made better SignatureData sd = null; if (so_to_be_verified.isBinary()) -- cgit v1.2.3