chiark / gitweb /
test-example: Add the inside.key to the privcache too
[secnet.git] / test-example / Dir.sd.mk
index 30813b207c1725d5fd81a02702f3efb7869f13db..e6fca94d2963d4e39d8bf42a07dd74bf3ddffa02 100644 (file)
@@ -1,4 +1,4 @@
-&TARGETS += & sites.conf inside.key outside.key
+&TARGETS += & sites.conf inside.key outside.key all-privkeys
 
 include common.make
 
@@ -8,4 +8,15 @@ include common.make
 &sites.conf: $(src)/make-secnet-sites &^/sites &/Dir.mk
        $(src)/make-secnet-sites &^/sites $@
 
+define privkey
+&/$1.privkeys/priv.$2: &/$3
+       mkdir -p $$(dir $$@) && cp $$< $$@.tmp && mv -f $$@.tmp $$@
+&all-privkeys:: &/$1.privkeys/priv.$2
+&clean::
+       rm -rf &/$1.privkeys
+endef
+
+$(eval $(call privkey,outside,0000000000,outside.key))
+$(eval $(call privkey,inside,0000000000,inside.key))
+
 &CLEAN += *.new