aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2018-07-27 12:28:01 +0200
committeremusic <emina.music@egiz.gv.at>2018-07-27 12:28:01 +0200
commit236cd00a49b04523a325e06fdc8839be9049f892 (patch)
treeb28e2548d10775332112b9444dd0de87e31ccb6b /pdf-as-lib/src/main/java
parent21c932574c86031da3bed44b94bf3f54a930070d (diff)
downloadpdf-as-4-236cd00a49b04523a325e06fdc8839be9049f892.tar.gz
pdf-as-4-236cd00a49b04523a325e06fdc8839be9049f892.tar.bz2
pdf-as-4-236cd00a49b04523a325e06fdc8839be9049f892.zip
adding additional data transfer type
Diffstat (limited to 'pdf-as-lib/src/main/java')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONBuilderUtils.java4
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONExtractorUtils.java10
2 files changed, 4 insertions, 10 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONBuilderUtils.java b/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONBuilderUtils.java
index 40edb74b..efbc2890 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONBuilderUtils.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONBuilderUtils.java
@@ -182,11 +182,11 @@ public class SL20JSONBuilderUtils {
}
public static JsonObject createCreateCAdESCommandParameters(String keyId,
- byte[] content, String mimeType, boolean padesCompatiblem, List<String> byteRanges, String cadesLevel,
+ String pdfUrl, String mimeType, boolean padesCompatiblem, List<String> byteRanges, String cadesLevel,
String dataUrl, X509Certificate x5cEnc) throws CertificateEncodingException, SLCommandoBuildException {
JsonObject params = new JsonObject();
addSingleStringElement(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_KEYID, keyId, true);
- addSingleByteElement(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CONTENT, content, true);
+ addSingleStringElement(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_CONTENT, pdfUrl, true);
addSingleStringElement(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_MIMETYPE, mimeType, true);
addSingleBooleanElement(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_PADES_COMBATIBILTY, padesCompatiblem, false);
addArrayOfStrings(params, SL20Constants.SL20_COMMAND_PARAM_CREATE_SIG_CADES_EXCLUDEBYTERANGE, byteRanges);
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONExtractorUtils.java b/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONExtractorUtils.java
index 5a438e16..5fbce83b 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONExtractorUtils.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/sl20/utils/SL20JSONExtractorUtils.java
@@ -206,8 +206,7 @@ public class SL20JSONExtractorUtils {
}
}
-
-
+
public static JsonElement extractSL20Result(JsonObject command, IJOSETools decrypter, boolean mustBeEncrypted) throws SL20Exception {
JsonElement result = command.get(SL20Constants.SL20_COMMAND_CONTAINER_RESULT);
JsonElement encryptedResult = command.get(SL20Constants.SL20_COMMAND_CONTAINER_ENCRYPTEDRESULT);
@@ -242,20 +241,15 @@ public class SL20JSONExtractorUtils {
}
} else
- throw e;
-
+ throw e;
}
-
} else if (result != null) {
return result;
} else {
log.error("Internal build error");
throw new SLCommandoParserException();
-
}
-
-
}
/**