diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-05-24 11:32:49 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-05-24 11:32:49 +0000 |
commit | d61cc1b5da225196d32b3b0b38234c1ee27f0993 (patch) | |
tree | 7d59a793250dc6223d2e20036bf175f7b11ba947 /src/main/java/at/knowcenter/wag | |
parent | 854d90abee53ff57b7041b8bde3c64243354cf5c (diff) | |
download | pdf-as-3-d61cc1b5da225196d32b3b0b38234c1ee27f0993.tar.gz pdf-as-3-d61cc1b5da225196d32b3b0b38234c1ee27f0993.tar.bz2 pdf-as-3-d61cc1b5da225196d32b3b0b38234c1ee27f0993.zip |
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
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java | 10 |
1 files changed, 10 insertions, 0 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 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())
|