From e5d4ace31a8584b4cb4fc1f85f0cedbf447a67a2 Mon Sep 17 00:00:00 2001 From: Fredrik Domeij Date: Tue, 2 Apr 2019 16:01:20 +0200 Subject: add registrationAuthority to all xml files in swamid-2.0 during make tidy --- Makefile | 11 ++++++++++- xslt/add-rpi.xsl | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ xslt/normalize.xsl | 2 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 xslt/add-rpi.xsl diff --git a/Makefile b/Makefile index debab7fc..020a0e55 100644 --- a/Makefile +++ b/Makefile @@ -102,6 +102,7 @@ clean: @rm -f *.xml *.tbs *.n *.sig tidy: + @for x in `find $(SRCDIRS) -name \*.xml`; do xsltproc xslt/add-rpi.xsl $$x > $$x.c && mv $$x.c $$x; done @for x in `find $(SRCDIRS) -name \*.xml`; do xsltproc xslt/clean-entitydescriptor.xsl $$x > $$x.c && mv $$x.c $$x; done testMetadataUsage: @@ -241,7 +242,15 @@ testAttributeInIdP: fi;\ done | grep . && exit 1 || exit 0 -test: syntaxtest testMDUI testOrgData testEntCat testSimpleSign testALlevel testEduGAINchecks testRefedsRnS testGeantCoCo testMetadataUsage testBadStrings testIdPinSP testRoleDescriptor testAttributeInIdP testValidContact +testRegistrationAuthority: + @echo "Check for registrationAuthority="http://www.swamid.se/" in EntityDescriptor/Extensions" + @for x in `find $(SRCDIRS) -name \*.xml`; do \ + if ! cat $$x | sed 's;\(/dev/null | grep -q 'registrationAuthority="http://www.swamid.se/"' ; then \ + echo " $$x" | sed 's/.*/&/' ;\ + fi;\ + done | grep . && exit 1 || exit 0 + +test: syntaxtest testMDUI testOrgData testEntCat testSimpleSign testALlevel testEduGAINchecks testRefedsRnS testGeantCoCo testMetadataUsage testBadStrings testIdPinSP testRoleDescriptor testAttributeInIdP testValidContact testRegistrationAuthority test2: $(SWAMIDXML) schematest testMDUI testOrgData testEntCat testSimpleSign testALlevel testEduGAINchecks testRefedsRnS testGeantCoCo testMetadataUsage testBadStrings testIdPinSP testRoleDescriptor testAttributeInIdP testValidContact diff --git a/xslt/add-rpi.xsl b/xslt/add-rpi.xsl new file mode 100644 index 00000000..b6686ff1 --- /dev/null +++ b/xslt/add-rpi.xsl @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://www.sunet.se/wp-content/uploads/2016/08/SWAMID-Metadata-Registration-Practice-Statement-v2.pdf + + + + + + + + + + + + + + + + + diff --git a/xslt/normalize.xsl b/xslt/normalize.xsl index 06550345..d407e18f 100644 --- a/xslt/normalize.xsl +++ b/xslt/normalize.xsl @@ -94,7 +94,7 @@ If You do not accept these Terms, then You must not continue to use this Metadat - + https://www.sunet.se/wp-content/uploads/2016/08/SWAMID-Metadata-Registration-Practice-Statement-v2.pdf -- cgit v1.2.3