aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src
diff options
context:
space:
mode:
authorThomas <>2023-06-27 08:41:38 +0200
committerThomas <>2023-06-27 08:41:38 +0200
commitcc26fbd157a39ea243d1d253e6b62f38ccad244e (patch)
tree0da047fd38f64701999196dbde61cd2a0d9cc813 /pdf-as-web/src
parent6e0bff37a90eaee1ae7f0eef0972dc735e4076f4 (diff)
downloadpdf-as-4-cc26fbd157a39ea243d1d253e6b62f38ccad244e.tar.gz
pdf-as-4-cc26fbd157a39ea243d1d253e6b62f38ccad244e.tar.bz2
pdf-as-4-cc26fbd157a39ea243d1d253e6b62f38ccad244e.zip
chore(sl20): check if JoseUtils for SL2.0 are initialized
Diffstat (limited to 'pdf-as-web/src')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
index 3ac91cab..0de8ca71 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
@@ -161,7 +161,9 @@ public class PdfAsHelper {
reloadConfig();
}
- public static void init() {
+ public static void init() {
+ JsonSecurityUtils.getInstance();
+
log.info("PDF-AS Helper initialized");
}
@@ -903,6 +905,10 @@ public class PdfAsHelper {
JsonObject sl20Req = null;
String reqId = UUID.randomUUID().toString();
if (WebConfiguration.isSL20SigningEnabled()) {
+ if (joseTools == null) {
+ throw new PdfAsException("error.config.sl20.01");
+ }
+
String signedCertCommand = SL20JSONBuilderUtils.createSignedCommand(
SL20Constants.SL20_COMMAND_IDENTIFIER_GETCERTIFICATE, getCertParams, joseTools);
sl20Req = SL20JSONBuilderUtils.createGenericRequest(reqId, null, null, signedCertCommand);