diff options
author | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-11-13 12:39:19 +0000 |
---|---|---|
committer | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-11-13 12:39:19 +0000 |
commit | 558b3d8e35eeb52936aa557b6625c997e62e8f50 (patch) | |
tree | 55665cbbcf42e4866439b3557d5cb97cd0931e9f /src/main/java/at/gv/egiz | |
parent | 9bf8afd3989d6a17b518d8d2831e72344956ddef (diff) | |
download | pdf-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
Diffstat (limited to 'src/main/java/at/gv/egiz')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/api/CheckHelper.java | 7 |
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)
{
|