aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main
diff options
context:
space:
mode:
authorThomas <>2021-03-26 09:54:41 +0100
committerThomas <>2021-03-26 09:54:41 +0100
commit510fca957d9cf00260efe7ed78a663d46c69adb7 (patch)
tree8129c4ab6ff144e28a02d0a8f443561ce8a5e52e /pdf-as-lib/src/main
parentb51e3b877fa7c8b930e63fd8e1317e34d7d4773e (diff)
downloadpdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.tar.gz
pdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.tar.bz2
pdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.zip
update gradle build-process to wrapper 6.8.3
Diffstat (limited to 'pdf-as-lib/src/main')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java17
-rw-r--r--pdf-as-lib/src/main/resources/config/config.zipbin1277320 -> 1277320 bytes
2 files changed, 16 insertions, 1 deletions
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 edb87eb2..d7d83b34 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
@@ -28,11 +28,17 @@ import at.gv.egiz.pdfas.common.utils.DNUtils;
import at.gv.egiz.pdfas.common.utils.OgnlUtils;
import at.gv.egiz.pdfas.lib.impl.status.OperationStatus;
import iaik.x509.X509Certificate;
+import ognl.AbstractMemberAccess;
+import ognl.MemberAccess;
+import ognl.Ognl;
import ognl.OgnlContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.naming.InvalidNameException;
+
+import java.lang.reflect.Member;
+import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
@@ -45,7 +51,16 @@ public class CertificateResolver implements IResolver {
public CertificateResolver(X509Certificate certificate, OperationStatus operationStatus) {
this.certificate = certificate;
- this.ctx = new OgnlContext();
+
+ MemberAccess memberAccess = new AbstractMemberAccess() {
+ @Override
+ public boolean isAccessible(Map context, Object target, Member member, String propertyName) {
+ int modifiers = member.getModifiers();
+ return Modifier.isPublic(modifiers);
+ }
+ };
+
+ this.ctx = new OgnlContext(null, null, memberAccess);
this.ctx.put("sn", this.certificate.getSerialNumber().toString());
diff --git a/pdf-as-lib/src/main/resources/config/config.zip b/pdf-as-lib/src/main/resources/config/config.zip
index 0c4be90c..38cc4f34 100644
--- a/pdf-as-lib/src/main/resources/config/config.zip
+++ b/pdf-as-lib/src/main/resources/config/config.zip
Binary files differ