From 48216bdf6d0e6b8e34d53fe196c4a6a7ec868b93 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 27 Nov 2013 17:52:36 +0100 Subject: Current working stuff not working --- .../main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pdf-as-cli') 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 ed029aac..3c4cc223 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 @@ -29,8 +29,8 @@ public class DeveloperMain { public static final String keyStoreFile = "/home/afitzek/devel/pdfas_neu/test.p12"; public static final String keyStoreType = "PKCS12"; public static final String keyStorePass = "123456"; - //public static final String keyAlias = "pdf"; - public static final String keyAlias = "ecc_test"; + public static final String keyAlias = "pdf"; + //public static final String keyAlias = "ecc_test"; public static final String keyPass = "123456"; public static void main(String[] args) { @@ -44,13 +44,13 @@ public class DeveloperMain { data = StreamUtils.inputStreamToByteArray(new FileInputStream("/home/afitzek/qr_2.pdf")); SignParameter parameter = PdfAsFactory.createSignParameter(config, new ByteArrayDataSource(data)); ByteArrayDataSink bads = new ByteArrayDataSink(); - parameter.setSignatureProfileId("SIGNATURBLOCK_DE_PDFA"); + parameter.setSignatureProfileId("SIGNATURBLOCK_DE"); parameter.setOutput(bads); - //parameter.setPlainSigner(new PAdESSigner(new BKUSLConnector(config))); - parameter.setPlainSigner(signer); + parameter.setPlainSigner(new PAdESSigner(new BKUSLConnector(config))); + //parameter.setPlainSigner(signer); //parameter.setPlainSigner(new PAdESSigner(new MOAConnector(config))); - - /*StatusRequest request = pdfas.startSign(parameter); + /* + StatusRequest request = pdfas.startSign(parameter); if(request.needCertificate()) { request.setCertificate(signer.getCertificate().getEncoded()); @@ -82,8 +82,8 @@ public class DeveloperMain { fos.write(bads.getData()); fos.close(); - //VerifyParameter verify = new VerifyParameterImpl(config, new ByteArrayDataSource(bads.getData())); - //pdfas.verify(verify); + VerifyParameter verify = new VerifyParameterImpl(config, new ByteArrayDataSource(bads.getData())); + pdfas.verify(verify); } catch (FileNotFoundException e1) { // TODO Auto-generated catch block -- cgit v1.2.3