chiark / gitweb /
stest: Add test for load-private
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 16:05:37 +0000 (16:05 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:54 +0000 (21:56 +0000)
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 <ijackson@chiark.greenend.org.uk>
stest/common.tcl
stest/t-nonnego-oo

index 6ab275ecadbfef231f77980ef0c3f9d5fb34392d..239179a375995183283ba6f5d52591d06257d434 100644 (file)
@@ -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]\");
 "
        }
        * {
index ab96827cca2d914edb110c9b08d16812c23ab2b5..1633d6a408f4e1f4683e2e5bb6833e60d10d99c8 100755 (executable)
@@ -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