diff options
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/signator/binary')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/signator/binary/BinarySignator_1_0_0.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/signator/binary/BinarySignator_1_0_0.java b/src/main/java/at/gv/egiz/pdfas/impl/signator/binary/BinarySignator_1_0_0.java index 36d3764..bdb5fdb 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/signator/binary/BinarySignator_1_0_0.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/signator/binary/BinarySignator_1_0_0.java @@ -17,6 +17,7 @@ */
package at.gv.egiz.pdfas.impl.signator.binary;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -26,6 +27,7 @@ import java.util.HashMap; import java.util.Iterator;
import java.util.List;
+import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -40,6 +42,7 @@ import at.gv.egiz.pdfas.framework.signator.SignatorInformation; import at.gv.egiz.pdfas.impl.input.CompoundPdfDataSourceImpl;
import at.gv.egiz.pdfas.impl.signator.IncrementalUpdateHelper;
import at.gv.egiz.pdfas.utils.OgnlUtil;
+import at.gv.egiz.pdfas.utils.PDFASUtils;
import at.knowcenter.wag.egov.egiz.PdfAS;
import at.knowcenter.wag.egov.egiz.PdfASID;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
@@ -199,7 +202,7 @@ public class BinarySignator_1_0_0 implements Signator iui.invisibleKZString = invKZString;
String temp_string = iui.temp_ir_number + " " + iui.temp_ir_generation + " obj"; //$NON-NLS-1$//$NON-NLS-2$
- byte[] temp_bytes = temp_string.getBytes("US-ASCII"); //$NON-NLS-1$
+ byte[] temp_bytes = ArrayUtils.add(temp_string.getBytes("US-ASCII"), 0, (byte) 0x0A);
int temp_start = ByteArrayUtils.lastIndexOf(iui.signed_pdf, temp_bytes);
byte[] stream_bytes = new byte[] { '>', '>', 's', 't', 'r', 'e', 'a', 'm', 0x0A };
int stream_start = ByteArrayUtils.indexOf(iui.signed_pdf, temp_start, stream_bytes);
|