From c0f97e7b1ad5b6256eb935aeab06d159d68d1966 Mon Sep 17 00:00:00 2001 From: Alexander Marsalek Date: Mon, 12 Apr 2021 15:58:14 +0200 Subject: pdf-as-web signature block parameter handling --- pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java | 3 ++- .../lib/impl/stamping/CertificateAndRequestParameterResolver.java | 3 ++- .../java/at/gv/egiz/pdfas/lib/impl/status/OperationStatus.java | 8 ++++---- .../src/main/java/at/gv/egiz/pdfas/lib/impl/status/PDFObject.java | 6 ++++-- 4 files changed, 12 insertions(+), 8 deletions(-) (limited to 'pdf-as-lib/src') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java index 55891bb2..b1165f59 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java @@ -148,7 +148,8 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants, PDFObject pdfObject = signer.buildPDFObject(status); //TODO verify map??? - pdfObject.getStatus().getRequestParameters().putAll(status.getSignParamter().getDynamicSignatureBlockArguments()); + +// pdfObject.getStatus().getRequestParameters().putAll(status.getSignParamter().getDynamicSignatureBlockArguments()); status.setPdfObject(pdfObject); // set Original PDF Document Data diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateAndRequestParameterResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateAndRequestParameterResolver.java index 3fe8298b..bd7bb3a8 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateAndRequestParameterResolver.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateAndRequestParameterResolver.java @@ -62,7 +62,8 @@ public class CertificateAndRequestParameterResolver implements IResolver { this.ctx = new OgnlContext(null, null, memberAccess); this.ctx = new OgnlContext(null, null, memberAccess); - this.ctx.put(IProfileConstants.DYNAMIC_REQUEST_PARAMETERS, operationStatus.getRequestParameters()); + this.ctx.put(IProfileConstants.DYNAMIC_REQUEST_PARAMETERS, operationStatus.getSignParamter().getDynamicSignatureBlockArguments()); +// this.ctx.put(IProfileConstants.DYNAMIC_REQUEST_PARAMETERS, operationStatus.getRequestParameters()); this.ctx.put("sn", this.certificate.getSerialNumber().toString()); diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/OperationStatus.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/OperationStatus.java index 08dcd249..898b7a00 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/OperationStatus.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/OperationStatus.java @@ -56,7 +56,7 @@ public class OperationStatus implements Serializable { private PDFASBackend backend; private Map metaInformations = new HashMap(); - private HashMap requestParameters = new HashMap(); +// private HashMap requestParameters = new HashMap(); public OperationStatus(ISettings configuration, SignParameter signParameter, PDFASBackend backend) { this.configuration = configuration; @@ -177,7 +177,7 @@ public class OperationStatus implements Serializable { return metaInformations; } - public HashMap getRequestParameters() { - return requestParameters; - } +// public HashMap getRequestParameters() { +// return requestParameters; +// } } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/PDFObject.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/PDFObject.java index 6722c69e..0b49aa90 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/PDFObject.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/status/PDFObject.java @@ -25,6 +25,7 @@ package at.gv.egiz.pdfas.lib.impl.status; import java.io.IOException; import java.util.HashMap; +import java.util.Map; import javax.activation.DataSource; @@ -71,7 +72,8 @@ public abstract class PDFObject { public abstract String getPDFVersion(); - public HashMap getRequestParameters() { - return status.getRequestParameters(); + public Map getRequestParameters() { + return status.getSignParamter().getDynamicSignatureBlockArguments(); +// return status.getRequestParameters();//TODO alex } } -- cgit v1.2.3