aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-05-26 11:26:32 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-05-26 11:26:32 +0200
commit1c5fbb27d5d3b143bfa47153efd245b1270ba951 (patch)
tree24a070adc795367fff1368d0813c592895e87ac4 /id/ConfigWebTool
parent371bedc5fa7eb8d19a07dc9bab90089ea6496945 (diff)
downloadmoa-id-spss-1c5fbb27d5d3b143bfa47153efd245b1270ba951.tar.gz
moa-id-spss-1c5fbb27d5d3b143bfa47153efd245b1270ba951.tar.bz2
moa-id-spss-1c5fbb27d5d3b143bfa47153efd245b1270ba951.zip
update PVP 2.1 verification
Diffstat (limited to 'id/ConfigWebTool')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
index 3429f6c96..332adaa80 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
@@ -56,6 +56,19 @@ public class MetaDataVerificationFilter implements MetadataFilter {
} catch (MOAIDException e) {
throw new FilterException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
}
+
+ } if (metadata instanceof EntityDescriptor) {
+ try {
+ EntityDescriptor entity = (EntityDescriptor) metadata;
+ if (entity.getSignature() != null)
+ EntityVerifier.verify(entity, this.credential);
+
+ else
+ throw new FilterException("Root element of metadata file has to be signed", null);
+
+ } catch (MOAIDException e) {
+ throw new FilterException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
+ }
}
}