summaryrefslogtreecommitdiff
path: root/regress/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests')
-rw-r--r--regress/unittests/authopt/Makefile6
-rw-r--r--regress/unittests/hostkeys/Makefile6
-rw-r--r--regress/unittests/kex/Makefile6
-rw-r--r--regress/unittests/sshbuf/Makefile4
-rw-r--r--regress/unittests/sshkey/Makefile6
-rw-r--r--regress/unittests/sshkey/common.c11
6 files changed, 18 insertions, 21 deletions
diff --git a/regress/unittests/authopt/Makefile b/regress/unittests/authopt/Makefile
index dfec25174..492092fc6 100644
--- a/regress/unittests/authopt/Makefile
+++ b/regress/unittests/authopt/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.3 2019/11/25 10:32:35 djm Exp $ 1# $OpenBSD: Makefile,v 1.4 2020/01/26 00:09:50 djm Exp $
2 2
3PROG=test_authopt 3PROG=test_authopt
4SRCS=tests.c 4SRCS=tests.c
@@ -7,8 +7,8 @@ SRCS+=auth-options.c
7 7
8# From usr.bin/ssh 8# From usr.bin/ssh
9SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c 9SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
10SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c 10SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c
11SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c 11SRCS+=ssh-dss.c ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
12SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c 12SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
13SRCS+=addrmatch.c bitmap.c 13SRCS+=addrmatch.c bitmap.c
14SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c 14SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
diff --git a/regress/unittests/hostkeys/Makefile b/regress/unittests/hostkeys/Makefile
index e3632c43d..c0a893135 100644
--- a/regress/unittests/hostkeys/Makefile
+++ b/regress/unittests/hostkeys/Makefile
@@ -1,12 +1,12 @@
1# $OpenBSD: Makefile,v 1.6 2019/11/25 10:32:35 djm Exp $ 1# $OpenBSD: Makefile,v 1.7 2020/01/26 00:09:50 djm Exp $
2 2
3PROG=test_hostkeys 3PROG=test_hostkeys
4SRCS=tests.c test_iterate.c 4SRCS=tests.c test_iterate.c
5 5
6# From usr.bin/ssh 6# From usr.bin/ssh
7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c 7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
8SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c 8SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c
9SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c 9SRCS+=ssh-dss.c ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c 10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
11SRCS+=addrmatch.c bitmap.c hostfile.c 11SRCS+=addrmatch.c bitmap.c hostfile.c
12SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c 12SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
diff --git a/regress/unittests/kex/Makefile b/regress/unittests/kex/Makefile
index c897a7ef5..648006c78 100644
--- a/regress/unittests/kex/Makefile
+++ b/regress/unittests/kex/Makefile
@@ -1,12 +1,12 @@
1# $OpenBSD: Makefile,v 1.8 2019/11/25 10:32:35 djm Exp $ 1# $OpenBSD: Makefile,v 1.9 2020/01/26 00:09:50 djm Exp $
2 2
3PROG=test_kex 3PROG=test_kex
4SRCS=tests.c test_kex.c 4SRCS=tests.c test_kex.c
5 5
6# From usr.bin/ssh 6# From usr.bin/ssh
7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c 7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
8SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c 8SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c
9SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c 9SRCS+=ssh-dss.c ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c 10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
11SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c 11SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
12SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c 12SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
diff --git a/regress/unittests/sshbuf/Makefile b/regress/unittests/sshbuf/Makefile
index 0e8e9fd10..388cb5a78 100644
--- a/regress/unittests/sshbuf/Makefile
+++ b/regress/unittests/sshbuf/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.7 2018/10/17 23:28:05 djm Exp $ 1# $OpenBSD: Makefile,v 1.8 2020/01/26 00:09:50 djm Exp $
2 2
3.include <bsd.regress.mk> 3.include <bsd.regress.mk>
4 4
@@ -14,7 +14,7 @@ SRCS+=test_sshbuf_fixed.c
14 14
15# From usr.bin/ssh 15# From usr.bin/ssh
16SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c 16SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
17SRCS+=atomicio.c 17SRCS+=sshbuf-io.c atomicio.c misc.c xmalloc.c log.c fatal.c ssherr.c cleanup.c
18 18
19run-regress-${PROG}: ${PROG} 19run-regress-${PROG}: ${PROG}
20 env ${TEST_ENV} ./${PROG} ${UNITTEST_ARGS} 20 env ${TEST_ENV} ./${PROG} ${UNITTEST_ARGS}
diff --git a/regress/unittests/sshkey/Makefile b/regress/unittests/sshkey/Makefile
index 607a6d3fd..78b2cf0ce 100644
--- a/regress/unittests/sshkey/Makefile
+++ b/regress/unittests/sshkey/Makefile
@@ -1,12 +1,12 @@
1# $OpenBSD: Makefile,v 1.8 2019/11/25 10:32:35 djm Exp $ 1# $OpenBSD: Makefile,v 1.9 2020/01/26 00:09:50 djm Exp $
2 2
3PROG=test_sshkey 3PROG=test_sshkey
4SRCS=tests.c test_sshkey.c test_file.c test_fuzz.c common.c 4SRCS=tests.c test_sshkey.c test_file.c test_fuzz.c common.c
5 5
6# From usr.bin/ssh 6# From usr.bin/ssh
7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c 7SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
8SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c 8SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c
9SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c 9SRCS+=ssh-dss.c ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c 10SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
11SRCS+=addrmatch.c bitmap.c 11SRCS+=addrmatch.c bitmap.c
12SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c 12SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c
index e21638093..effea578c 100644
--- a/regress/unittests/sshkey/common.c
+++ b/regress/unittests/sshkey/common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: common.c,v 1.3 2018/09/13 09:03:20 djm Exp $ */ 1/* $OpenBSD: common.c,v 1.4 2020/01/26 00:09:50 djm Exp $ */
2/* 2/*
3 * Helpers for key API tests 3 * Helpers for key API tests
4 * 4 *
@@ -43,13 +43,10 @@
43struct sshbuf * 43struct sshbuf *
44load_file(const char *name) 44load_file(const char *name)
45{ 45{
46 int fd; 46 struct sshbuf *ret = NULL;
47 struct sshbuf *ret;
48 47
49 ASSERT_PTR_NE(ret = sshbuf_new(), NULL); 48 ASSERT_INT_EQ(sshbuf_load_file(test_data_file(name), &ret), 0);
50 ASSERT_INT_NE(fd = open(test_data_file(name), O_RDONLY), -1); 49 ASSERT_PTR_NE(ret, NULL);
51 ASSERT_INT_EQ(sshkey_load_file(fd, ret), 0);
52 close(fd);
53 return ret; 50 return ret;
54} 51}
55 52