summaryrefslogtreecommitdiff
path: root/regress/misc/kexfuzz
diff options
context:
space:
mode:
Diffstat (limited to 'regress/misc/kexfuzz')
-rw-r--r--regress/misc/kexfuzz/Makefile21
-rw-r--r--regress/misc/kexfuzz/kexfuzz.c18
2 files changed, 23 insertions, 16 deletions
diff --git a/regress/misc/kexfuzz/Makefile b/regress/misc/kexfuzz/Makefile
index a7bb6b70d..20802cb87 100644
--- a/regress/misc/kexfuzz/Makefile
+++ b/regress/misc/kexfuzz/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.3 2017/12/21 05:46:35 djm Exp $ 1# $OpenBSD: Makefile,v 1.4 2019/01/21 12:50:12 djm Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4.include <bsd.obj.mk> 4.include <bsd.obj.mk>
@@ -18,12 +18,21 @@ SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
18SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c 18SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
19SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c 19SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
20SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c 20SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
21SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c 21SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
22SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c
23SRCS+=dh.c compat.c
24SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
25SRCS+=cipher-chachapoly.c chacha.c poly1305.c 22SRCS+=cipher-chachapoly.c chacha.c poly1305.c
26SRCS+=smult_curve25519_ref.c 23
24SRCS+= kex.c
25SRCS+= dh.c
26SRCS+= kexdh.c
27SRCS+= kexecdh.c
28SRCS+= kexgex.c
29SRCS+= kexgexc.c
30SRCS+= kexgexs.c
31SRCS+= kexc25519.c
32SRCS+= smult_curve25519_ref.c
33SRCS+= kexgen.c
34SRCS+= kexsntrup4591761x25519.c
35SRCS+= sntrup4591761.c
27 36
28SRCS+=digest-openssl.c 37SRCS+=digest-openssl.c
29#SRCS+=digest-libc.c 38#SRCS+=digest-libc.c
diff --git a/regress/misc/kexfuzz/kexfuzz.c b/regress/misc/kexfuzz/kexfuzz.c
index 3e2c48160..7051e87b1 100644
--- a/regress/misc/kexfuzz/kexfuzz.c
+++ b/regress/misc/kexfuzz/kexfuzz.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexfuzz.c,v 1.4 2017/04/30 23:34:55 djm Exp $ */ 1/* $OpenBSD: kexfuzz.c,v 1.5 2019/01/21 12:50:12 djm Exp $ */
2/* 2/*
3 * Fuzz harness for KEX code 3 * Fuzz harness for KEX code
4 * 4 *
@@ -29,8 +29,6 @@
29#include "authfile.h" 29#include "authfile.h"
30#include "log.h" 30#include "log.h"
31 31
32struct ssh *active_state = NULL; /* XXX - needed for linking */
33
34void kex_tests(void); 32void kex_tests(void);
35static int do_debug = 0; 33static int do_debug = 0;
36 34
@@ -275,18 +273,18 @@ do_kex_with_key(const char *kex, struct sshkey *prvkey, int *c2s, int *s2c,
275 ASSERT_PTR_NE(server2->kex, NULL); 273 ASSERT_PTR_NE(server2->kex, NULL);
276 /* XXX we need to set the callbacks */ 274 /* XXX we need to set the callbacks */
277#ifdef WITH_OPENSSL 275#ifdef WITH_OPENSSL
278 server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 276 server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
279 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 277 server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
280 server2->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server; 278 server2->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
281 server2->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server; 279 server2->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
282 server2->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server; 280 server2->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
283 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 281 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
284 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 282 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
285# ifdef OPENSSL_HAS_ECC 283# ifdef OPENSSL_HAS_ECC
286 server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server; 284 server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
287# endif 285# endif
288#endif 286#endif
289 server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server; 287 server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
290 server2->kex->load_host_public_key = server->kex->load_host_public_key; 288 server2->kex->load_host_public_key = server->kex->load_host_public_key;
291 server2->kex->load_host_private_key = server->kex->load_host_private_key; 289 server2->kex->load_host_private_key = server->kex->load_host_private_key;
292 server2->kex->sign = server->kex->sign; 290 server2->kex->sign = server->kex->sign;