aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-11-13 12:39:19 +0000
committerferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-11-13 12:39:19 +0000
commit558b3d8e35eeb52936aa557b6625c997e62e8f50 (patch)
tree55665cbbcf42e4866439b3557d5cb97cd0931e9f
parent9bf8afd3989d6a17b518d8d2831e72344956ddef (diff)
downloadpdf-as-3-558b3d8e35eeb52936aa557b6625c997e62e8f50.tar.gz
pdf-as-3-558b3d8e35eeb52936aa557b6625c997e62e8f50.tar.bz2
pdf-as-3-558b3d8e35eeb52936aa557b6625c997e62e8f50.zip
added timestamp support
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@392 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java7
1 files changed, 7 insertions, 0 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 0c2d7ca..dcded42 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
@@ -68,6 +68,7 @@ public final class CheckHelper
checkSignaturePositioning(sp.getSignaturePositioning());
}
checkSignatureKeyIdentifier(sp.getSignatureKeyIdentifier(), sp.getSignatureDevice());
+ checkTimestampHandler(sp);
}
/**
@@ -148,6 +149,12 @@ public final class CheckHelper
throw new IllegalArgumentException("The signatureType must be one of the Constants.SIGNATURE_TYPE_* constants. " + signatureType);
}
}
+
+ protected static void checkTimestampHandler(SignParameters params) {
+ if (params.getTimeStamperImpl() != null && !Constants.SIGNATURE_TYPE_BINARY.equals(params.getSignatureType())) {
+ throw new IllegalArgumentException("timestamping is only allowed for binary signatures ");
+ }
+ }
protected static void checkProfileId(String profileId)
{