From 290256144963c33c55fc5fa99cb5c9a75a7b1f9d Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 4 Nov 2016 10:42:01 +0100 Subject: Fixed web verification for multiple signatures --- .../src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pdf-as-web/src/main/java/at') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java index 7b0bfaed..f850c5ae 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java @@ -118,11 +118,11 @@ public class PDFASSigningImpl implements PDFASSigning { SignatureVerificationLevel.FULL_VERIFICATION, preProcessor); - if (verResults.size() != 1) { + if (verResults.size() < 1) { throw new WebServiceException( - "Document verification failed!"); + "Document verification failed! " + verResults.size()); } - verifyResult = verResults.get(0); + verifyResult = verResults.get(verResults.size() - 1); } else { List verResults = PdfAsHelper .synchornousVerify( @@ -133,7 +133,7 @@ public class PDFASSigningImpl implements PDFASSigning { if (verResults.size() < 1) { throw new WebServiceException( - "Document verification failed!"); + "Document verification failed! " + verResults.size()); } verifyResult = verResults.get(verResults.size() - 1); } -- cgit v1.2.3