diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-12 11:53:30 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-12 11:53:30 +0100 |
commit | 2b38db4f888c15f283a22acbdc75ac90d01f3141 (patch) | |
tree | 225193ecd4679cef08627c8c75fc7d3063edca27 /pdf-as-cli/src/main/java | |
parent | 19120ef86f2f90e63c63b5ec87e63c95d0d8efe7 (diff) | |
download | pdf-as-4-2b38db4f888c15f283a22acbdc75ac90d01f3141.tar.gz pdf-as-4-2b38db4f888c15f283a22acbdc75ac90d01f3141.tar.bz2 pdf-as-4-2b38db4f888c15f283a22acbdc75ac90d01f3141.zip |
Update developer main
Diffstat (limited to 'pdf-as-cli/src/main/java')
-rw-r--r-- | pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/DeveloperMain.java | 12 |
1 files changed, 6 insertions, 6 deletions
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 d466e6bd..808d0b80 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 @@ -35,20 +35,20 @@ public class DeveloperMain { public static void main(String[] args) { String user_home = System.getProperty("user.home"); - String pdfas_dir = user_home + File.separator + "PDF-AS"; + String pdfas_dir = user_home + File.separator + ".pdfas"; PdfAs pdfas = PdfAsFactory.createPdfAs(new File(pdfas_dir)); Configuration config = pdfas.getConfiguration(); byte[] data; try { IPlainSigner signer = new PKCS7DetachedSigner(keyStoreFile, keyAlias, keyStorePass, keyPass, keyStoreType); - data = StreamUtils.inputStreamToByteArray(new FileInputStream("/home/afitzek/qr_2.pdf")); + data = StreamUtils.inputStreamToByteArray(new FileInputStream("/home/afitzek/simple.pdf")); SignParameter parameter = PdfAsFactory.createSignParameter(config, new ByteArrayDataSource(data)); ByteArrayDataSink bads = new ByteArrayDataSink(); - parameter.setSignatureProfileId("SIGNATURBLOCK_DE"); + parameter.setSignatureProfileId("AMTSSIGNATURBLOCK_DE"); parameter.setOutput(bads); //parameter.setPlainSigner(new PAdESSigner(new BKUSLConnector(config))); - //parameter.setPlainSigner(signer); - parameter.setPlainSigner(new PAdESSigner(new MOAConnector(config))); + parameter.setPlainSigner(signer); + //parameter.setPlainSigner(new PAdESSigner(new MOAConnector(config))); /* StatusRequest request = pdfas.startSign(parameter); @@ -78,7 +78,7 @@ public class DeveloperMain { } */ pdfas.sign(parameter); - FileOutputStream fos = new FileOutputStream("/home/afitzek/qr_2_neu.pdf"); + FileOutputStream fos = new FileOutputStream("/home/afitzek/simple_signed.pdf"); fos.write(bads.getData()); fos.close(); |