From 90c43c174012d0352b4d05859c82c5993cb10f73 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 3 Dec 2019 21:52:07 +0000 Subject: [PATCH] test-example: Make sites.conf variable, in principle In this commit we split the setting of the sites.conf into two branches depending on the value of privkey($site). The path prefix is common - only the leafname varies. Right now there isn't actually any change because both branches use the same sites.conf. The new-style arrangement needs a new-style sites file which isn't there yet. So no functional change. Signed-off-by: Ian Jackson --- stest/common.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stest/common.tcl b/stest/common.tcl index 9a7e38f..bcca102 100644 --- a/stest/common.tcl +++ b/stest/common.tcl @@ -85,6 +85,7 @@ exec cat " switch -glob $privkey { */ { + set sitesconf sites.conf append cfg " key-cache priv-cache({ privkeys \"$builddir/${privkey}priv.\"; @@ -92,11 +93,13 @@ exec cat " } * { + set sitesconf sites.conf append cfg " local-key rsa-private(\"$builddir/$privkey\"); " } } + set sitesconf $builddir/test-example/$sitesconf append cfg $extra($site) append cfg " @@ -119,7 +122,7 @@ exec cat file delete -force $pubkeys exec cp -rl $builddir/test-example/pubkeys $pubkeys - set f [open $builddir/test-example/sites.conf r] + set f [open $sitesconf r] while {[gets $f l] >= 0} { regsub {\"[^\"]*test-example/pubkeys/} $l "\"$pubkeys/" l append cfg $l "\n" -- 2.30.2