diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2016-09-12 02:25:46 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-09-14 10:57:21 +1000 |
commit | 44d82fc83be6c5ccd70881c2dac1a73e5050398b (patch) | |
tree | 9e888d20ff2cf178f917d7710d859e6e0e815d01 | |
parent | 44e5f756d286bc3a1a5272ea484ee276ba3ac5c2 (diff) |
upstream commit
Add testcase for ssh-keygen -j, -J and -K options for
moduli screening. Does not currently test generation as that is extremely
slow.
Upstream-Regress-ID: 9de6ce801377ed3ce0a63a1413f1cd5fd3c2d062
-rw-r--r-- | regress/Makefile | 3 | ||||
-rw-r--r-- | regress/keygen-moduli.sh | 15 | ||||
-rw-r--r-- | regress/moduli.in | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/regress/Makefile b/regress/Makefile index 2910f13ab..e9121f5f6 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.88 2016/06/03 04:10:41 dtucker Exp $ | 1 | # $OpenBSD: Makefile,v 1.89 2016/09/12 02:25:46 dtucker Exp $ |
2 | 2 | ||
3 | REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t-exec | 3 | REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t-exec |
4 | tests: prep $(REGRESS_TARGETS) | 4 | tests: prep $(REGRESS_TARGETS) |
@@ -39,6 +39,7 @@ LTESTS= connect \ | |||
39 | keyscan \ | 39 | keyscan \ |
40 | keygen-change \ | 40 | keygen-change \ |
41 | keygen-convert \ | 41 | keygen-convert \ |
42 | keygen-moduli \ | ||
42 | key-options \ | 43 | key-options \ |
43 | scp \ | 44 | scp \ |
44 | sftp \ | 45 | sftp \ |
diff --git a/regress/keygen-moduli.sh b/regress/keygen-moduli.sh new file mode 100644 index 000000000..4be7b4d63 --- /dev/null +++ b/regress/keygen-moduli.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | # $OpenBSD: keygen-moduli.sh,v 1.1 2016/09/12 02:25:46 dtucker Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="keygen moduli" | ||
5 | |||
6 | for i in 0 1 2; do | ||
7 | rm -f $OBJ/moduli.out $OBJ/moduli.ckpt | ||
8 | ${SSHKEYGEN} -T $OBJ/moduli.out -f ${SRC}/moduli.in -j$i -J1 \ | ||
9 | -K $OBJ/moduli.ckpt 2>/dev/null || \ | ||
10 | fail "keygen screen failed line $i" | ||
11 | lines=`wc -l <$OBJ/moduli.out` | ||
12 | test "$lines" -eq "1" || fail "expected 1 line, got $lines" | ||
13 | done | ||
14 | |||
15 | rm -f $OBJ/moduli.out $OBJ/moduli.ckpt | ||
diff --git a/regress/moduli.in b/regress/moduli.in new file mode 100644 index 000000000..e69c902a2 --- /dev/null +++ b/regress/moduli.in | |||
@@ -0,0 +1,3 @@ | |||
1 | 20160301052556 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D19F4647 | ||
2 | 20160301052601 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1A5C13B | ||
3 | 20160301052612 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1B7A3EF | ||