From cc26fbd157a39ea243d1d253e6b62f38ccad244e Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 27 Jun 2023 08:41:38 +0200 Subject: chore(sl20): check if JoseUtils for SL2.0 are initialized --- .../src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pdf-as-web/src/main') 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); -- cgit v1.2.3