From 12d11aa8f47dbfc8403d5527fe821462523aa0ac Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 24 Aug 2012 17:05:40 +0000 Subject: Mobile BKU first working (currently set to work with test mobile BKU from A-Trust git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12396 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'trunk/pdf-over-signer') diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java index a2f34e9a..43179367 100644 --- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java +++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java @@ -1,5 +1,6 @@ package at.asit.pdfover.signer.pdfas; +import at.asit.pdfover.signator.BKUs; import at.asit.pdfover.signator.ByteArrayDocumentSource; import at.asit.pdfover.signator.SLResponse; import at.asit.pdfover.signator.SignatureException; @@ -58,7 +59,14 @@ public class PDFASSigner implements Signer { SignParameters params = new SignParameters(); params.setSignaturePositioning(sign_para.getPDFASPositioning()); - params.setSignatureDevice(Constants.SIGNATURE_DEVICE_BKU); + + if(parameter.getSignatureDevice() == BKUs.LOCAL) { + params.setSignatureDevice(Constants.SIGNATURE_DEVICE_BKU); + } else if(parameter.getSignatureDevice() == BKUs.MOBILE) { + // TODO: change to MOBILE!! + params.setSignatureDevice(Constants.SIGNATURE_DEVICE_MOBILE); + //params.setSignatureDevice(Constants.SIGNATURE_DEVICE_MOBILETEST); + } params.setSignatureType(Constants.SIGNATURE_TYPE_BINARY); params.setSignatureProfileId(PROFILE_ID); -- cgit v1.2.3