From 0050629bc338d8e2581cb45f2615afc36fb5f24c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Dec 2019 16:05:37 +0000 Subject: [PATCH] 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 --- stest/common.tcl | 6 ++++++ stest/t-nonnego-oo | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 -- 2.30.2