From 59053a60ee9c49a6123022120321bfc451458d85 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 3 Dec 2019 23:33:16 +0000 Subject: [PATCH] stest/t-nonnego-oo: Use `make-public' verb This was previously untested. It is awkward to get make-secnet-sites to generate this right now because it wants to generate `rsa-public' calls for rsa1 keys for compatibility reasons. Signed-off-by: Ian Jackson --- stest/Dir.sd.mk | 1 + stest/t-nonnego-oo | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/stest/Dir.sd.mk b/stest/Dir.sd.mk index 5ad6c0c..f3c0685 100644 --- a/stest/Dir.sd.mk +++ b/stest/Dir.sd.mk @@ -4,6 +4,7 @@ &DEPS += & udp-preload.so &DEPS += &^ common.tcl &DEPS += secnet +&DEPS += base91s/base91s &DEPS += test-example/sites.conf &DEPS += test-example/sites-nonego.conf &DEPS += $(test-example_PRIVKEYS) diff --git a/stest/t-nonnego-oo b/stest/t-nonnego-oo index b471844..ab96827 100755 --- a/stest/t-nonnego-oo +++ b/stest/t-nonnego-oo @@ -10,4 +10,15 @@ set privkey(outside) test-example/outside.key # There is no -no because the sites file tells a new inside to expect # a different key. +proc sitesconf_hook {l} { + global builddir + # Use `make-public' verb, so we have a test case for it + if {[regexp {^(.* key )rsa-public\("(\d+)","(\d+)"\)(;.*)$} \ + $l dummy lhs rsa_e rsa_n rhs]} { + set b91 [exec $builddir/base91s/base91s -w0 << "42 $rsa_e $rsa_n"] + set l "${lhs}make-public(\"rsa1\",\"$b91\")${rhs}" + } + return $l +} + test-kex -- 2.30.2