summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2016-03-18 12:06:54 +0100
committerLeif Johansson <leifj@sunet.se>2016-03-18 12:06:54 +0100
commita1d9696a14711245830990da69b094779e03244b (patch)
treec02e05fe9796720bb3caf09c78c319177c6a970b /Makefile
parentd5a90365d5c93570dc8d50538c20c1f87474cb2c (diff)
cleanup, implement PublicationInfo and remove saml-md-tool dependency
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile74
1 files changed, 23 insertions, 51 deletions
diff --git a/Makefile b/Makefile
index 836dc4a5..dc2de595 100644
--- a/Makefile
+++ b/Makefile
@@ -7,36 +7,37 @@ SRCDIRS=swamid-2.0
DAYS:=15
DATE=$(shell perl scripts/expiration_date.pl $(DAYS))
+NOW=$(shell perl scripts/now_date.pl)
RPI=false
CONTACTS=false
TOU=true
ORG=true
TRANSFORM=xslt/normalize.xsl
-XSLTDEFS := --stringparam org $(ORG) --stringparam tou $(TOU) --stringparam rpi $(RPI) --stringparam defaultContact $(CONTACTS) --stringparam date $(DATE)
+ID=$(shell perl scripts/unique_id.pl)
+XSLTDEFS := --stringparam org $(ORG) --stringparam ID $(ID) --stringparam tou $(TOU) --stringparam rpi $(RPI) --stringparam defaultContact $(CONTACTS) --stringparam date $(DATE) --stringparam now $(NOW)
+SIGNER := xmlsec1 --sign --privkey-pem $(KEY),$(CERT) --pwd $(PASS) --id-attr:ID urn:oasis:names:tc:SAML:2.0:metadata:EntitiesDescriptor
-all: update clean sign clean
+-include local.mk
-update:
-# @svn up -q
-
-keys: $(KEY) $(CERT)
+all: clean dependencies test sign clean web
MXML=$(shell echo *.mxml)
-sign: keys swamid swamid-testing swamid-testing-idp upstream projects swamid-ki-sll
+sign: swamid upstream projects
%.sig: %.mxml
- xsltproc $(XSLTDEFS) --xinclude $(TRANSFORM) $< > $*.n
+ xsltproc $(XSLTDEFS) --stringparam target "http://md.swamid.se/md/$*.xml" --xinclude $(TRANSFORM) $< > $*.n
xsltproc $(XSLTDEFS) --xinclude xslt/sign.xsl $*.n > $*.tbs
- xmlsec1 --sign --privkey-pem $(KEY),$(CERT) --pwd $(PASS) --output $@ $*.tbs
+ $(SIGNER) --output $@ $*.tbs
xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $@
- rm -f $*.tbs $*.n
+ #rm -f $*.tbs $*.n
%.pub: %.sig
samlsign -c $(CERT) -f $< && xmllint --c14n $< > $(DEST)/$*.xml
- #xmllint --c14n --nowarning --path schema --schema schema.xsd $< > $(DEST)/$*.xml
rm -f $<
+dependencies: swamid-externals-sp-2.0.xml swamid-interfederations-idp-2.0.xml
+
upstream: edugain kalmar
kalmar:
@@ -45,7 +46,12 @@ kalmar:
edugain:
$(MAKE) RPI=true CONTACTS=true swamid-edugain-testing-1.0.pub swamid-edugain-1.0.pub
-projects:
+projects: swamid-fiv-test swamid-ki-sll
+
+swamid-ki-sll:
+ $(MAKE) RPI=false CONTACTS=false TOU=false ORG=false swamid-ki-sll-1.0.pub
+
+swamid-fiv-test:
$(MAKE) RPI=false CONTACTS=false TOU=false ORG=false swamid-fiv-test.pub
aggregate: swamid-externals swamid-interfederations
@@ -66,56 +72,22 @@ swamid-interfederations1:
swamid-interfederations2:
scripts/aggregate.sh swamid-interfederations-2.0
-swamid: swamid2 swamid-no-interfederation-combined swamid-discovery swamid-idp swamid-idp-transitive swamid-registered publish
+swamid: swamid-2.0.pub swamid-no-interfederation-combined.pub swamid-discovery.pub swamid-idp.pub swamid-idp-transitive.pub swamid-registered.pub swamid-testing-1.0.pub swamid-testing-idp-1.0.pub
-publish: swamid-tou-en.txt swamid-tou-sv.txt HEADER.html README.html
+web: swamid-tou-en.txt swamid-tou-sv.txt HEADER.html README.html
cp swamid-tou-en.txt swamid-tou-sv.txt sunet-swamid.png HEADER.html README.html $(DEST)
-swamid2-deps: swamid-externals-sp-2.0.xml swamid-interfederations-idp-2.0.xml
-
-swamid2: swamid2-deps
- @saml-md-tool swamid-2.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- @test -s swamid-2.0.xml && cp swamid-2.0.xml $(DEST)
-
swamid-interfederations-idp-2.0.xml: swamid-interfederations-2.0.mxml
@xsltproc --xinclude xslt/extract-idp.xslt swamid-interfederations-2.0.mxml > swamid-interfederations-idp-2.0.xml
swamid-externals-sp-2.0.xml: swamid-externals-2.0.mxml
@xsltproc --xinclude xslt/extract-non-idp.xslt swamid-externals-2.0.mxml > swamid-externals-sp-2.0.xml
-swamid-no-interfederation-combined: swamid2-deps
- @saml-md-tool swamid-no-interfederation-combined update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- @test -s swamid-no-interfederation-combined.xml && cp swamid-no-interfederation-combined.xml $(DEST)
+test: clean dependencies schematest
-swamid-discovery: swamid2-deps
- @saml-md-tool swamid-discovery update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- @test -s swamid-discovery.xml && cp swamid-discovery.xml $(DEST)
-
-swamid-idp: swamid2-deps
- @saml-md-tool swamid-idp update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- test -s swamid-idp.xml && cp swamid-idp.xml $(DEST)
-
-swamid-registered: swamid2-deps
- @saml-md-tool swamid-registered update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- test -s swamid-registered.xml && cp swamid-registered.xml $(DEST)
-
-swamid-idp-transitive: swamid2-deps
- @saml-md-tool swamid-idp-transitive update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- test -s swamid-idp-transitive.xml && cp swamid-idp-transitive.xml $(DEST)
-
-swamid-testing:
- @saml-md-tool swamid-testing-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- @test -s swamid-testing-1.0.xml && cp swamid-testing-1.0.xml $(DEST)
-
-swamid-testing-idp:
- @saml-md-tool swamid-testing-idp-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS) --days=$(DAYS)
- @test -s swamid-testing-idp-1.0.xml && cp swamid-testing-idp-1.0.xml $(DEST)
-
-swamid-ki-sll:
- @saml-md-tool swamid-ki-sll-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
- @test -s swamid-ki-sll-1.0.xml && cp swamid-ki-sll-1.0.xml $(DEST)
+pedantic: clean dependencies schematest refedsRnS geantCoCo
-test: clean swamid2-deps
+schematest:
@for x in $(MXML); do xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $$x 2>&1 ; done | sed 's/fails to validate/&/;s/validates/&/'
@for x in $(MXML); do xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $$x > /dev/null 2>&1 || exit 1 ; done