Commit Graph

1083 Commits

Author SHA1 Message Date
Damien Miller a5dfc5bae8 allow a fuzz case to contain more than one request
loop until input buffer empty, no message consumed or 256 messages
processed
2021-01-30 16:32:29 +11:00
Damien Miller 0ef24ad602 expect fuzz cases to have length prefix
might make life a little easier for the fuzzer, e.g. it can now
produce valid (multi-request) messages by smashing two cases together.
2021-01-30 16:28:23 +11:00
Damien Miller de613f2713 ssh-agent fuzzer 2021-01-30 13:18:30 +11:00
Damien Miller 7e96c877bc move keys out of kex_fuzz.cc into separate header
add certificates and missing key types
2021-01-30 12:02:46 +11:00
Damien Miller 76f46d7566 some fixed test data (mostly keys) for fuzzing 2021-01-30 12:02:10 +11:00
djm@openbsd.org 7c2e3d6de1 upstream: add a SK_DUMMY_INTEGRATE define that allows the dummy
security key middleware to be directly linked; useful for writing fuzzers,
etc.

OpenBSD-Regress-ID: 0ebd00159b58ebd85e61d8270fc02f1e45df1544
2021-01-30 11:58:38 +11:00
Damien Miller 1e660115f0 fuzz diffie-hellman-group-exchange-sha1 kex too 2021-01-29 11:09:14 +11:00
Damien Miller be5f0048ea support for running kex fuzzer with null cipher 2021-01-29 11:03:35 +11:00
Damien Miller 1134a48cdc correct kex name in disabled code 2021-01-28 08:57:31 +11:00
dtucker@openbsd.org 6ffdcdda12 upstream: Fix long->int for convtime tests here too. Spotted by
tobhe@.

OpenBSD-Regress-ID: a87094f5863312d00938afba771d25f788c849d0
2021-01-22 16:07:02 +11:00
dtucker@openbsd.org a8e798feab upstream: Change types in convtime() unit test to int to match change
its new type. Add tests for boundary conditions and fix convtime to work up
to INT_MAX. ok djm@

OpenBSD-Regress-ID: ba2b81e9a3257fff204b020affe85b604a44f97e
2021-01-18 18:44:03 +11:00
anatasluo 1050109b4b Remove duplicated declaration in fatal.c . 2021-01-12 07:08:26 +11:00
dtucker@openbsd.org ba328bd7a6 upstream: Adjust kexfuzz to addr.c/addrmatch.c split.
OpenBSD-Regress-ID: 1d8d23bb548078020be2fb52c4c643efb190f0eb
2021-01-11 15:24:31 +11:00
dtucker@openbsd.org b08ef25552 upstream: Update unittests for addr.c/addrmatch.c split.
OpenBSD-Regress-ID: de2b415fb7af084a91c6ef147a90482d8f771eef
2021-01-11 15:24:31 +11:00
Damien Miller 5c1953bf98 adapt KEX fuzzer to PQ kex change 2020-12-29 12:40:54 +11:00
djm@openbsd.org 659864fe81 upstream: Adapt to replacement of
sntrup4591761x25519-sha512@tinyssh.org with
sntrup761x25519-sha512@openssh.com.

Also test sntrup761x25519-sha512@openssh.com in unittests/kex

OpenBSD-Regress-ID: cfa3506b2b077a9cac1877fb521efd2641b6030c
2020-12-29 12:39:40 +11:00
Damien Miller 3e9811e57b ensure $LOGNAME is set in tests 2020-12-22 18:31:50 +11:00
djm@openbsd.org 3eb647cbb3 upstream: more detail for failing tests
OpenBSD-Regress-ID: c68c0e5a521cad7e7f68e54c54ebf86d6c10ee1d
2020-12-22 17:48:31 +11:00
djm@openbsd.org 2873f19570 upstream: regress test for KnownHostsCommand
OpenBSD-Regress-ID: ffc77464320b6dabdcfa0a72e0df02659233a38a
2020-12-22 17:07:38 +11:00
dtucker@openbsd.org 649205fe38 upstream: Remove explicit rijndael-cbc@lysator.liu.se test since the
cipher was removed.

OpenBSD-Regress-ID: aa93cddb4ecd9bc21446a79008a1a53050e64f17
2020-12-22 10:30:23 +11:00
djm@openbsd.org d97fb87972 upstream: adapt to API change in hostkeys_foreach()/load_hostkeys()
OpenBSD-Regress-ID: dcb468514f32da49a446372453497dc6eeafdbf3
2020-12-21 14:04:08 +11:00
djm@openbsd.org bf7eb3c266 upstream: few more things needs match.c and addrmatch.c now that
log.c calls match_pattern_list()

OpenBSD-Regress-ID: f7c95c76b150d0aeb00a67858b9579b7d1b2db74
2020-12-21 14:04:08 +11:00
Darren Tucker 2c64f24e27 Pull in missing rev 1.2. 2020-12-21 14:02:56 +11:00
Damien Miller a5ab499bd2 basic KEX fuzzer; adapted from Markus' unittest 2020-12-04 14:01:27 +11:00
Damien Miller 021ff33e38 use options that work with recent clang 2020-12-04 13:57:43 +11:00
Darren Tucker 637017a7dd Use "=" not "==" in string test.
POSIX says "=" is string comparison and some shells (eg HP-UX) will
complain about "==".
2020-11-25 17:38:46 +11:00
djm@openbsd.org 816036f142 upstream: use the new variant log macros instead of prepending
__func__ and appending ssh_err(r) manually; ok markus@

OpenBSD-Commit-ID: 1f14b80bcfa85414b2a1a6ff714fb5362687ace8
2020-10-18 23:46:29 +11:00
Damien Miller d55dfed34e missing header 2020-10-17 22:55:24 +11:00
Damien Miller 999d7cb79a sync regress/misc/sk-dummy/fatal.c 2020-10-17 22:47:52 +11:00
Damien Miller 0f938f9986 adapt sk-dummy's fatal implementation to changes 2020-10-17 11:42:26 +11:00
Damien Miller afbd9ec9e2 fix netcat build problem 2020-10-17 11:33:13 +11:00
wangxp006 67146c7d02 fix TEST_MALLOC_OPTIONS var 2020-10-08 21:15:17 +11:00
djm@openbsd.org e8dfca9bfe upstream: remove GlobalKnownHostsFile for this test after
UpdateHostkeys change

OpenBSD-Regress-ID: a940ad79d59343319613ba8fc46b6ef24aa3f8e1
2020-10-07 17:39:17 +11:00
djm@openbsd.org bbf20ac806 upstream: adapt to SSH_SK_VERSION_MAJOR crank
OpenBSD-Regress-ID: 0f3e76bdc8f9dbd9d22707c7bdd86051d5112ab8
2020-09-09 13:12:29 +10:00
dtucker@openbsd.org 9afe2a1508 upstream: Ensure that address/mask mismatches are flagged at
config-check time. ok djm@

OpenBSD-Regress-ID: 8f5f4c2c0bf00e6ceae7a1755a444666de0ea5c2
2020-09-09 13:12:29 +10:00
djm@openbsd.org e32479645c upstream: adapt to API changes
OpenBSD-Regress-ID: 5f147990cb67094fe554333782ab268a572bb2dd
2020-08-27 13:58:23 +10:00
djm@openbsd.org 9cbbdc12cb upstream: dummy firmware needs to match API version numner crank (for
verify-required resident keys) even though it doesn't implement this feature

OpenBSD-Regress-ID: 86579ea2891e18e822e204413d011b2ae0e59657
2020-08-27 12:16:23 +10:00
Darren Tucker 62c81ef531 Skip ECDSA-SK webauthn test when built w/out ECC 2020-07-20 22:12:07 +10:00
dtucker@openbsd.org 40649bd082 upstream: Add test for '%k' (HostKeyAlias) TOKEN.
OpenBSD-Regress-ID: 8ed1ba1a811790031aad3fcea860a34ad7910456
2020-07-17 18:03:12 +10:00
dtucker@openbsd.org 6736fe6807 upstream: Add tests for expansions on UserKnownHostsFile.
OpenBSD-Regress-ID: bccf8060306c841bbcceb1392644f906a4d6ca51
2020-07-17 13:53:04 +10:00
dtucker@openbsd.org 9c9ddc1391 upstream: Fix previous by calling the correct function.
OpenBSD-Regress-ID: 821cdd1dff9c502cceff4518b6afcb81767cad5a
2020-07-15 17:11:08 +10:00
dtucker@openbsd.org f1a4798941 upstream: Update test to match recent change in match.c
OpenBSD-Regress-ID: 965bda1f95f09a765050707340c73ad755f41167
2020-07-15 16:01:29 +10:00
dtucker@openbsd.org 03da4c2b70 upstream: Use $OBJ to find key files. Fixes test when run on an obj
directory (on OpenBSD) or out of tree (in Portable).

OpenBSD-Regress-ID: 938fa8ac86adaa527d64a305bd2135cfbb1c0a17
2020-07-15 15:02:52 +10:00
Darren Tucker 73f20f195a Wrap stdint.h in ifdef HAVE_STDINT_H. 2020-07-04 23:11:59 +10:00
djm@openbsd.org e073106f37 upstream: regress test for ssh-add -d; ok dtucker@
OpenBSD-Regress-ID: 3a2e044be616afc7dd4f56c100179e83b33d8abf
2020-06-26 15:25:58 +10:00
markus@openbsd.org c809daaa1b upstream: add test for mux w/-Oproxy; ok djm
OpenBSD-Regress-ID: 764d5c696e2a259f1316a056e225e50023abb027
2020-06-26 15:25:57 +10:00
Damien Miller 5098b3b623 missing files for webauthn/sshsig unit test 2020-06-22 16:54:02 +10:00
djm@openbsd.org 354535ff79 upstream: add support for verification of webauthn sshsig signature,
and example HTML/JS to generate webauthn signatures in SSH formats (also used
to generate the testdata/* for the test).

OpenBSD-Regress-ID: dc575be5bb1796fdf4b8aaee0ef52a6671a0f6fb
2020-06-22 16:33:33 +10:00
Darren Tucker 9e06572959 Add includes.h to new test.
Fixes warnings eg "´bounded´ attribute directive ignor" from gcc.
2020-06-19 18:47:56 +10:00
Darren Tucker e684b1ea36 Skip OpenSSL specific tests w/out OpenSSL.
Allows unit tests to pass when configure'ed --without-openssl.
2020-06-19 18:38:39 +10:00
Darren Tucker 80610e97a7 Hook sshsig tests up to Portable Makefiles. 2020-06-19 17:15:27 +10:00
dtucker@openbsd.org 5dba1fcaba upstream: Test that ssh-agent exits when running as as subprocess
of a specified command (ie "ssh-agent command").  Would have caught bz#3181.

OpenBSD-Regress-ID: 895b4765ba5153eefaea3160a7fe08ac0b6db8b3
2020-06-19 16:06:53 +10:00
djm@openbsd.org 68e8294f6b upstream: run sshsig unit tests
OpenBSD-Regress-ID: 706ef17e2b545b64873626e0e35553da7c06052a
2020-06-19 16:06:06 +10:00
djm@openbsd.org 5edfa1690e upstream: basic unit test for sshsig.[ch], including FIDO keys
verification only so far

OpenBSD-Regress-ID: fb1f946c8fc59206bc6a6666e577b5d5d7e45896
2020-06-19 16:06:06 +10:00
djm@openbsd.org e95c0a0e96 upstream: basic unit test for FIDO kep parsing
OpenBSD-Regress-ID: 8089b88393dd916d7c95422b442a6fd4cfe00c82
2020-06-19 15:58:10 +10:00
Darren Tucker 837ffa9699 Omit ToS setting if we don't have IPV6_TCLASS too.
Fixes tests on old BSDs.
2020-05-29 20:39:00 +10:00
dtucker@openbsd.org 058674a62f upstream: Add regression and unit tests for ${ENV} style
environment variable expansion in various keywords (bz#3140).  ok djm@

OpenBSD-Regress-ID: 4d9ceb95d89365b7b674bc26cf064c15a5bbb197
2020-05-29 15:48:15 +10:00
dtucker@openbsd.org 0b15892fc4 upstream: Unit test for convtime. ok djm@
OpenBSD-Regress-ID: cec4239efa2fc4c7062064f07a847e1cbdbcd5dd
2020-05-29 15:48:10 +10:00
sobrado 0b0d219313 partial sync of regress/netcat.c with upstream
synchronize synopsis and usage.
2020-05-29 14:48:02 +10:00
chl 0f04c8467f partial sync of regress/netcat.c with upstream
remove unused variable

ok tedu@
2020-05-29 14:47:56 +10:00
tobias d6a81050ac partial sync of regress/netcat.c with upstream
The code in socks.c writes multiple times in a row to a socket. If the socket becomes invalid between these calls (e.g. connection closed), write will throw SIGPIPE. With this patch, SIGPIPE is ignored so we can handle write's -1 return value (errno will be EPIPE). Ultimately, it leads to program exit, too -- but with nicer error message. :)

with input by and ok djm
2020-05-29 14:47:50 +10:00
tobias bf3893dddd partial sync of regress/netcat.c with upstream
Check for short writes in fdpass(). Clean up while at it.

ok djm
2020-05-29 14:47:41 +10:00
jca e18435fec1 partial sync of regress/netcat.c with upstream
Support for nc -T on IPv6 addresses.

ok sthen@
2020-05-29 14:47:11 +10:00
djm@openbsd.org 47adfdc07f upstream: two new tests for Include in sshd_config, checking whether
Port directives are processed correctly and handling of Include directives
that appear before Match. Both tests currently fail. bz#3122 and bz#3169 -
patch from Jakub Jelen

OpenBSD-Regress-ID: 8ad5a4a385a63f0a1c59c59c763ff029b45715df
2020-05-28 08:42:01 +10:00
Damien Miller 3ab6fccc39 prefer ln to cp for temporary copy of sshd
I saw failures on the reexec fallback test on Darwin 19.4 where
fork()ed children of a process that had it's executable removed
would instantly fail. Using ln to preserve the inode avoids this.
2020-05-14 12:24:24 +10:00
Darren Tucker f700d316c6 Actually skip pty tests when needed. 2020-05-13 15:24:51 +10:00
Darren Tucker c13403e55d Skip security key tests if ENABLE_SK not set. 2020-05-05 11:32:43 +10:00
djm@openbsd.org 4da393f87c upstream: sure enough, some of the test data that we though were in
new format were actually in the old format; fix from Michael Forney

OpenBSD-Regress-ID: a41a5c43a61b0f0b1691994dbf16dfb88e8af933
2020-05-04 18:42:13 +10:00
djm@openbsd.org 15bfafc1db upstream: make mktestdata.sh generate old/new format keys that we
expect. This script was written before OpenSSH switched to new-format private
keys by default and was never updated to the change (until now) From Michael
Forney

OpenBSD-Regress-ID: 38cf354715c96852e5b71c2393fb6e7ad28b7ca7
2020-05-04 18:42:13 +10:00
djm@openbsd.org 7882d2eda6 upstream: portability fix for sed that always emil a newline even
if the input does not contain one; from Michael Forney

OpenBSD-Regress-ID: 9190c3ddf0d2562ccc02c4a95fce0e392196bfc7
2020-05-04 18:42:13 +10:00
djm@openbsd.org 8074f9499e upstream: remove obsolete RSA1 test keys; spotted by Michael Forney
OpenBSD-Regress-ID: 6384ba889594e217d166908ed8253718ab0866da
2020-05-04 18:42:13 +10:00
Damien Miller 90a0b434ed fix reversed test 2020-05-01 13:55:03 +10:00
djm@openbsd.org a01817a9f6 upstream: adapt dummy FIDO middleware to API change; ok markus@
OpenBSD-Regress-ID: 8bb84ee500c2eaa5616044314dd0247709a1790f
2020-05-01 13:13:36 +10:00
Darren Tucker 7f23f42123 Include sys/byteorder.h for htons and friends.
These are usually in netinet/in.h but on HP-UX they are not defined if
_XOPEN_SOURCE_EXTENDED is set.  Only needed for netcat in the regression
tests.
2020-05-01 12:51:36 +10:00
Darren Tucker 300c4322b9 Pass configure's egrep through to test-exec.sh.
Use it to create a wrapper function to call it from tests.  Fixes the
keygen-comment test on platforms with impoverished default egrep (eg
Solaris).
2020-04-22 11:35:49 +10:00
dtucker@openbsd.org 01d4cdcd45 upstream: Backslash '$' at then end of string. Prevents warning on
some shells.

OpenBSD-Regress-ID: 5dc27ab624c09d34078fd326b10e38c1ce9c741f
2020-04-22 11:35:49 +10:00
djm@openbsd.org d00d07b674 upstream: regression test for printing of private key fingerprints and
key comments, mostly by loic AT venez.fr (slightly tweaked for portability)
ok dtucker@

OpenBSD-Regress-ID: 8dc6c4feaf4fe58b6d634cd89afac9a13fd19004
2020-04-20 14:47:26 +10:00
dtucker@openbsd.org b6a4013647 upstream: Add tests for TOKEN expansion of LocalForward and
RemoteForward.

OpenBSD-Regress-ID: 90fcbc60d510eb114a2b6eaf4a06ff87ecd80a89
2020-04-10 11:47:40 +10:00
dtucker@openbsd.org abc3e0a517 upstream: Add utf8.c for asmprintf used by krl.c
OpenBSD-Regress-ID: 433708d11165afdb189fe635151d21659dd37a37
2020-04-10 11:47:40 +10:00
dtucker@openbsd.org d1d5f72851 upstream: Indicate if we're using a cached key in trace output.
OpenBSD-Regress-ID: 409a7b0e59d1272890fda507651c0c3d2d3c0d89
2020-04-05 10:58:53 +10:00
Darren Tucker a398251a46 Use /usr/bin/xp4g/id if necessary.
Solaris' native "id" doesn't support the options we use but the one
in /usr/bin/xp4g does, so use that instead.
2020-04-05 08:43:57 +10:00
dtucker@openbsd.org db0fdd4833 upstream: Some platforms don't have "hostname -s", so use cut to trim
short hostname instead.

OpenBSD-Regress-ID: ebcf36a6fdf287c9336b0d4f6fc9f793c05307a7
2020-04-05 08:40:46 +10:00
dtucker@openbsd.org e7e59a9cc8 upstream: Compute hash locally and re-enable %C tests.
OpenBSD-Regress-ID: 94d1366e8105274858b88a1f9ad2e62801e49770
2020-04-05 08:15:46 +10:00
dtucker@openbsd.org bc5c5d01ad upstream: Temporarily remove tests for '%C' since the hash contains the
local hostname and it doesn't work on any machine except mine... spotted by
djm@

OpenBSD-Regress-ID: 2d4c3585b9fcbbff14f4a5a5fde51dbd0d690401
2020-04-03 17:24:42 +11:00
djm@openbsd.org 9f8a42340b upstream: this needs utf8.c too
OpenBSD-Regress-ID: 445040036cec714d28069a20da25553a04a28451
2020-04-03 15:46:13 +11:00
dtucker@openbsd.org 92115ea7c3 upstream: Add percent_expand test for 'Match Exec'.
OpenBSD-Regress-ID: a41c14fd6a0b54d66aa1e9eebfb9ec962b41232f
2020-04-03 15:46:13 +11:00
djm@openbsd.org eba523f0a1 upstream: make Chacha20-POLY1305 context struct opaque; ok tb@ as
part of a larger diff at a2k20

OpenBSD-Commit-ID: a4609b7263284f95c9417ef60ed7cdbb7bf52cfd
2020-04-03 15:36:57 +11:00
dtucker@openbsd.org d5318a784d upstream: Add regression test for percent expansions where possible.
OpenBSD-Regress-ID: 7283be8b2733ac1cbefea3048a23d02594485288
2020-04-03 13:43:10 +11:00
djm@openbsd.org c7c099060f upstream: some more speeling mistakes from
OpenBSD-Regress-ID: 02471c079805471c546b7a69d9ab1d34e9a57443
2020-03-14 19:40:16 +11:00
djm@openbsd.org 677d0ece67 upstream: regress test for sshd_config Include directive; from Jakub
Jelen

OpenBSD-Regress-ID: 0d9224de3297c7a5f51ba68d6e3725a2a9345fa4
2020-02-01 10:28:33 +11:00
djm@openbsd.org 1e1db0544f upstream: unbreak unittests for recent API / source file changes
OpenBSD-Regress-ID: 075a899a01bbf7781d38bf0b33d8366faaf6d3c0
2020-01-28 12:50:38 +11:00
djm@openbsd.org f73ab8a811 upstream: unbreak unittests for recent API / source file changes
OpenBSD-Regress-ID: 075a899a01bbf7781d38bf0b33d8366faaf6d3c0
2020-01-26 14:19:43 +11:00
dtucker@openbsd.org a0c81d2402 upstream: Move setting $NC into test-exec since it's now used by
multiple tests, and in -portable we use our own local copy to avoid
portability problems.

OpenBSD-Regress-ID: ceb78445fcaac317bec2fc51b3f0d9589048c114
2020-01-25 14:33:53 +11:00
dtucker@openbsd.org 94a2e5951b upstream: Wait a bit longer for the multiplex master to become ready
since on very slow hosts the current delay is not sufficient and the test
will fail.

OpenBSD-Regress-ID: 6d90c7475d67ac3a95610b64af700629ece51a48
2020-01-25 11:51:03 +11:00
dtucker@openbsd.org b2df804f57 upstream: Add a connection test for proxycommand. This would have
caught the problem caused by ssh.c rev 1.507 wherein Host and Hostname were
swapped.  Prompted by beck@

OpenBSD-Regress-ID: d218500ae6aca4c479c27318fb5b09ebc00f7aae
2020-01-25 11:50:34 +11:00
dtucker@openbsd.org 0585b56972 upstream: Do not warn about permissions on symlinks.
OpenBSD-Regress-ID: 339d4cbae224bd8743ffad9c3afb0cf3cb66c357
2020-01-24 14:23:06 +11:00
dtucker@openbsd.org 415192348a upstream: Handle zlib compression being disabled now that it's
optional.

OpenBSD-Regress-ID: 0af4fbc5168e62f89d0350de524bff1cb00e707a
2020-01-23 22:34:37 +11:00
dtucker@openbsd.org ba247af8e9 upstream: When checking for unsafe directories, ignore non-directories
(ie symlinks, where permissions are not relevant).

OpenBSD-Regress-ID: fb6cfc8b022becb62b2dcb99ed3f072b3326e501
2020-01-23 22:20:53 +11:00
dtucker@openbsd.org 7e1323102b upstream: Check for and warn about StrictModes permission problems. ok tb@
OpenBSD-Regress-ID: 4841704ccdee50ee7efc6035bc686695c6ac2991
2020-01-23 15:49:09 +11:00
dtucker@openbsd.org 84de1c27f8 upstream: Also test PuTTY chacha20.
OpenBSD-Regress-ID: 7af6a0e8763b05f1f8eee6bca5f31fcb16151040
2020-01-23 15:48:24 +11:00
dtucker@openbsd.org c7ed15a396 upstream: Also test PuTTY ecdh kex methods.
OpenBSD-Regress-ID: ec4017dce612131842398a03e93007a869c2c133
2020-01-23 15:04:08 +11:00
dtucker@openbsd.org 8d3af6ebdf upstream: Increase keyscan timeout from default. On slow hosts 3
concurrent keyscans can hit the default 5 second timeout, so increase to 15
seconds.

OpenBSD-Regress-ID: 16383dec166af369b7fb9948572856f5d544c93f
2020-01-22 18:34:01 +11:00
Damien Miller 47160e1de8 unbreak fuzzer support for recent ssh-sk.h changes 2020-01-22 10:30:13 +11:00
djm@openbsd.org f8c11461aa upstream: pass SSH_SK_HELPER explicitly past $SUDO to avoid it getting
cleared; with dtucker@

OpenBSD-Regress-ID: 03178a0580324bf0dff28f7eac6c3edbc5407f8e
2020-01-21 19:08:37 +11:00
Darren Tucker 1af3354aea Wrap stdint.h in ifdef HAVE_STDINT_H. 2020-01-15 16:22:36 +11:00
djm@openbsd.org dd2acc8b86 upstream: adapt sk-dummy to SK API changes
also, make it pull prototypes directly from sk-api.c and #error
if the expected version changes. This will make any future regress
test breakage because of SK API changes much more apparent

OpenBSD-Regress-ID: 79b07055de4feb988e31da71a89051ad5969829d
2020-01-06 13:12:46 +11:00
djm@openbsd.org ff31f15773 upstream: what bozo decided to use 2020 as a future date in a regress
test?

OpenBSD-Regress-ID: 3b953df5a7e14081ff6cf495d4e8d40e153cbc3a
2020-01-04 10:14:21 +11:00
djm@openbsd.org 680eb7749a upstream: implement recent SK API change to support resident keys
and PIN prompting in the dummy middleware that we use for the tests. Should
fix breakage spotted by dtucker@

OpenBSD-Regress-ID: 379cf9eabfea57aaf7f3f59dafde59889566c484
2020-01-03 13:47:32 +11:00
dtucker@openbsd.org 86834fe6b5 upstream: Update keygen moduli screen test to match recent command
line option change to ssh-keygen(1).

OpenBSD-Regress-ID: 744a72755004377e9669b662c13c6aa9ead8a0c3
2020-01-03 13:47:32 +11:00
Damien Miller 0248ec7c76 ssh-sk-null.cc needs extern "C" {} 2020-01-02 13:41:31 +11:00
Damien Miller 5ca4b414ef add dummy ssh-sk API for linking with fuzzers 2020-01-02 11:15:49 +11:00
djm@openbsd.org fbd9729d4e upstream: unit tests for ForwardAgent=/path; from Eric Chiang
OpenBSD-Regress-ID: 24f693f78290b2c17725dab2c614dffe4a88c8da
2019-12-21 13:36:53 +11:00
djm@openbsd.org e5b7cf8edc upstream: test security key host keys in addition to user keys
OpenBSD-Regress-ID: 9fb45326106669a27e4bf150575c321806e275b1
2019-12-21 13:35:42 +11:00
djm@openbsd.org 1a7217ac06 upstream: adapt to ssh-sk-client change
OpenBSD-Regress-ID: 40481999a5928d635ab2e5b029e8239c112005ea
2019-12-16 14:20:35 +11:00
djm@openbsd.org a7fc1df246 upstream: it's no longer possible to disable privilege separation
in sshd, so don't double the tests' work by trying both off/on

OpenBSD-Regress-ID: d366665466dbd09e9b707305da884be3e7619c68
2019-12-16 14:20:35 +11:00
Darren Tucker fa7924008e Wrap ECC specific bits in ifdef.
Fixes tests when built against an OpenSSL configured with no-ec.
2019-12-06 14:17:26 +11:00
Damien Miller 37f5b5346e includes.h for sk-dummy.c, dummy 2019-11-29 14:48:46 +11:00
Damien Miller ef3853bb94 another attempt at sk-dummy.so working x-platform
include a fatal() implementation to satisfy libopenbsd-compat

clean up .lo and .so files

.gitignore .lo and .so files
2019-11-29 11:52:23 +11:00
djm@openbsd.org d46ac56f1c upstream: lots of dependencies go away here with ed25519 no longer
needing the ssh_digest API.

OpenBSD-Regress-ID: 785847ec78cb580d141e29abce351a436d6b5d49
2019-11-29 11:19:48 +11:00
djm@openbsd.org ad44ca81be upstream: test FIDO2/U2F key types; ok markus@
OpenBSD-Regress-ID: 367e06d5a260407619b4b113ea0bd7004a435474
2019-11-27 11:02:49 +11:00
djm@openbsd.org c6efa8a91a upstream: add dummy security key middleware based on work by
markus@

This will allow us to test U2F/FIDO2 support in OpenSSH without
requiring real hardware.

ok markus@

OpenBSD-Regress-ID: 88b309464b8850c320cf7513f26d97ee1fdf9aae
2019-11-27 10:47:28 +11:00
Damien Miller 9281d4311b unbreak fuzzers for recent security key changes 2019-11-25 21:47:49 +11:00
djm@openbsd.org c5f1cc9935 upstream: unbreak tests for recent security key changes
OpenBSD-Regress-ID: 2cdf2fcae9962ca4d711338f3ceec3c1391bdf95
2019-11-25 21:34:20 +11:00
djm@openbsd.org 6498826682 upstream: unbreak after security key support landed
OpenBSD-Regress-ID: 3ab578b0dbeb2aa6d9969b54a9c1bad329c0dcba
2019-11-25 21:34:20 +11:00
tb@openbsd.org e65e25c81e upstream: Remove workaround for broken 'openssl rsa -text' output
that was fixed in libcrypto/rsa/rsa_ameth.c r1.24.

ok dtucker inoguchi

OpenBSD-Regress-ID: c260edfac177daa8fcce90141587cf04a95c4f5f
2019-11-25 21:34:20 +11:00
dtucker@openbsd.org 64f56f1d1a upstream: LibreSSL change the format for openssl rsa -text output from
"publicExponent" to "Exponent" so accept either.  with djm.

OpenBSD-Regress-ID: b7e6c4bf700029a31c98be14600d4472fe0467e6
2019-11-18 20:54:05 +11:00
Darren Tucker d500b59a82 Check if IP_TOS is defined before using. 2019-11-01 13:42:52 +11:00
djm@openbsd.org db8d13f792 upstream: more additional source files
OpenBSD-Regress-ID: 8eaa25fb901594aee23b76eda99dca5b8db94c6f
2019-11-01 13:10:52 +11:00
djm@openbsd.org f89c5df65d upstream: additional source files here too
OpenBSD-Regress-ID: 8809f8e1c8f7459e7096ab6b58d8e56cb2f483fd
2019-11-01 13:10:09 +11:00
djm@openbsd.org 02275afa1e upstream: additional source files here too
OpenBSD-Regress-ID: 09297e484327f911fd353489518cceaa0c1b95ce
2019-11-01 13:10:09 +11:00
djm@openbsd.org dfc8f01b98 upstream: adapt to extra sshkey_sign() argument and additional
dependencies

OpenBSD-Regress-ID: 7a25604968486c4d6f81d06e8fbc7d17519de50e
2019-11-01 13:10:09 +11:00
djm@openbsd.org afa59e26ee upstream: skip security-key key types for tests until we have a
dummy U2F middleware to use.

OpenBSD-Regress-ID: 37200462b44334a4ad45e6a1f7ad1bd717521a95
2019-11-01 13:10:09 +11:00
Damien Miller f4fdcd2b7a Missing unit test files 2019-11-01 08:36:16 +11:00
Damien Miller 1ba130ac8f add a fuzzer for private key parsing 2019-10-09 13:49:35 +11:00
dtucker@openbsd.org b1e79ea8fa upstream: Instead of running sed over the whole log to remove CRs,
remove them only where it's needed (and confuses test(1) on at least OS X in
portable).

OpenBSD-Regress-ID: a6ab9b4bd1d33770feaf01b2dfb96f9e4189d2d0
2019-10-07 13:08:57 +11:00
djm@openbsd.org 643ab68c79 upstream: more sshsig regress tests: check key revocation, the
check-novalidate signature test mode and signing keys in ssh-agent.

From Sebastian Kinne (slightly tweaked)

OpenBSD-Regress-ID: b39566f5cec70140674658cdcedf38752a52e2e2
2019-10-04 13:41:03 +10:00
Darren Tucker 0a403bfde7 Add SKIP_LTESTS for skipping specific tests. 2019-09-30 14:11:42 +10:00
dtucker@openbsd.org 4d59f7a516 upstream: Test for empty result in expected bits. Remove CRs from log
as they confuse tools on some platforms.  Re-enable the 3des-cbc test.

OpenBSD-Regress-ID: edf536d4f29fc1ba412889b37247a47f1b49d250
2019-09-27 15:36:22 +10:00
Darren Tucker 7c817d129e Re-enable dhgex test.
Since we've added larger fallback groups to dh.c this test will pass
even if there is no moduli file installed on the system.
2019-09-27 15:26:22 +10:00
Damien Miller f61f29afda make unittests pass for no-openssl case 2019-09-08 10:37:17 +10:00
dtucker@openbsd.org 1268f0bcd8 upstream: Check for RSA support before using it for the user key,
otherwise use ed25519 which is supported when built without OpenSSL.

OpenBSD-Regress-ID: 3d23ddfe83c5062f00ac845d463f19a2ec78c0f7
2019-09-06 14:37:23 +10:00
Damien Miller 8b57337c1c update fuzzing makefile to more recent clang 2019-09-05 15:46:39 +10:00
Damien Miller ae631ad77d fuzzer for sshsig allowed_signers option parsing 2019-09-05 15:46:11 +10:00
Damien Miller f4846dfc6a Fuzzer harness for sshsig 2019-09-05 14:26:39 +10:00
Damien Miller b08a6bc1cc oops; missed including the actual file 2019-09-03 18:45:42 +10:00
djm@openbsd.org 6d6427d013 upstream: regress test for sshsig; feedback and ok markus@
OpenBSD-Regress-ID: 74c0974f2cdae8d9599b9d76a09680bae55d8a8b
2019-09-03 18:42:22 +10:00
djm@openbsd.org 59650f0eaf upstream: only add plain keys to prevent any certs laying around
from confusing the test.

OpenBSD-Regress-ID: b8f1508f822bc560b98dea910e61ecd76f34100f
2019-09-03 18:42:14 +10:00
dtucker@openbsd.org e50f808712 upstream: Use ed25519 for most hostkey rotation tests since it's
supported even when built without OpenSSL.  Use RSA for the secondary type
test if supported, otherwise skip it.  Fixes this test for !OpenSSL builds.

OpenBSD-Regress-ID: 101cb34a84fd974c623bdb2e496f25a6e91be109
2019-08-30 15:56:42 +10:00
djm@openbsd.org c4ffb72593 upstream: fix some memleaks in test_helper code
bz#3037 from Jitendra Sharma

OpenBSD-Regress-ID: 71440fa9186f5842a65ce9a27159385c6cb6f751
2019-08-02 11:42:26 +10:00
dtucker@openbsd.org d31e7c937b upstream: Restrict limit-keytype to types supported by build. This
means we have to skip a couple tests when only one key type is supported.

OpenBSD-Regress-ID: 22d05befb9c7ce21ce8dc22acf1ffe9e2ef2e95e
2019-07-26 14:51:25 +10:00
Darren Tucker 0967a233b8 Remove override disabling DH-GEX.
The DH-GEX override doesn't work when build without OpenSSL, and
we'll prefer curve25519 these days, removing the need for it.
2019-07-25 20:11:45 +10:00
dtucker@openbsd.org 061407efc1 upstream: Only use supported key types during KRL test, preferring
ed25519 since it's supported by both OpenSSL and non-OpenSSL builds.

OpenBSD-Regress-ID: 9f2bb3eadd50fcc8245b1bd8fd6f0e53602f71aa
2019-07-25 20:09:06 +10:00
dtucker@openbsd.org 47f8ff1fa5 upstream: Switch keys-command test from rsa to ed25519 since it's
supported for both OpenSSL and non-OpenSSL builds.

OpenBSD-Regress-ID: 174be4be876edd493e4a5c851e5bc579885e7a0a
2019-07-25 20:01:19 +10:00
dtucker@openbsd.org 1e94afdfa8 upstream: Make certificate tests work with the supported key
algorithms.  Allows tests to pass when built without OpenSSL.

OpenBSD-Regress-ID: 617169a6dd9d06db3697a449d9a26c284eca20fc
2019-07-25 20:01:19 +10:00
dtucker@openbsd.org 26bf693661 upstream: Construct list of key types to test based on the types
supported by the binaries.

OpenBSD-Regress-ID: fcbd115efacec8ab0ecbdb3faef79ac696cb1d62
2019-07-24 16:51:17 +10:00
dtucker@openbsd.org 773c55b3d1 upstream: Only use DSA key type in tests if binaries support it.
OpenBSD-Regress-ID: 770e31fe61dc33ed8eea9c04ce839b33ddb4dc96
2019-07-24 16:47:58 +10:00
Darren Tucker 159e987a54 Split test targets further.
Splits test into file-tests, t-exec, unit and interop-tests and their
respective dependencies.  Should allow running any set individually
without having to build the other dependencies that are not needed
for that specific test.
2019-07-24 14:21:19 +10:00
dtucker@openbsd.org 7cdf9fdcf1 upstream: Skip DH group generation test if binaries don't support
DH-GEX.

OpenBSD-Regress-ID: 7c918230d969ecf7656babd6191a74526bffbffd
2019-07-23 22:51:22 +10:00
dtucker@openbsd.org 3a3eab8bb0 upstream: Only test conversion of key types supported by the
binaries.

OpenBSD-Regress-ID: e3f0938a0a7407e2dfbb90abc3ec979ab6e8eeea
2019-07-23 22:51:22 +10:00
dtucker@openbsd.org 7e66b7d98c upstream: Only add ssh-dss to allowed key types if it's supported
by the binary.

OpenBSD-Regress-ID: 395a54cab16e9e4ece9aec047ab257954eebd413
2019-07-23 22:51:22 +10:00
Darren Tucker 2e6035b900 Rename valgrind "errors" to "failures".
When valgrind is enabled, test-exec.sh counts the number of invocations
that valgrind detects failures in, not the total number of errors detected.
This makes the name to be more accurate.
2019-07-23 08:11:22 +10:00
Darren Tucker e82c9bb9ff Skip running sftp-chroot under Valgrind. 2019-07-20 22:14:46 +10:00
dtucker@openbsd.org 41e22c2e05 upstream: Remove the sleeps and thus races from the forwarding
test.  They were originally required to work with Protocol 1, but now we can
use ssh -N and the control socket without the sleeps. While there, suppress
output fro the control exit commands.

OpenBSD-Regress-ID: 4c51a1d651242f12c90074c18c61008a74c1c790
2019-07-20 22:13:40 +10:00
dtucker@openbsd.org 0423043c5e upstream: Allow SLEEPTIME to be overridden.
OpenBSD-Regress-ID: 1596ab168729954be3d219933b2d01cc93687e76
2019-07-20 22:12:24 +10:00
dtucker@openbsd.org d466b6a5cf upstream: Move sleep time into a variable so that we can increase
it for platforms or configurations that are much slower then usual.

OpenBSD-Regress-ID: 88586cabc800062c260d0b876bdcd4ca3f58a872
2019-07-20 22:11:00 +10:00
djm@openbsd.org b4a7c9d2b5 upstream: add regression tests for scp for out-of-destination path file
creation by Harry Sintonen via Jakub Jelen in bz3007

OpenBSD-Regress-ID: 01ae5fbc6ce400b2df5a84dc3152a9e31f354c07
2019-07-19 13:53:27 +10:00
Darren Tucker 65333f7454 Show when skipping valgrind for a test. 2019-07-19 13:16:11 +10:00
Darren Tucker fccb7eb343 Enable connect-privsep test with valgrind.
connect-privsep seems to work OK with valgrind now so don't skip
valgrind on it.
2019-07-19 10:41:56 +10:00
Darren Tucker d742301726 Show valgrind results and error counts. 2019-07-19 07:43:07 +10:00
Darren Tucker a192021fed Fail tests if Valgrind enabled and reports errors.
Also dump the failing valgrind report to stdout (not the cleanest
solution, but better than nothing).
2019-07-18 11:09:38 +10:00
Darren Tucker d1c491ecb9 Allow low-priv tests to write to pipe dir.
When running regression tests with Valgrind and SUDO, the low-priv agent
tests need to be able to create pipes in the appropriate directory.
2019-07-18 10:17:54 +10:00
Darren Tucker 8a5bb3e781 Put valgrind vgdb files to a specific directory.
Valgrind by default puts vgdb files and pipes under /tmp, however it
is not always able to clean them up, which can cause test failures when
there's a pid/file collision.  Using a specific directory ensures that
we can clean up and start clean.
2019-07-17 21:24:55 +10:00
djm@openbsd.org f8829fe57f upstream: adapt to sshbuf_dtob64() change
OpenBSD-Regress-ID: 82374a83edf0955fd1477169eee3f5d6467405a6
2019-07-17 11:04:25 +10:00
dtucker@openbsd.org 1254fcbb2f upstream: Remove ssh1 files from CLEANFILES since ssh1 no longer
supported.

OpenBSD-Regress-ID: 5b9ae869dc669bac05939b4a2fdf44ee067acfa0
2019-07-17 11:04:25 +10:00
dtucker@openbsd.org 9dc81a5ada upstream: Update names of host key files in CLEANFILES to match
recent changes to the tests.

OpenBSD-Regress-ID: 28743052de3acf70b06f18333561497cd47c4ecf
2019-07-17 11:02:42 +10:00
djm@openbsd.org 477e2a3be8 upstream: unit tests for sshbuf_cmp() and sshbuf_find(); ok markus
OpenBSD-Regress-ID: b52d36bc3ab6dc158c1e59a9a4735f821cf9e1fd
2019-07-15 23:21:18 +10:00
Darren Tucker bc551dfebb Clear valgrind-out dir to prevent collisions. 2019-07-15 12:52:45 +10:00
Darren Tucker 5db9ba718e Allow agent tests to write to valgrind dir. 2019-07-15 12:02:27 +10:00
djm@openbsd.org 121e48fa53 upstream: unit tests for sshbuf_peek/poke bounds-checked random access
functions. ok markus@

OpenBSD-Regress-ID: 034c4284b1da6b12e25c762a6b958efacdafbaef
2019-07-15 09:39:42 +10:00
dtucker@openbsd.org e187b1d460 upstream: Add (recently added) rsa_oldfmt to CLEANFILES.
OpenBSD-Regress-ID: 405beda94e32aa6cc9c80969152fab91f7c54bd3
2019-07-05 15:08:14 +10:00
dtucker@openbsd.org 74b541bfab upstream: Adapt the PuTTY/Conch tests to new key names.
A recent regress change (2a9b3a2ce4 in
portable) broke the PuTTY and Twisted Conch interop tests, because the
key they want to use is now called ssh-rsa rather than rsa.  Adapt the
tests to the new file names.  bz#3020, patch from cjwatson at debian.org.

OpenBSD-Regress-ID: fd342a37db4d55aa4ec85316f73082c8eb96e64e
2019-07-05 15:07:55 +10:00
dtucker@openbsd.org de08335a4c upstream: Add a sleep to allow forwards to come up.
Currently when the multiplex client requests a forward it returns
once the request has been sent but not necessarily when the forward
is up.  This causes intermittent text failures due to this race,
so add some sleeps to mitigate this until we can fix it properly.

OpenBSD-Regress-ID: 384c7d209d2443d25ea941d7f677e932621fb253
2019-07-05 15:06:04 +10:00
Darren Tucker 4d24928472 Remove nc stderr redirection to resync w/OpenBSD. 2019-07-05 14:58:57 +10:00
Jitendra Sharma 58ceacdcba Update README doc to include missing test cases
Readme regress document is missing various individual tests,
which are supported currently. Update README to
include those test cases.
2019-06-27 20:54:14 +10:00
djm@openbsd.org 1dfadb9b57 upstream: adapt for key shielding API changes (const removal)
OpenBSD-Regress-ID: 298890bc52f0cd09dba76dc1022fabe89bc0ded6
2019-06-21 14:24:44 +10:00
djm@openbsd.org 99bcbbc77f upstream: check for convtime() refusing to accept times that
resolve to LONG_MAX Reported by Kirk Wolf bz2977; ok dtucker

OpenBSD-Regress-ID: 15c9fe87be1ec241d24707006a31123d3a3117e0
2019-06-19 12:21:40 +10:00
dtucker@openbsd.org e5cccb2410 upstream: Add unit tests for user@host and URI parsing.
OpenBSD-Regress-ID: 69d5b6f278e04ed32377046f7692c714c2d07a68
2019-06-19 12:21:40 +10:00
dtucker@openbsd.org 0bb7e38834 upstream: Add tests for sshd -T -C with Match.
OpenBSD-Regress-ID: d4c34916fe20d717692f10ef50b5ae5a271c12c7
2019-06-19 12:21:23 +10:00
Jakub Jelen 342d6e5158 Adjust softhsm2 path on Fedora Linux for regress
The SoftHSM lives in Fedora in /usr/lib64/pkcs11/libsofthsm2.so
2019-03-29 22:37:15 +11:00
Corinna Vinschen 786cd4c183 drop old Cygwin considerations
- Cygwin supports non-DOS characters in filenames
- Cygwin does not support Windows XP anymore

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
2019-03-28 09:23:46 +11:00
dtucker@openbsd.org 19a0f0529d upstream: The test sshd_config in in $OBJ.
OpenBSD-Regress-ID: 1e5d908a286d8e7de3a15a0020c8857f3a7c9172
2019-01-28 19:01:01 +11:00
dtucker@openbsd.org 8fe2544020 upstream: Remove leftover debugging.
OpenBSD-Regress-ID: 3d86c3d4867e46b35af3fd2ac8c96df0ffdcfeb9
2019-01-28 14:41:11 +11:00
dtucker@openbsd.org e30d32364d upstream: Enable ssh-dss for the agent test. Disable it for the
certificate test.

OpenBSD-Regress-ID: 388c1e03e1def539d350f139b37d69f12334668d
2019-01-28 11:34:22 +11:00
dtucker@openbsd.org ffdde469ed upstream: Count the number of key types instead of assuming there
are only two.

OpenBSD-Regress-ID: 0998702c41235782cf0beee396ec49b5056eaed9
2019-01-28 11:34:22 +11:00
dtucker@openbsd.org 2a9b3a2ce4 upstream: Generate all key supported key types and enable for keyscan
test.

OpenBSD-Regress-ID: 72f72ff49946c61bc949e1692dd9e3d71370891b
2019-01-27 17:40:42 +11:00
djm@openbsd.org 49d8c8e214 upstream: adapt to changes in KEX APIs and file removals
OpenBSD-Regress-ID: 54d6857e7c58999c7a6d40942ab0fed3529f43ca
2019-01-21 23:51:29 +11:00
djm@openbsd.org 35ecc53a83 upstream: adapt to changes in KEX API and file removals
OpenBSD-Regress-ID: 92cad022d3b0d11e08f3e0055d6a14b8f994c0d7
2019-01-21 23:41:21 +11:00
djm@openbsd.org 7d69aae64c upstream: adapt to bignum1 API removal and bignum2 API change
OpenBSD-Regress-ID: cea6ff270f3d560de86b355a87a2c95b55a5ca63
2019-01-21 23:38:30 +11:00
djm@openbsd.org beab553f0a upstream: remove hack to use non-system libcrypto
OpenBSD-Regress-ID: ce72487327eee4dfae1ab0212a1f33871fe0809f
2019-01-21 23:38:10 +11:00
Damien Miller ba58a529f4 make agent-pkcs11 search harder for softhsm2.so 2019-01-21 13:09:23 +11:00