diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-01-21 12:35:20 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-21 23:41:21 +1100 |
commit | 35ecc53a83f8e8baab2e37549addfd05c73c30f1 (patch) | |
tree | ba284a8a42847fe2a206376693ccd48255f21033 /regress/unittests/kex | |
parent | 7d69aae64c35868cc4f644583ab973113a79480e (diff) |
upstream: adapt to changes in KEX API and file removals
OpenBSD-Regress-ID: 92cad022d3b0d11e08f3e0055d6a14b8f994c0d7
Diffstat (limited to 'regress/unittests/kex')
-rw-r--r-- | regress/unittests/kex/Makefile | 21 | ||||
-rw-r--r-- | regress/unittests/kex/test_kex.c | 10 |
2 files changed, 20 insertions, 11 deletions
diff --git a/regress/unittests/kex/Makefile b/regress/unittests/kex/Makefile index 5c61307a3..7b4c644e5 100644 --- a/regress/unittests/kex/Makefile +++ b/regress/unittests/kex/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.5 2017/12/21 00:41:22 djm Exp $ | 1 | # $OpenBSD: Makefile,v 1.6 2019/01/21 12:35:20 djm Exp $ |
2 | 2 | ||
3 | PROG=test_kex | 3 | PROG=test_kex |
4 | SRCS=tests.c test_kex.c | 4 | 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 | |||
9 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | 9 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c |
10 | SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c | 10 | SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c |
11 | SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c | 11 | SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c |
12 | SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c | 12 | SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c |
13 | SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c | ||
14 | SRCS+=dh.c compat.c | ||
15 | SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | ||
16 | SRCS+=cipher-chachapoly.c chacha.c poly1305.c | 13 | SRCS+=cipher-chachapoly.c chacha.c poly1305.c |
17 | SRCS+=smult_curve25519_ref.c | 14 | |
15 | SRCS+= kex.c | ||
16 | SRCS+= dh.c | ||
17 | SRCS+= kexdh.c | ||
18 | SRCS+= kexecdh.c | ||
19 | SRCS+= kexgex.c | ||
20 | SRCS+= kexgexc.c | ||
21 | SRCS+= kexgexs.c | ||
22 | SRCS+= kexc25519.c | ||
23 | SRCS+= smult_curve25519_ref.c | ||
24 | SRCS+= kexgen.c | ||
25 | SRCS+= kexsntrup4591761x25519.c | ||
26 | SRCS+= sntrup4591761.c | ||
18 | 27 | ||
19 | SRCS+=digest-openssl.c | 28 | SRCS+=digest-openssl.c |
20 | #SRCS+=digest-libc.c | 29 | #SRCS+=digest-libc.c |
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c index 112bc5499..a860efc02 100644 --- a/regress/unittests/kex/test_kex.c +++ b/regress/unittests/kex/test_kex.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: test_kex.c,v 1.3 2018/12/27 03:37:49 djm Exp $ */ | 1 | /* $OpenBSD: test_kex.c,v 1.4 2019/01/21 12:35:20 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Regress test KEX | 3 | * Regress test KEX |
4 | * | 4 | * |
@@ -142,14 +142,14 @@ do_kex_with_key(char *kex, int keytype, int bits) | |||
142 | sshbuf_free(state); | 142 | sshbuf_free(state); |
143 | ASSERT_PTR_NE(server2->kex, NULL); | 143 | ASSERT_PTR_NE(server2->kex, NULL); |
144 | /* XXX we need to set the callbacks */ | 144 | /* XXX we need to set the callbacks */ |
145 | server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; | 145 | server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; |
146 | server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; | 146 | server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server; |
147 | server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; | 147 | server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; |
148 | server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; | 148 | server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; |
149 | #ifdef OPENSSL_HAS_ECC | 149 | #ifdef OPENSSL_HAS_ECC |
150 | server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server; | 150 | server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server; |
151 | #endif | 151 | #endif |
152 | server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server; | 152 | server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server; |
153 | server2->kex->load_host_public_key = server->kex->load_host_public_key; | 153 | server2->kex->load_host_public_key = server->kex->load_host_public_key; |
154 | server2->kex->load_host_private_key = server->kex->load_host_private_key; | 154 | server2->kex->load_host_private_key = server->kex->load_host_private_key; |
155 | server2->kex->sign = server->kex->sign; | 155 | server2->kex->sign = server->kex->sign; |