From 1c5fbb27d5d3b143bfa47153efd245b1270ba951 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 26 May 2014 11:26:32 +0200 Subject: update PVP 2.1 verification --- .../configuration/auth/pvp2/MetaDataVerificationFilter.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); + } } } -- cgit v1.2.3