From f8f323a40f8e0b9f8fa77322628e7fa0664b8cba Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 16 Nov 2019 17:39:50 +0000 Subject: [PATCH] test-example: Test new long-term key arrangements 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 --- stest/common.tcl | 4 ++-- stest/t-nonnego-on | 12 ++++++++++++ stest/t-nonnego-oo | 13 +++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100755 stest/t-nonnego-on create mode 100755 stest/t-nonnego-oo diff --git a/stest/common.tcl b/stest/common.tcl index 65c39b4..fb98c2e 100644 --- a/stest/common.tcl +++ b/stest/common.tcl @@ -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 index 0000000..813d2f8 --- /dev/null +++ b/stest/t-nonnego-on @@ -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 index 0000000..b471844 --- /dev/null +++ b/stest/t-nonnego-oo @@ -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 -- 2.30.2