chiark / gitweb /
legal: Add missing notice to many files
[secnet.git] / stest / t-nonnego-oo
1 #! /usr/bin/tclsh
2 # This file is part of secnet.
3 # See LICENCE and this file CREDITS for full list of copyright holders.
4 # SPDX-License-Identifier: GPL-3.0-or-later
5 # There is NO WARRANTY.
6
7 source stest/common.tcl
8
9 # `non-negotiating' ends:
10 set privkey(inside) {load-private rsa1 test-example/inside.key}
11 set privkey(outside) {load-private rsa1 test-example/outside.key}
12 # So old, old; ie -oo
13
14 # There is no -no because the sites file tells a new inside to expect
15 # a different key.
16
17 proc sitesconf_hook {l} {
18     global builddir
19     # Use `make-public' verb, so we have a test case for it
20     if {[regexp {^(.* key )rsa-public\("(\d+)","(\d+)"\)(;.*)$} \
21              $l dummy lhs rsa_e rsa_n rhs]} {
22         set b91 [exec $builddir/base91s/base91s -w0 << "42 $rsa_e $rsa_n"]
23         set l "${lhs}make-public(\"rsa1\",\"$b91\")${rhs}"
24     }
25     return $l
26 }
27
28 test-kex