aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-11-28 12:33:02 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-11-28 12:33:02 +0100
commit5225b6852938c91940e0b491286583aa263f61d5 (patch)
tree78d236438c222046cedde0351dbb063c0d0740d2 /pdf-as-lib/src/main/java
parent7fdb06e32c43e99ec3599639348a3d758b9914a7 (diff)
downloadpdf-as-4-5225b6852938c91940e0b491286583aa263f61d5.tar.gz
pdf-as-4-5225b6852938c91940e0b491286583aa263f61d5.tar.bz2
pdf-as-4-5225b6852938c91940e0b491286583aa263f61d5.zip
Verification with MOA SP working through PAdES Verifier
Diffstat (limited to 'pdf-as-lib/src/main/java')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java13
1 files changed, 8 insertions, 5 deletions
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<String, HashMap<String, IVerifyFilter>> filterMap = new HashMap<String, HashMap<String, IVerifyFilter>>();
@@ -30,8 +32,9 @@ public class VerifierDispatcher {
String clsName = currentClasses[i];
Class<? extends IVerifyFilter> cls = (Class<? extends IVerifyFilter>) Class
.forName(clsName);
- IVerifyFilter fitler = cls.newInstance();
- List<FilterEntry> entries = fitler.getFiters();
+ IVerifyFilter filter = cls.newInstance();
+ filter.setConfiguration((Configuration)settings);
+ List<FilterEntry> entries = filter.getFiters();
Iterator<FilterEntry> 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());