chiark / gitweb /
test-example: Generate new style sites.conf
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 14:44:59 +0000 (14:44 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +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/Dir.sd.mk
stest/common.tcl
test-example/Dir.sd.mk

index 651e93bd83d980aebb5010b38af2a8a9b2d72ec0..761332a2f876547b6f5fd2d4efe187d55a658974 100644 (file)
@@ -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
 
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 4e0a1347c4fb418d57b4bf23c79464c91e9f3325..775eef6ae616e501b66fd381baf85c06dcb83f2f 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 &/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