From 6d3b9d99b0e708d2516caf0f098c58c8a9585114 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:54:34 +0000 Subject: Mobile BKU first working (currently set to work with test mobile BKU from A-Trust git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@31 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pdf-over-signer/pdf-over-sigpdfas/src/main') diff --git a/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java b/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java index a2f34e9a..43179367 100644 --- a/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java +++ b/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