From fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 30 Oct 2014 17:15:54 +0100 Subject: Introduced Process Information Map in PDFASError and SignResult --- pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pdf-as-moa/src/main/java/at/gv') diff --git a/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java b/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java index 4035daac..c3e417d2 100644 --- a/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java +++ b/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java @@ -49,6 +49,7 @@ import at.gv.e_government.reference.namespace.moa._20020822.MetaInfoType; import at.gv.e_government.reference.namespace.moa._20020822_.MOAFault; import at.gv.e_government.reference.namespace.moa._20020822_.SignatureCreationPortType; import at.gv.e_government.reference.namespace.moa._20020822_.SignatureCreationService; +import at.gv.egiz.pdfas.common.exceptions.ErrorConstants; import at.gv.egiz.pdfas.common.exceptions.PDFASError; import at.gv.egiz.pdfas.common.exceptions.PdfAsErrorCarrier; import at.gv.egiz.pdfas.common.exceptions.PdfAsException; @@ -71,6 +72,8 @@ public class MOAConnector implements ISignatureConnector, private static final Logger logger = LoggerFactory .getLogger(MOAConnector.class); + public static final String SIGNATURE_DEVICE = "MOA"; + private X509Certificate certificate; private String moaEndpoint; private String keyIdentifier; @@ -195,6 +198,12 @@ public class MOAConnector implements ISignatureConnector, sigInfo.setDataObjectInfo(dataObjectInfo); request.getSingleSignatureInfo().add(sigInfo); + requestedSignature.getStatus().getMetaInformations() + .put(ErrorConstants.STATUS_INFO_SIGDEVICE, SIGNATURE_DEVICE); + // TODO: Find a way to get MOA-SPSS Version + requestedSignature.getStatus().getMetaInformations() + .put(ErrorConstants.STATUS_INFO_SIGDEVICEVERSION, "UNKNOWN"); + CreateCMSSignatureResponseType response; try { response = creationPort.createCMSSignature(request); -- cgit v1.2.3