diff options
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -123,11 +123,8 @@ testRefedsRnS: testGeantCoCo: @echo "Checking for Geant CoCo compliance" + @touch sp-with-coco-errors @for x in `cat swamid-edugain-sp-1.0.mxml swamid-edugain-testing-1.0.mxml swamid-sp-2.0.mxml swamid-testing-sp-1.0.mxml | grep -v "\.mxml$$" | grep "xi:include" | awk -F\" '{print $$2}' | xargs grep -l SPSSODescriptor | sort -u` ; do \ - if grep -qx "$$x" sp-with-coco-errors ; then \ - echo " Known missing link to CoCo in PrivacyStatementURL: $$x" 1>&2 ; \ - continue ; \ - fi ; \ got_geant_CoCo=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/Extensions/EntityAttributes/Attribute[@Name='http://macedir.org/entity-category']/AttributeValue" - 2>/dev/null | grep 'http://www.geant.net/uri/dataprotection-code-of-conduct/v1'` ; \ if [ -n "$$got_geant_CoCo" ] ; then \ ( \ @@ -151,7 +148,13 @@ testGeantCoCo: echo " Missing PrivacyStatementURL in english"'' ; \ fi ; \ echo "$$mdui_PrivacyStatementURL" | sed 's/></>\n</g' | sed 's/.*\ \(xml:lang=.*\)>\(.*\)<.*/\1 \2/' | while read lang url ; do \ - curl -A 'Mozilla' -s -L -m 5 "$$url" < /dev/null | grep "https*://www.geant.net/uri/dataprotection-code-of-conduct/v1" > /dev/null || echo " Missing link to geant.net/code-of-conduct/v1 in PrivacyStatementURL $$lang ($$url)" ; \ + if grep -qx "$$x" sp-with-coco-errors ; then \ + echo " Known bad link to CoCo in PrivacyStatementURL: $$x" 1>&2 ; \ + else \ + if ! grep -q "$$url $$lang $$mdui_PrivacyStatementURL" sp-with-once-ok-coco-link ; then \ + curl -A 'Mozilla' -s -L -m 5 "$$url" < /dev/null | grep "https*://www.geant.net/uri/dataprotection-code-of-conduct/v1" > /dev/null && echo "$$url $$lang $$mdui_PrivacyStatementURL" >> sp-with-once-ok-coco-link || echo " Missing link to geant.net/code-of-conduct/v1 in PrivacyStatementURL $$lang ($$url)" ; \ + fi ; \ + fi ; \ done ; \ fi ; \ fi ; \ |