chiark / gitweb /
test-example: Generate new style sites.conf
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 3 Dec 2019 20:45:43 +0000 (20:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 21:52:07 +0000 (21:52 +0000)
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 <ijackson@chiark.greenend.org.uk>
.gitignore
stest/Subdir.sd.mk
stest/common.tcl
test-example/Subdir.sd.mk

index 42dd54b7f6af651ce436dada121df7a9dd2e490f..3d3acd2f86e8d5c6611681a9db7f15bfc4f32e8e 100644 (file)
@@ -46,6 +46,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
 
index be0a8d9ea9db9be4182ff185f36f77147f8d0cc9..dffa4869344af4981eed1aebcedf05a2b30b2ab9 100644 (file)
@@ -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
index bcca102c49b9db77a143a0930bbb7e0796c37def..65c39b465837b63b6b025c19258441b0dcd5687f 100644 (file)
@@ -93,7 +93,7 @@ exec cat
 "
        }
        * {
-           set sitesconf sites.conf
+           set sitesconf sites-nonego.conf
            append cfg "
                local-key rsa-private(\"$builddir/$privkey\");
 "
index e7e6f9c74ce5a61aca972903cec4b4ff0ef125b2..41aaec5c20efc4bb6c3e9b4ccdb2ba85660913d1 100644 (file)
@@ -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 &/Subdir.mk
+       $(src)/make-secnet-sites --output-version=1 &^/sites $@
+
 &sites.conf: $(src)/make-secnet-sites &^/sites &/Subdir.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