diff options
| -rw-r--r-- | pdf-as-common/src/main/resources/resources/messages/common.properties | 3 | ||||
| -rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 8 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/pdf-as-common/src/main/resources/resources/messages/common.properties b/pdf-as-common/src/main/resources/resources/messages/common.properties index d8695619..f3baebad 100644 --- a/pdf-as-common/src/main/resources/resources/messages/common.properties +++ b/pdf-as-common/src/main/resources/resources/messages/common.properties @@ -1,3 +1,6 @@ +# Configuration errors +error.config.sl20.01=Signing of SL2.0 messages are enabled, but not Keystore available  +  # PDF Permission Errors  error.pdf.perm.01=You do not have permission to extract images 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); | 
