diff options
author | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-11-29 14:32:54 +0000 |
---|---|---|
committer | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-11-29 14:32:54 +0000 |
commit | e4ef1a719fafe32162274f3eaf2a47fb50509671 (patch) | |
tree | 97b4b020d0e3d3239ea2f2d07c0b5eac98e1678f /src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz | |
parent | 706da250618d8ac75364388718edff77cd59e3df (diff) | |
download | pdf-as-3-e4ef1a719fafe32162274f3eaf2a47fb50509671.tar.gz pdf-as-3-e4ef1a719fafe32162274f3eaf2a47fb50509671.tar.bz2 pdf-as-3-e4ef1a719fafe32162274f3eaf2a47fb50509671.zip |
strict checking vor signparam versions
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@643 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz/SigKZIDHelper.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz/SigKZIDHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz/SigKZIDHelper.java index 9a144db..4c83d76 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz/SigKZIDHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigkz/SigKZIDHelper.java @@ -73,7 +73,7 @@ public final class SigKZIDHelper String prefix = (ids[0].split(":"))[0];
- if (prefix.startsWith(DetachedLocRefMOAIdFormatter.SIG_ID_PREFIX))
+ if (prefix.equals(DetachedLocRefMOAIdFormatter.SIG_ID_PREFIX))
{
return true;
}
@@ -116,7 +116,7 @@ public final class SigKZIDHelper if (algorithmId == null) {
return false;
} else {
- return algorithmId.startsWith("etsi-moc-");
+ return algorithmId.startsWith("etsi-moc-1.0") || algorithmId.startsWith("etsi-moc-1.1");
}
}
@@ -221,7 +221,22 @@ public final class SigKZIDHelper if (sig_id == null && StringUtils.isEmpty(sig_id)) {
return false;
}
- return sig_id.startsWith("etsi-bka-atrust");
+ return sig_id.startsWith("etsi-bka-atrust-1.0");
+ }
+
+ /**
+ * Checks if signed with a known BKU method/param
+ * @param so
+ * @return
+ */
+ public static boolean isBKUSigned(SignSignatureObject so) throws ConnectorException {
+ if (isOldBKU(so)) return true;
+
+ if (so.id.startsWith("etsi-bka-1.0")) {
+ return true;
+ }
+
+ return false;
}
}
|