summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0221a78e330a96b5caffef001b1efccbd5c61586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

KEY=signer.key
CERT=signer.crt
PASS=$(shell cat /local/swamid-signer-pass.txt)

all: update clean sign

update:
	@svn up -q

keys: $(KEY) $(CERT)

sign: keys swamid nya

urn-mace-swami.se-swamid-test-1.0-metadata.mxml:
	@sed 's!http://md.swamid.se/md/swamid-1.0.xml!urn:mace:swami.se:swamid:test-1.0!g' < swamid-1.0.mxml > urn-mace-swami.se-swamid-test-1.0-metadata.mxml

swamid-compat: urn-mace-swami.se-swamid-test-1.0-metadata.mxml
	@saml-md-tool urn-mace-swami.se-swamid-test-1.0-metadata update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
	@test -s urn-mace-swami.se-swamid-test-1.0-metadata-unsigned.xml && cp urn-mace-swami.se-swamid-test-1.0-metadata-unsigned.xml /local/saml-metadata/do-not-use.xml
	@test -s urn-mace-swami.se-swamid-test-1.0-metadata.xml && cp urn-mace-swami.se-swamid-test-1.0-metadata.xml /local/saml-metadata/do-not-use-signed.xml

swamid:
	@saml-md-tool swamid-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
	@test -s swamid-1.0.xml && cp swamid-1.0.xml /local/saml-metadata

nya:
	@saml-md-tool nya-1.0 update --key=$(KEY) --cert=$(CERT) --pwd=$(PASS)
	@test -s nya-1.0.xml && cp nya-1.0.xml /local/saml-metadata

clean:
	@rm -f *.xml