Damien Miller
dc7bc52372
fix some bugs in the fuzzer
2022-05-30 09:29:20 +10:00
Damien Miller
9b3ad432ad
fuzzer for authorized_keys parsing
...
mostly redundant to authopt_fuzz, but it's sensitive code so IMO it
makes sense to test this layer too
2022-05-27 17:00:43 +10:00
djm@openbsd.org
bedb93415b
upstream: regress test for in-place transfers and clobbering larger
...
files with smaller ones; would have caught last regression in scp(1)
OpenBSD-Regress-ID: 19de4e88dd3a4f7e5c1618c9be3c32415bd93bc2
2022-05-16 22:59:11 +10:00
anton@openbsd.org
b4f0d719c2
upstream: Only run agent-ptrace.sh if gdb is available as all
...
architectures do not ship with gdb.
OpenBSD-Regress-ID: ec53e928803e6b87f9ac142d38888ca79a45348d
2022-05-16 22:59:11 +10:00
dtucker@openbsd.org
c31404426d
upstream: It looks like we can't completely avoid
...
waiting for processes to exit so retrieve the pid via controlmaster and
use that.
OpenBSD-Regress-ID: 8246f00f22b14e49d2ff1744c94897ead33d457b
2022-04-21 12:05:26 +10:00
dtucker@openbsd.org
d19b21afab
upstream: Use ssh -f and ControlPersist ..
...
to start up test forwards and ssh -O stop to shut them down intead of
sleep loops. This speeds up the test by an order of magnitude.
OpenBSD-Regress-ID: eb3db5f805100919b092a3b2579c611fba3e83e7
2022-04-20 23:45:24 +10:00
dtucker@openbsd.org
5f76286a12
upstream: Simplify forward-control test.
...
Since we no longer need to support SSH1 we don't need to run shell
commands on the other end of the connection and can use ssh -N instead.
This also makes the test less racy.
OpenBSD-Regress-ID: 32e94ce272820cc398f30b848b2b0f080d10302c
2022-04-20 15:36:53 +10:00
djm@openbsd.org
687bbf2357
upstream: regression test for sftp cp command
...
OpenBSD-Regress-ID: c96bea9edde3a384b254785e7f9b2b24a81cdf82
2022-04-20 15:31:55 +10:00
Darren Tucker
81d33d8e3c
Skip agent-getpeereid when running as root.
2022-02-21 21:27:20 +11:00
dtucker@openbsd.org
fbd772570a
upstream: Aproximate realpath on the expected output by deduping
...
leading slashes. Fixes test failure when user's home dir is / which is
possible in some portable configurations.
OpenBSD-Regress-ID: 53b8c53734f8893806961475c7106397f98d9f63
2022-02-20 15:10:19 +11:00
Damien Miller
b2aee35a1f
find sk-dummy.so when build_dir != src_dir
...
spotted by Corinna Vinschen; feedback & ok dtucker@
2022-02-17 21:15:16 +11:00
Darren Tucker
6ee53064f4
Fix helper include path and remove excess code.
...
Looks like test_hpdelim.c was imported twice into the same file.
Spotted by kevin.brott at gmail com and chris at cataclysmal org.
2022-02-11 10:05:31 +11:00
dtucker@openbsd.org
25bd659cc7
upstream: Add test for empty hostname with port.
...
OpenBSD-Regress-ID: e19e89d3c432b68997667efea44cf015bbe2a7e3
2022-02-10 15:17:28 +11:00
dtucker@openbsd.org
a29af853cf
upstream: Add unit tests for hpdelim.
...
OpenBSD-Regress-ID: be97b85c19895e6a1ce13c639765a3b48fd95018
2022-02-10 15:17:28 +11:00
Damien Miller
253de42753
portable-specific string array constification
...
from Mike Frysinger
2022-02-02 16:52:07 +11:00
djm@openbsd.org
dfdcc2220c
upstream: test 'ssh-keygen -Y find-principals' with wildcard
...
principals; from Fabian Stelzer
OpenBSD-Regress-ID: fbe4da5f0032e7ab496527a5bf0010fd700f8f40
2022-02-02 16:51:04 +11:00
dtucker@openbsd.org
968e508967
upstream: Enable all supported ciphers and macs in the server
...
before trying to benchmark them. Increase the data file size to get more
signal.
OpenBSD-Regress-ID: dc3697d9f7defdfc51c608782c8e750128e46eb6
2022-02-02 16:51:04 +11:00
Darren Tucker
2e5cfed513
Improve compatibility of early exit trap handling.
...
Dash (as used by the github runners) has some differences in its trap
builtin:
- it doesn't have -p (which is fine, that's not in posix).
- it doesn't work in a subshell (which turns out to be in compliance
with posix, which means bash isn't).
- it doesn't work in a pipeline, ie "trap|cat" produces no output.
2022-01-20 13:43:54 +11:00
Darren Tucker
20da6ed136
Invoke EXIT handler early when using Valgrind.
...
When using Valgrind, we need to wait for all invoked programs to
complete before checking their valgrind logs. Some tests, notably
agent-restrict, set an EXIT trap handler to clean up things like
ssh-agent, but those do not get invoked until test-exec.sh exits.
This causes the Valgrind wait to deadlock, so if present invoke
the EXIT handler before checking the Valgrind logs.
2022-01-19 15:37:39 +11:00
Darren Tucker
976b9588b4
Wrap OpenSSL includes in unit tests in ifdef.
...
Fixes unit test on systems that do not have OpenSSL headers installed.
2022-01-14 13:47:27 +11:00
Darren Tucker
c171879374
Remove sort wrapper.
...
agent-restrict now takes care of this itself.
2022-01-13 16:01:41 +11:00
dtucker@openbsd.org
9cc2654403
upstream: Set LC_ALL in both local and remote shells so that sorted
...
output matches regardless of what the user's shell sets it to. ok djm@
OpenBSD-Regress-ID: 4e97dd69a68b05872033175a4c2315345d01837f
2022-01-13 16:01:41 +11:00
dtucker@openbsd.org
7a75f748cb
upstream: Avoid %'s in commands (not used in OpenBSD, but used in
...
-portable's Valgrind test) being interpretted as printf format strings.
OpenBSD-Regress-ID: dc8655db27ac4acd2c386c4681bf42a10d80b043
2022-01-13 15:49:38 +11:00
dtucker@openbsd.org
4bc2ba6095
upstream: Use egrep when searching for an anchored string.
...
OpenBSD-Regress-ID: dd114a2ac27ac4b06f9e4a586d3f6320c54aeeb4
2022-01-12 18:31:45 +11:00
Darren Tucker
6bf2efa267
Add "rev" command replacement if needed.
2022-01-12 18:25:06 +11:00
djm@openbsd.org
acabefe3f8
upstream: remove hardcoded domain and use window.location.host, so this
...
can be run anywhere
OpenBSD-Regress-ID: 2ac2ade3b6227d9c547351d3ccdfe671e62b7f92
2022-01-12 09:36:01 +11:00
Darren Tucker
3ef403f351
Add wrapper for "sort" to set LC_ALL=C.
...
Found by djm, this should make sorts stable and reduce test flakiness.
2022-01-10 21:07:38 +11:00
dtucker@openbsd.org
bd69e29f57
upstream: Remove errant "set -x" left over from debugging.
...
OpenBSD-Regress-ID: cd989268e034264cec5df97be7581549032c87dc
2022-01-08 19:01:43 +11:00
dtucker@openbsd.org
1a7c88e26f
upstream: Enable all supported hostkey algorithms (but no others).
...
Allows hostbased test to pass when built without OpenSSL.
OpenBSD-Regress-ID: 5ddd677a68b672517e1e78460dc6ca2ccc0a9562
2022-01-08 18:42:01 +11:00
dtucker@openbsd.org
dc38236ab6
upstream: Don't explicitly set HostbasedAuthentication in
...
sshd_config. It defaults to "no", and not explicitly setting it allows us to
enable it for the (optional) hostbased test.
OpenBSD-Regress-ID: aa8e3548eb5793721641d26e56c29f363b767c0c
2022-01-07 09:50:07 +11:00
dtucker@openbsd.org
e12d912ddf
upstream: Add test for hostbased auth. It requires some external
...
setup (see comments at the top) and thus is disabled unless
TEST_SSH_HOSTBASED_AUTH and SUDO are set.
OpenBSD-Regress-ID: 3ec8ba3750c5b595fc63e7845d13483065a4827a
2022-01-07 09:50:07 +11:00
djm@openbsd.org
294c11b1c7
upstream: select all RSA hostkey algorithms for UpdateHostkeys tests,
...
not just RSA-SHA1
OpenBSD-Regress-ID: b40e62b65863f2702a0c10aca583b2fe76772bd8
2022-01-05 19:31:37 +11:00
djm@openbsd.org
2ea1108c30
upstream: regress test both sshsig message hash algorithms, possible
...
now because the algorithm is controllable via the CLI
OpenBSD-Regress-ID: 0196fa87acc3544b2b4fd98de844a571cb09a39f
2022-01-05 16:06:09 +11:00
djm@openbsd.org
37a14249ec
upstream: regression test for find-principals NULL deref; from Fabian
...
Stelzer
OpenBSD-Regress-ID: f845a8632a5a7d5ae26978004c93e796270fd3e5
2022-01-05 15:12:46 +11:00
dtucker@openbsd.org
8f3b180305
upstream: Log command invocation while debugging.
...
This will aid in manually reproducing failing commands.
OpenBSD-Regress-ID: b4aba8d5ac5675ceebeeeefa3261ce344e67333a
2022-01-05 11:51:04 +11:00
djm@openbsd.org
c672f83a89
upstream: unbreak test: was picking up system ssh-add instead of the
...
one supposedly being tested. Spotted by dtucker and using his VM zoo (which
includes some systems old enough to lack ed25519 key support)
OpenBSD-Regress-ID: 7976eb3df11cc2ca3af91030a6a8c0cef1590bb5
2022-01-04 18:22:37 +11:00
Damien Miller
715c892f0a
remove sys/param.h in -portable, after upstream
2021-12-22 09:02:50 +11:00
Damien Miller
7a7c69d8b4
add agent-restrict.sh file, missed in last commit
2021-12-20 13:05:20 +11:00
djm@openbsd.org
f539136ca5
upstream: regression test for destination restrictions in ssh-agent
...
OpenBSD-Regress-ID: 3c799d91e736b1753b4a42d80c42fc40de5ad33d
2021-12-20 12:17:18 +11:00
anton@openbsd.org
6e4980eb8e
upstream: Make use of ntests variable, pointed out by clang 13.
...
OpenBSD-Regress-ID: 4241a3d21bdfa1630ed429b6d4fee51038d1be72
2021-12-20 12:16:49 +11:00
deraadt@openbsd.org
3eead81583
upstream: sys/param.h cleanup, mostly using MINIMUM() and
...
<limits.h> ok dtucker
OpenBSD-Regress-ID: 172a4c45d3bcf92fa6cdf6c4b9db3f1b3abe4db0
2021-12-20 12:16:49 +11:00
djm@openbsd.org
d4035c81a7
upstream: whitespac e
...
OpenBSD-Regress-ID: b9511d41568056bda489e13524390167889908f8
2021-11-27 18:25:23 +11:00
djm@openbsd.org
a443491e67
upstream: regression test for match-principals. Mostly by Fabian
...
Stelzer
OpenBSD-Regress-ID: ced0bec89af90935103438986bbbc4ad1df9cfa7
2021-11-27 18:22:47 +11:00
djm@openbsd.org
a823f39986
upstream: regression test for ssh-keygen -Y find-principals fix; from
...
Fabian Stelzer ok djm markus
OpenBSD-Regress-ID: 34fe4088854c1a2eb4c0c51cc4676ba24096bac4
2021-11-19 08:33:59 +11:00
djm@openbsd.org
ed45a01686
upstream: crank SSH_SK_VERSION_MAJOR to match recent change in
...
usr/bin/ssh
OpenBSD-Regress-ID: 113d181c7e3305e138db9b688cdb8b0a0019e552
2021-11-03 10:10:09 +11:00
djm@openbsd.org
0328a081f3
upstream: sshsig: add tests for signing key validity and
...
find-principals
- adds generic find-principals tests (this command had none before)
- tests certs with a timeboxed validity both with and without a
restriced lifetime for the CA
- test for a revoked CA cert
by Fabian Stelzer
OpenBSD-Regress-ID: 9704b2c6df5b8ccfbdf2c06c5431f5f8cad280c9
2021-10-29 14:25:32 +11:00
djm@openbsd.org
ccd358e1e2
upstream: avoid signedness warning; spotted in -portable
...
OpenBSD-Regress-ID: 4cacc126086487c0ea7f3d86b42dec458cf0d0c6
2021-10-29 14:25:32 +11:00
Damien Miller
a1217d363b
unbreak fuzz harness for recent changes
2021-10-29 13:48:59 +11:00
djm@openbsd.org
c5de1fffa6
upstream: increment SSH_SK_VERSION_MAJOR to match last change
...
OpenBSD-Regress-ID: 17873814d1cbda97f49c8528d7b5ac9cadf6ddc0
2021-10-28 13:57:52 +11:00
Darren Tucker
40bd3709dd
Skip SK unit tests when built without security-key
2021-10-07 15:55:49 +11:00