chiark / gitweb /
test-example: Test new long-term key arrangements
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Nov 2019 17:39:50 +0000 (17:39 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +0000)
Finally we can test this!

Specifically, we switch the defaults to the privkeys directories,
which affects the existing t-basic-kex test.  We introduce two new
tests for testing the old arrangements.

The consequences for the t-basic-kex test are:
 * Use the sites file generated with --install-pubkeys, thus
   testing the new make-secnet-sites.
 * Use peer-keys, so testing secnet's new pubkey loading
   mechanisms.
 * Use priv-cache, so testing secnet's new privkey loading
   mechanisms.
 * Test the new public key choice negotation mechanism.

The old tests tests the compatibility of the key choice negotiation
mechanism, as well as the capability to generate
old-style (compatible) sites.conf files.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stest/common.tcl
stest/t-nonnego-on [new file with mode: 0755]
stest/t-nonnego-oo [new file with mode: 0755]

index 65c39b465837b63b6b025c19258441b0dcd5687f..fb98c2ecf5edfb11051572f0031792912c398523 100644 (file)
@@ -25,8 +25,8 @@ set extra(inside) {
 }
 set extra(outside) {}
 
-set privkey(inside) test-example/inside.key
-set privkey(outside) test-example/outside.key
+set privkey(inside) test-example/inside.privkeys/
+set privkey(outside) test-example/outside.privkeys/
 
 proc mkconf {location site} {
     global tmp
diff --git a/stest/t-nonnego-on b/stest/t-nonnego-on
new file mode 100755 (executable)
index 0000000..813d2f8
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/tclsh
+
+source stest/common.tcl
+
+# `non-negotiating' ends:
+set privkey(inside) test-example/inside.key
+# So old, new; ie -on
+
+# There is no -no because the sites file tells a new inside to expect
+# a different key.
+
+test-kex
diff --git a/stest/t-nonnego-oo b/stest/t-nonnego-oo
new file mode 100755 (executable)
index 0000000..b471844
--- /dev/null
@@ -0,0 +1,13 @@
+#! /usr/bin/tclsh
+
+source stest/common.tcl
+
+# `non-negotiating' ends:
+set privkey(inside) test-example/inside.key
+set privkey(outside) test-example/outside.key
+# So old, old; ie -oo
+
+# There is no -no because the sites file tells a new inside to expect
+# a different key.
+
+test-kex