From: Ian Jackson Date: Sun, 1 Dec 2019 14:00:41 +0000 (+0000) Subject: mtest: Use --pubkeys-elide instead of --output-version X-Git-Tag: v0.6.0~71 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=4a79050421372213cc6f846301d81c9815d0dffb mtest: Use --pubkeys-elide instead of --output-version We don't want our basic tests of make-secnet-sites to produce an artificially old output version. But also it's not really convenient for these tests to make a pubkeys directory. (That functionality is tested by test-example's sites.conf generator and stest's uses of the resulting pubkeys directory.) So use --pubkeys-elide, conveniently producing a test case for that option, which we were previously lacking. Because we don't pass --pubkeys-dir, the result is that the output paths contain the default pubkeys directory. That's OK. Signed-off-by: Ian Jackson --- diff --git a/mtest/e-basic.conf b/mtest/e-basic.conf index 5e228fe..4883dbc 100644 --- a/mtest/e-basic.conf +++ b/mtest/e-basic.conf @@ -15,7 +15,7 @@ vpn-data { in { inside { name "test-example/in/inside"; - key rsa-public("65537","130064631890186713927887504218626486455931306300999583387009075747001546036643522074275473238061323169592347601185592753550279410171535737146240085267000508853176463710554801101055212967131924064664249613912656320653505750073021702169423354903540699008756137338575553686987244488914481168225136440872431691669"); + peer-keys "/var/lib/secnet/pubkeys/peer.inside"; address "[127.0.0.1]"; port 16910; mobile True; link netlink { @@ -27,7 +27,7 @@ vpn-data { out { outside { name "test-example/out/outside"; - key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); + peer-keys "/var/lib/secnet/pubkeys/peer.outside"; address "[::1]"; port 16900; link netlink { routes "172.18.232.0/29"; diff --git a/mtest/t-basic b/mtest/t-basic index 8f22500..34a4ad0 100755 --- a/mtest/t-basic +++ b/mtest/t-basic @@ -2,7 +2,7 @@ source mtest/common.tcl -run-mss --no-conf-key-prefix --output-version=1 test-example/sites $tmp/out.conf +run-mss --no-conf-key-prefix --pubkeys-elide test-example/sites $tmp/out.conf set seddery { sed -n 's/^[ \t]*//; /^[^#]/p' } diff mtest/e-basic.conf $tmp/out.conf $seddery diff --git a/mtest/t-prefix b/mtest/t-prefix index ee9938d..d53b3cb 100755 --- a/mtest/t-prefix +++ b/mtest/t-prefix @@ -2,7 +2,7 @@ source mtest/common.tcl -run-mss -Ppprefix --no-conf-key-prefix --output-version=1 test-example/sites $tmp/out.conf +run-mss -Ppprefix --no-conf-key-prefix --pubkeys-elide test-example/sites $tmp/out.conf diff mtest/e-basic.conf $tmp/out.conf \ "sed -e 's/vpn/pprefixvpn/g; s/^all-sites/pprefix&/' | $seddery" \