From: Ian Jackson Date: Sun, 29 Dec 2019 14:44:59 +0000 (+0000) Subject: test-example: Generate new style sites.conf X-Git-Tag: v0.6.0~75 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=8c9b0fba1ab3c124a7e51cc4782ad64b8861cada test-example: Generate new style sites.conf The key change here is to make the `normal' test-exampple/sites.conf file be new-style, with peer-keys entries. We also switch the tests to use the old-style file. So the tests in fact run just as before. The directory we give to make-secnet-sites is already mkdir'd, and cleaned, appropriately. Signed-off-by: Ian Jackson --- diff --git a/.gitignore b/.gitignore index 651e93b..761332a 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ test-example/*.key test-example/*.privkeys test-example/pubkeys test-example/sites.conf +test-example/sites-nonego.conf test-example/bogus-setup-request build-stamp diff --git a/stest/Dir.sd.mk b/stest/Dir.sd.mk index be0a8d9..dffa486 100644 --- a/stest/Dir.sd.mk +++ b/stest/Dir.sd.mk @@ -5,6 +5,7 @@ &DEPS += &^ common.tcl &DEPS += secnet &DEPS += test-example/sites.conf +&DEPS += test-example/sites-nonego.conf &DEPS += test-example/inside.key &DEPS += test-example/outside.key &DEPS += test-example/all-privkeys diff --git a/stest/common.tcl b/stest/common.tcl index bcca102..65c39b4 100644 --- a/stest/common.tcl +++ b/stest/common.tcl @@ -93,7 +93,7 @@ exec cat " } * { - set sitesconf sites.conf + set sitesconf sites-nonego.conf append cfg " local-key rsa-private(\"$builddir/$privkey\"); " diff --git a/test-example/Dir.sd.mk b/test-example/Dir.sd.mk index 4e0a134..775eef6 100644 --- a/test-example/Dir.sd.mk +++ b/test-example/Dir.sd.mk @@ -1,13 +1,18 @@ -&TARGETS += & sites.conf inside.key outside.key rsa1-sites2.key all-privkeys +&TARGETS += & sites.conf sites-nonego.conf +&TARGETS += & inside.key outside.key rsa1-sites2.key all-privkeys include common.make &/%.key: &^/%.key.b64 base64 -d <$< >$@.new && mv -f $@.new $@ +&sites-nonego.conf: $(src)/make-secnet-sites &^/sites &/Dir.mk + $(src)/make-secnet-sites --output-version=1 &^/sites $@ + &sites.conf: $(src)/make-secnet-sites &^/sites &/Dir.mk mkdir -p &pubkeys - $(src)/make-secnet-sites --output-version=1 &^/sites $@ + &~/make-secnet-sites --pubkeys-dir=&pubkeys --pubkeys-install \ + &^/sites $@.tmp && mv -f $@.tmp $@ &clean:: rm -rf &pubkeys