aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/impl/api
diff options
context:
space:
mode:
authorwprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-01-29 13:47:42 +0000
committerwprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-01-29 13:47:42 +0000
commit1ed2786b85d6f7dac5c83a1ba0474b7f33fa237c (patch)
tree6eaed3c4665508fd7da4eb035467d667523f392f /src/main/java/at/gv/egiz/pdfas/impl/api
parent4bf06456b7fb2613d962aec705d77844512af09a (diff)
downloadpdf-as-3-1ed2786b85d6f7dac5c83a1ba0474b7f33fa237c.tar.gz
pdf-as-3-1ed2786b85d6f7dac5c83a1ba0474b7f33fa237c.tar.bz2
pdf-as-3-1ed2786b85d6f7dac5c83a1ba0474b7f33fa237c.zip
api signatureKeyIdentifier override added, brz distribution assembly for maven, mime-type argument checking in SignResult constructor fixedREL-3.0.9-20090129-rev322@329
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@322 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java9
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java3
2 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java b/src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java
index 9daae59..4466d8b 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java
@@ -67,6 +67,7 @@ public final class CheckHelper
{
checkSignaturePositioning(sp.getSignaturePositioning());
}
+ checkSignatureKeyIdentifier(sp.getSignatureKeyIdentifier(), sp.getSignatureDevice());
}
/**
@@ -186,6 +187,14 @@ public final class CheckHelper
throw new IllegalArgumentException(msg);
}
}
+
+ protected static void checkSignatureKeyIdentifier (String signatureKeyIdentifier, String signatureDevice)
+ {
+ if (signatureKeyIdentifier != null && !Constants.SIGNATURE_DEVICE_MOA.equals(signatureDevice))
+ {
+ log.warn("A signatureKeyIdentifier (" + signatureKeyIdentifier + ") was provided although the signatureDevice (" + signatureDevice + ") is not moa. Currently only the moa signature device evaluates the signatureKeyIdentifier parameter.");
+ }
+ }
protected static void checkVerifyMode(String verifyMode)
{
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
index 40da270..46157e3 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
@@ -14,7 +14,6 @@ import java.util.Vector;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.PropertyConfigurator;
import at.gv.egiz.pdfas.api.PdfAs;
import at.gv.egiz.pdfas.api.analyze.AnalyzeParameters;
@@ -30,7 +29,6 @@ import at.gv.egiz.pdfas.api.verify.VerifyResult;
import at.gv.egiz.pdfas.api.verify.VerifyResults;
import at.gv.egiz.pdfas.commandline.CommandlineConnectorChooser;
import at.gv.egiz.pdfas.exceptions.ErrorCode;
-import at.gv.egiz.pdfas.framework.ConnectorFactory;
import at.gv.egiz.pdfas.framework.config.SettingsHelper;
import at.gv.egiz.pdfas.framework.input.ExtractionStage;
import at.gv.egiz.pdfas.framework.signator.SignatorInformation;
@@ -244,6 +242,7 @@ public class PdfAsObject implements PdfAs
signatorId,
connectorId,
signParameters.getSignatureProfileId(),
+ signParameters.getSignatureKeyIdentifier(),
pos
);