aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src
diff options
context:
space:
mode:
Diffstat (limited to 'id/ConfigWebTool/src')
-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);
+ }
}
}