From f3476576c50efd922593c82656efda7aec5ae97f Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 27 Nov 2013 10:05:17 +0100 Subject: MOA integration sign/verification (not finished yet ...) Lots of PDF-AS Web implementation --- pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pdf-as-cli/src/main/java/at/gv') diff --git a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java index b30e1be2..4072e496 100644 --- a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java +++ b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java @@ -22,6 +22,7 @@ import at.gv.egiz.pdfas.lib.impl.signing.pdfbox.PADESPDFBOXSigner; import at.gv.egiz.pdfas.sigs.pades.PAdESSigner; import at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedSigner; import at.gv.egiz.sl.util.BKUSLConnector; +import at.gv.egiz.sl.util.MOAConnector; public class DeveloperMain { @@ -40,12 +41,14 @@ public class DeveloperMain { byte[] data; try { IPlainSigner signer = new PKCS7DetachedSigner(keyStoreFile, keyAlias, keyStorePass, keyPass, keyStoreType); - data = StreamUtils.inputStreamToByteArray(new FileInputStream("/home/afitzek/devel/pdfas_neu/simple_out2.pdf")); + data = StreamUtils.inputStreamToByteArray(new FileInputStream("/home/afitzek/tmp/pdf-a problem/TestGhostscriptPdfA.pdf")); SignParameter parameter = PdfAsFactory.createSignParameter(config, new ByteArrayDataSource(data)); ByteArrayDataSink bads = new ByteArrayDataSink(); - parameter.setSignatureProfileId("SIGNATURBLOCK_DE_NEU"); + parameter.setSignatureProfileId("SIGNATURBLOCK_DE_PDFA"); parameter.setOutput(bads); - parameter.setPlainSigner(new PAdESSigner(new BKUSLConnector(config))); + //parameter.setPlainSigner(new PAdESSigner(new BKUSLConnector(config))); + //parameter.setPlainSigner(signer); + parameter.setPlainSigner(new PAdESSigner(new MOAConnector(config))); /* StatusRequest request = pdfas.startSign(parameter); -- cgit v1.2.3