From 5225b6852938c91940e0b491286583aa263f61d5 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 28 Nov 2013 12:33:02 +0100 Subject: Verification with MOA SP working through PAdES Verifier --- .../gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pdf-as-lib/src/main/java') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java index a7d4e80f..9a830097 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java @@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory; import at.gv.egiz.pdfas.common.exceptions.PdfAsException; import at.gv.egiz.pdfas.common.settings.ISettings; +import at.gv.egiz.pdfas.lib.api.Configuration; public class VerifierDispatcher { @@ -18,8 +19,9 @@ public class VerifierDispatcher { .getLogger(VerifierDispatcher.class); public static final String[] currentClasses = new String[] { - "at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedVerifier"/*, - "at.gv.egiz.pdfas.sigs.pades.PAdESVerifier"*/ }; + "at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedVerifier", + // Uncomment to verify via MOA conncetor + "at.gv.egiz.pdfas.sigs.pades.PAdESVerifier" }; public Map> filterMap = new HashMap>(); @@ -30,8 +32,9 @@ public class VerifierDispatcher { String clsName = currentClasses[i]; Class cls = (Class) Class .forName(clsName); - IVerifyFilter fitler = cls.newInstance(); - List entries = fitler.getFiters(); + IVerifyFilter filter = cls.newInstance(); + filter.setConfiguration((Configuration)settings); + List entries = filter.getFiters(); Iterator it = entries.iterator(); while (it.hasNext()) { FilterEntry entry = it.next(); @@ -49,7 +52,7 @@ public class VerifierDispatcher { throw new PdfAsException("Filter allready registered"); } - filters.put(entry.getSubFilter().getName(), fitler); + filters.put(entry.getSubFilter().getName(), filter); logger.debug("Registered Filter: " + cls.getName() + " for " + entry.getFilter().getName() + "/" + entry.getSubFilter().getName()); -- cgit v1.2.3