From: Ian Jackson Date: Sat, 7 Dec 2019 16:05:37 +0000 (+0000) Subject: stest: Add test for load-private X-Git-Tag: v0.6.0~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0050629bc338d8e2581cb45f2615afc36fb5f24c;p=secnet.git stest: Add test for load-private The resulting interface for privkey() is a bit odd: it's either a list of a string, and we look at both ends. Ah well, it's only test code. Signed-off-by: Ian Jackson --- diff --git a/stest/common.tcl b/stest/common.tcl index 6ab275e..239179a 100644 --- a/stest/common.tcl +++ b/stest/common.tcl @@ -99,6 +99,12 @@ exec cat key-cache priv-cache({ privkeys \"$builddir/${privkey}priv.\"; }); +" + } + {load-private *} { + set sitesconf sites-nonego.conf + append cfg " + local-key load-private(\"[lindex $privkey 1]\",\"$builddir/[lindex $privkey 2]\"); " } * { diff --git a/stest/t-nonnego-oo b/stest/t-nonnego-oo index ab96827..1633d6a 100755 --- a/stest/t-nonnego-oo +++ b/stest/t-nonnego-oo @@ -3,8 +3,8 @@ source stest/common.tcl # `non-negotiating' ends: -set privkey(inside) test-example/inside.key -set privkey(outside) test-example/outside.key +set privkey(inside) {load-private rsa1 test-example/inside.key} +set privkey(outside) {load-private rsa1 test-example/outside.key} # So old, old; ie -oo # There is no -no because the sites file tells a new inside to expect