summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 25 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 854fd99a..155d1aaa 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,14 @@ KEY=/opt/swamid-credentials/swamid-signer.key
CERT=/opt/swamid-credentials/swamid-signer.crt
PASS=$(shell cat /opt/swamid-credentials/swamid-signer-pass.txt)
DEST=/opt/published-metadata
-DAYS=1
-all: update clean sign
+DAYS:=1
+DATE=$(shell perl scripts/expiration_date.pl $(DAYS))
+RPI=false
+CONTACTS=false
+XSLTDEFS := --stringparam rpi $(RPI) --stringparam defaultContact $(CONTACTS) --stringparam date $(DATE)
+
+all: update clean sign clean
update:
# @svn up -q
@@ -14,7 +19,23 @@ keys: $(KEY) $(CERT)
MXML=$(shell echo *.mxml)
-sign: keys swamid nya nya-testing swamid-testing swamid-testing-idp swamid-kalmar swamid-kalmar-testing swamid-edugain-testing swamid-edugain swamid-ki-sll swamid-fiv-test
+sign: keys swamid nya nya-testing swamid-testing swamid-testing-idp upstream swamid-ki-sll swamid-fiv-test
+
+%.sig: %.mxml
+ xsltproc $(XSLTDEFS) --xinclude xslt/swamid-sign.xsl $< > $*.tbs
+ xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $*.tbs
+ xmlsec1 --sign --privkey-pem $(KEY),$(CERT) --pwd $(PASS) --output $@ $*.tbs
+ rm -f $*.tbs
+
+%.pub: %.sig
+ @test -s $< && xmllint --format --nsclean $< $(DEST)/$*.xml
+
+upstream: edugain kalmar
+
+kalmar: swamid-kalmar swamid-kalmar-testing
+
+edugain:
+ $(MAKE) RPI=true CONTACTS=true swamid-edugain-testing-1.0.pub swamid-edugain-1.0.pub
swamid-externals: swamid-externals1 swamid-externals2
@@ -91,14 +112,6 @@ swamid-testing-idp:
@saml-md-tool swamid-testing-idp-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
@test -s swamid-testing-idp-1.0.xml && cp swamid-testing-idp-1.0.xml $(DEST)
-swamid-edugain-testing:
- @saml-md-tool swamid-edugain-testing-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
- @test -s swamid-edugain-testing-1.0.xml && cp swamid-edugain-testing-1.0.xml $(DEST)
-
-swamid-edugain:
- @saml-md-tool swamid-edugain-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
- @test -s swamid-edugain-1.0.xml && cp swamid-edugain-1.0.xml $(DEST)
-
swamid-kalmar:
@saml-md-tool swamid-kalmar-1.0 update --days=2 --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
@test -s swamid-kalmar-1.0.xml && cp swamid-kalmar-1.0.xml $(DEST)
@@ -119,4 +132,4 @@ test: swamid2-deps
@for x in $(MXML); do xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $$x; done
clean:
- @rm -f *.xml
+ @rm -f *.xml *.tbs