aboutsummaryrefslogtreecommitdiff
path: root/signature-standards/sigs-pades/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-16 12:45:01 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-16 12:45:01 +0200
commit63784f692a50606f34702706761edac052fdac60 (patch)
tree50f78a92c35cdfced053209a334944acdee2b983 /signature-standards/sigs-pades/src/main/java/at/gv
parent7b105bafe5a1f4c01224c8ae0b820a478b09447f (diff)
downloadpdf-as-4-63784f692a50606f34702706761edac052fdac60.tar.gz
pdf-as-4-63784f692a50606f34702706761edac052fdac60.tar.bz2
pdf-as-4-63784f692a50606f34702706761edac052fdac60.zip
Introduced PDF-AS Backends, removed all pdfbox specific code to pdfbox backend
Diffstat (limited to 'signature-standards/sigs-pades/src/main/java/at/gv')
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESConstants.java6
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java13
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java8
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java7
4 files changed, 17 insertions, 17 deletions
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESConstants.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESConstants.java
new file mode 100644
index 00000000..c27d7467
--- /dev/null
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESConstants.java
@@ -0,0 +1,6 @@
+package at.gv.egiz.pdfas.sigs.pades;
+
+public interface PAdESConstants {
+ public static final String SUBFILTER_ETSI_CADES_DETACHED = "ETSI.CAdES.detached";
+ public static final String FILTER_ADOBE_PPKLITE = "Adobe.PPKLite";
+}
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
index 07d3b66c..8a511c66 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
@@ -24,19 +24,16 @@
package at.gv.egiz.pdfas.sigs.pades;
import iaik.x509.X509Certificate;
-
-import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature;
-
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner;
import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
import at.gv.egiz.pdfas.lib.impl.status.RequestedSignature;
+import at.gv.egiz.sl.util.ISLConnector;
import at.gv.egiz.sl.util.ISignatureConnector;
import at.gv.egiz.sl.util.ISignatureConnectorSLWrapper;
-import at.gv.egiz.sl.util.ISLConnector;
-
-public class PAdESSigner implements IPlainSigner {
+public class PAdESSigner implements IPlainSigner, PAdESConstants {
+
private ISignatureConnector plainSigner;
public PAdESSigner(ISLConnector connector) {
@@ -57,11 +54,11 @@ public class PAdESSigner implements IPlainSigner {
}
public String getPDFSubFilter() {
- return PDSignature.SUBFILTER_ETSI_CADES_DETACHED.getName();
+ return SUBFILTER_ETSI_CADES_DETACHED;
}
public String getPDFFilter() {
- return PDSignature.FILTER_ADOBE_PPKLITE.getName();
+ return FILTER_ADOBE_PPKLITE;
}
}
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
index 002475eb..220cf6e2 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
@@ -54,7 +54,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -65,9 +64,8 @@ import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
import at.gv.egiz.pdfas.lib.impl.status.RequestedSignature;
import at.gv.egiz.pdfas.lib.util.CertificateUtils;
-public class PAdESSignerKeystore implements IPlainSigner {
+public class PAdESSignerKeystore implements IPlainSigner, PAdESConstants {
- @SuppressWarnings("unused")
private static final Logger logger = LoggerFactory
.getLogger(PAdESSignerKeystore.class);
@@ -257,11 +255,11 @@ public class PAdESSignerKeystore implements IPlainSigner {
}
public String getPDFSubFilter() {
- return PDSignature.SUBFILTER_ETSI_CADES_DETACHED.getName();
+ return SUBFILTER_ETSI_CADES_DETACHED;
}
public String getPDFFilter() {
- return PDSignature.FILTER_ADOBE_PPKLITE.getName();
+ return FILTER_ADOBE_PPKLITE;
}
}
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
index d1e185ab..a4ef703e 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESVerifier.java
@@ -27,7 +27,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,7 +39,7 @@ import at.gv.egiz.pdfas.lib.impl.verify.IVerifier;
import at.gv.egiz.pdfas.lib.impl.verify.IVerifyFilter;
import at.gv.egiz.pdfas.lib.impl.verify.VerifyResultImpl;
-public class PAdESVerifier implements IVerifyFilter {
+public class PAdESVerifier implements IVerifyFilter, PAdESConstants {
private static final Logger logger = LoggerFactory
.getLogger(PAdESVerifier.class);
@@ -73,8 +72,8 @@ public class PAdESVerifier implements IVerifyFilter {
public List<FilterEntry> getFiters() {
List<FilterEntry> result = new ArrayList<FilterEntry>();
- result.add(new FilterEntry(PDSignature.FILTER_ADOBE_PPKLITE,
- PDSignature.SUBFILTER_ETSI_CADES_DETACHED));
+ result.add(new FilterEntry(FILTER_ADOBE_PPKLITE,
+ SUBFILTER_ETSI_CADES_DETACHED));
return result;
}