diff options
Diffstat (limited to 'regress/unittests')
-rw-r--r-- | regress/unittests/authopt/Makefile | 6 | ||||
-rw-r--r-- | regress/unittests/hostkeys/Makefile | 6 | ||||
-rw-r--r-- | regress/unittests/kex/Makefile | 6 | ||||
-rw-r--r-- | regress/unittests/sshbuf/Makefile | 4 | ||||
-rw-r--r-- | regress/unittests/sshkey/Makefile | 6 | ||||
-rw-r--r-- | regress/unittests/sshkey/common.c | 11 |
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 | ||
3 | PROG=test_authopt | 3 | PROG=test_authopt |
4 | SRCS=tests.c | 4 | SRCS=tests.c |
@@ -7,8 +7,8 @@ SRCS+=auth-options.c | |||
7 | 7 | ||
8 | # From usr.bin/ssh | 8 | # From usr.bin/ssh |
9 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | 9 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c |
10 | SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c | 10 | SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c |
11 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | 11 | SRCS+=ssh-dss.c ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c |
12 | SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c | 12 | SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c |
13 | SRCS+=addrmatch.c bitmap.c | 13 | SRCS+=addrmatch.c bitmap.c |
14 | SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | 14 | SRCS+=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 | ||
3 | PROG=test_hostkeys | 3 | PROG=test_hostkeys |
4 | SRCS=tests.c test_iterate.c | 4 | SRCS=tests.c test_iterate.c |
5 | 5 | ||
6 | # From usr.bin/ssh | 6 | # From usr.bin/ssh |
7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | 7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c |
8 | SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c | 8 | SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c |
9 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | 9 | SRCS+=ssh-dss.c 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 hostfile.c | 11 | SRCS+=addrmatch.c bitmap.c hostfile.c |
12 | SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | 12 | SRCS+=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 | ||
3 | PROG=test_kex | 3 | PROG=test_kex |
4 | SRCS=tests.c test_kex.c | 4 | SRCS=tests.c test_kex.c |
5 | 5 | ||
6 | # From usr.bin/ssh | 6 | # From usr.bin/ssh |
7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | 7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c |
8 | SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c | 8 | SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c |
9 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | 9 | SRCS+=ssh-dss.c 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+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | 12 | SRCS+=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 |
16 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | 16 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c |
17 | SRCS+=atomicio.c | 17 | SRCS+=sshbuf-io.c atomicio.c misc.c xmalloc.c log.c fatal.c ssherr.c cleanup.c |
18 | 18 | ||
19 | run-regress-${PROG}: ${PROG} | 19 | run-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 | ||
3 | PROG=test_sshkey | 3 | PROG=test_sshkey |
4 | SRCS=tests.c test_sshkey.c test_file.c test_fuzz.c common.c | 4 | SRCS=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 |
7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c | 7 | SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c |
8 | SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c | 8 | SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c |
9 | SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c | 9 | SRCS+=ssh-dss.c 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 | 11 | SRCS+=addrmatch.c bitmap.c |
12 | SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c | 12 | SRCS+=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 @@ | |||
43 | struct sshbuf * | 43 | struct sshbuf * |
44 | load_file(const char *name) | 44 | load_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 | ||