summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-01-21 12:35:20 +0000
committerdjm <djm@openbsd.org>2019-01-21 12:35:20 +0000
commit48e89353894aa2d36b4e448e501a4eb2f515116f (patch)
tree31db285d192f1e01fc9f4bb7378e34c7fc0546d2
parentadapt to bignum1 API removal and bignum2 API change (diff)
downloadwireguard-openbsd-48e89353894aa2d36b4e448e501a4eb2f515116f.tar.xz
wireguard-openbsd-48e89353894aa2d36b4e448e501a4eb2f515116f.zip
adapt to changes in KEX API and file removals
-rw-r--r--regress/usr.bin/ssh/unittests/kex/Makefile21
-rw-r--r--regress/usr.bin/ssh/unittests/kex/test_kex.c10
2 files changed, 20 insertions, 11 deletions
diff --git a/regress/usr.bin/ssh/unittests/kex/Makefile b/regress/usr.bin/ssh/unittests/kex/Makefile
index 5c61307a325..7b4c644e5fb 100644
--- a/regress/usr.bin/ssh/unittests/kex/Makefile
+++ b/regress/usr.bin/ssh/unittests/kex/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 2017/12/21 00:41:22 djm Exp $
+# $OpenBSD: Makefile,v 1.6 2019/01/21 12:35:20 djm Exp $
PROG=test_kex
SRCS=tests.c test_kex.c
@@ -9,12 +9,21 @@ SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
-SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c
-SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c
-SRCS+=dh.c compat.c
-SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
+SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
SRCS+=cipher-chachapoly.c chacha.c poly1305.c
-SRCS+=smult_curve25519_ref.c
+
+SRCS+= kex.c
+SRCS+= dh.c
+SRCS+= kexdh.c
+SRCS+= kexecdh.c
+SRCS+= kexgex.c
+SRCS+= kexgexc.c
+SRCS+= kexgexs.c
+SRCS+= kexc25519.c
+SRCS+= smult_curve25519_ref.c
+SRCS+= kexgen.c
+SRCS+= kexsntrup4591761x25519.c
+SRCS+= sntrup4591761.c
SRCS+=digest-openssl.c
#SRCS+=digest-libc.c
diff --git a/regress/usr.bin/ssh/unittests/kex/test_kex.c b/regress/usr.bin/ssh/unittests/kex/test_kex.c
index df305e9ff4f..a0d3351f14d 100644
--- a/regress/usr.bin/ssh/unittests/kex/test_kex.c
+++ b/regress/usr.bin/ssh/unittests/kex/test_kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_kex.c,v 1.3 2018/12/27 03:37:49 djm Exp $ */
+/* $OpenBSD: test_kex.c,v 1.4 2019/01/21 12:35:20 djm Exp $ */
/*
* Regress test KEX
*
@@ -138,12 +138,12 @@ do_kex_with_key(char *kex, int keytype, int bits)
sshbuf_free(state);
ASSERT_PTR_NE(server2->kex, NULL);
/* XXX we need to set the callbacks */
- server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
- server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+ server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
+ server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
- server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
- server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
+ server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
+ server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
server2->kex->load_host_public_key = server->kex->load_host_public_key;
server2->kex->load_host_private_key = server->kex->load_host_private_key;
server2->kex->sign = server->kex->sign;