This will let us test setting the `hash' key, which controls hashing
for algorithms which don't imply the hash. In particular it will let
us test things other than the sha1 which we previously hardcoded.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
set privkey(outside) test-example/outside.privkeys/
set initiator inside
+set hashclosure sha1
proc sitesconf_hook {l} { return $l }
global ports
global extra
global netlinkfh
+ global hashclosure
upvar #0 privkey($site) privkey
set pipefp $tmp/$site.netlink
foreach tr {t r} {
"
close $fakeuh
set cfg "
- hash sha1;
+ hash $hashclosure;
netlink userv-ipif {
name \"netlink\";
userv-path \"$fakeuf\";
set f [open $sitesconf r]
while {[gets $f l] >= 0} {
regsub {\"[^\"]*test-example/pubkeys/} $l "\"$pubkeys/" l
+ regsub {hash sha1;$} $l "hash $hashclosure;" l
set l [sitesconf_hook $l]
append cfg $l "\n"
}