From 22c56e9d4b8c8ba6bea4993d7bd3cc0a83a23d8b Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 12 Dec 2013 11:51:36 +0100 Subject: added certificate serial number for OGNL resolver --- pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java | 2 ++ .../pdfas/lib/impl/configuration/SignatureProfileConfiguration.java | 2 +- .../java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pdf-as-lib/src/main/java/at/gv') 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 fc245592..89408bc8 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 @@ -524,6 +524,8 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants { .getDefaultPositioning(); } + logger.debug("using Positioning: " + posString); + boolean legacy32Position = signatureProfileConfiguration.getLegacy32Positioning(); TablePos tablePos = null; diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java index b8a0139a..b2d5207d 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/SignatureProfileConfiguration.java @@ -20,7 +20,7 @@ public class SignatureProfileConfiguration extends SpecificBaseConfiguration } public String getDefaultPositioning() { - String key = SIG_OBJECT + SEPERATOR + profileID + SEPERATOR + TABLE + SEPERATOR + POS; + String key = SIG_OBJECT + SEPERATOR + profileID + SEPERATOR + POS; return this.configuration.getValue(key); } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java index 78dcbe23..7f8b0a0b 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java @@ -26,6 +26,8 @@ public class CertificateResolver implements IResolver { this.certificate = certificate; this.ctx = new OgnlContext(); + this.ctx.put("sn", this.certificate.getSerialNumber().toString()); + try { Map issuerDNMap = DNUtils.dnToMap(certificate.getIssuerDN().getName()); this.ctx.put("issuer", issuerDNMap); -- cgit v1.2.3