diff options
Diffstat (limited to 'src/main/java/at')
-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)
{
|