aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2018-09-18 10:16:56 +0200
committeremusic <emina.music@egiz.gv.at>2018-09-18 10:16:56 +0200
commitbe27da36e9b1e319bf8910228cdbcdd502afbc9d (patch)
tree1a4eac854cad4bab5392103e5c22e57f7421a7a3 /pdf-as-web/src
parent3a1eaed4175bb1ec5b2dc2d2d13e125af997f286 (diff)
downloadpdf-as-4-be27da36e9b1e319bf8910228cdbcdd502afbc9d.tar.gz
pdf-as-4-be27da36e9b1e319bf8910228cdbcdd502afbc9d.tar.bz2
pdf-as-4-be27da36e9b1e319bf8910228cdbcdd502afbc9d.zip
changes in pdfurl
Diffstat (limited to 'pdf-as-web/src')
-rw-r--r--pdf-as-web/src/main/configuration/pdf-as-web.properties1
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java42
2 files changed, 30 insertions, 13 deletions
diff --git a/pdf-as-web/src/main/configuration/pdf-as-web.properties b/pdf-as-web/src/main/configuration/pdf-as-web.properties
index 59d76607..4cc59a47 100644
--- a/pdf-as-web/src/main/configuration/pdf-as-web.properties
+++ b/pdf-as-web/src/main/configuration/pdf-as-web.properties
@@ -85,3 +85,4 @@ sl20.debug.signed.result.enabled=false
sl20.debug.signed.result.required=false
sl20.debug.encryption.enabled=false
sl20.debug.encryption.required=false
+sl20.transfermode.filesize=20000000 \ No newline at end of file
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 23e16ec3..8aeda417 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
@@ -1224,19 +1224,35 @@ public class PdfAsHelper {
byte[] data = PDFUtils.blackOutSignature(statusRequest.getSignatureData(),
statusRequest.getSignatureDataByteRange());
-
- JsonObject createCAdESSigParams =
- SL20JSONBuilderUtils.createCreateCAdESCommandParameters(
- pack.getRequestType().getKeyboxIdentifier(),
- null,
- generateNSPdfURL(request,response),
- SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CONTENTMODE_DETACHED,
- pack.getRequestType().getDataObject().getMetaInfo().getMimeType(),
- padesCompatibel ,
- byteRanges,
- SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CADESLEVEL_BASIC,
- generateDataURLSL20(request, response),
- x5cEnc) ;
+ JsonObject createCAdESSigParams;
+ if(data.length>20000000) {
+ createCAdESSigParams =
+ SL20JSONBuilderUtils.createCreateCAdESCommandParameters(
+ pack.getRequestType().getKeyboxIdentifier(),
+ null,
+ generateNSPdfURL(request, response),
+ SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CONTENTMODE_DETACHED,
+ pack.getRequestType().getDataObject().getMetaInfo().getMimeType(),
+ padesCompatibel,
+ byteRanges,
+ SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CADESLEVEL_BASIC,
+ generateDataURLSL20(request, response),
+ x5cEnc);
+ } else
+ {
+ createCAdESSigParams =
+ SL20JSONBuilderUtils.createCreateCAdESCommandParameters(
+ pack.getRequestType().getKeyboxIdentifier(),
+ data,
+ null,
+ SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CONTENTMODE_DETACHED,
+ pack.getRequestType().getDataObject().getMetaInfo().getMimeType(),
+ padesCompatibel,
+ byteRanges,
+ SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CADESLEVEL_BASIC,
+ generateDataURLSL20(request, response),
+ x5cEnc);
+ }
JsonObject sl20CreateCAdES = null;
String reqId = UUID.randomUUID().toString();