Commit Graph

1197 Commits

Author SHA1 Message Date
djm@openbsd.org fc5dc09283
upstream: this test has been broken since 2014, and has been
testing the same key exchange algorithm repeatedly instead of testing all of
them. Spotted by nreilly AT blackberry.com in bz3692

Who broke the test? me.

OpenBSD-Regress-ID: 48f4f5946276f975667141957d25441b3c9a50e2
2024-05-22 14:21:50 +10:00
anton@openbsd.org fd4816791b
upstream: Add missing kex-names.c source file required since the
ssh split.

OpenBSD-Regress-ID: ca666223f828fc4b069cb9016bff1eb50faf9fbb
2024-05-22 14:21:50 +10:00
djm@openbsd.org b88b690e99
upstream: allow overriding the sshd-session binary path
OpenBSD-Regress-ID: 5058cd1c4b6ca1a15474e33546142931d9f964da
2024-05-17 14:41:39 +10:00
anton@openbsd.org a68f80f251
upstream: Since ssh-agent(1) is only readable by root by now, use
ssh(1) while generating data in tests.

OpenBSD-Regress-ID: 24eb40de2e6b0ace185caaba35e2d470331ffe68
2024-05-17 14:41:39 +10:00
renmingshuai 00e6368892
Shell syntax fix (leftover from a sync).
Signed-off-by: renmingshuai <renmingshuai@huawei.com>
2024-04-25 13:33:39 +10:00
dtucker@openbsd.org 7844705b03
upstream: Use egrep instead of grep -E.
Some plaforms don't have the latter so this makes things easier
in -portable.

OpenBSD-Regress-ID: ff82260eb0db1f11130200b25d820cf73753bbe3
2024-03-29 22:01:20 +11:00
dtucker@openbsd.org 22b2b6c555
upstream: test -h is the POSIXly way of testing for a symlink. Reduces
diff vs Portable.

OpenBSD-Regress-ID: 6f31cd6e231e3b8c5c2ca0307573ccb7484bff7d
2024-03-29 21:43:24 +11:00
Darren Tucker 861b084429
Resync with upstream: ${} around DATAFILE. 2024-03-26 18:55:33 +11:00
djm@openbsd.org 63f248c769
upstream: optional debugging
OpenBSD-Regress-ID: b4852bf97ac8fb2e3530f2d5f999edd66058d7bc
2024-03-26 18:54:38 +11:00
dtucker@openbsd.org 16e2ebe06a
upstream: Verify string returned from local shell command.
OpenBSD-Regress-ID: 5039bde24d33d809aebfa8d3ad7fe9053224e6f8
2024-03-26 18:54:38 +11:00
dtucker@openbsd.org b326f7a1f3
upstream: Improve shell portability: grep -q is not portable so
redirect stdout, and use printf instead of relying on echo to do \n
substitution.  Reduces diff vs Portable.

Also resync somewhat with upstream.

OpenBSD-Regress-ID: 9ae876a8ec4c4725f1e9820a0667360ee2398337
2024-03-26 18:54:14 +11:00
dtucker@openbsd.org dbf2e319f0
upstream: Save error code from SSH for use inside case statement,
from portable. In some shells, "case" will reset the value of $?, so save it
first.

OpenBSD-Regress-ID: da32e5be19299cb4f0f7de7f29c11257a62d6949
2024-03-26 18:47:22 +11:00
dtucker@openbsd.org d2c8c4fa7d
upstream: Increase timeout. Resyncs with portable where some of
the test VMs are slow enough for this to matter.

OpenBSD-Regress-ID: 6a83a693602eb0312f06a4ad2cd6f40d99d24b26
2024-03-26 18:46:58 +11:00
dtucker@openbsd.org 83621b6351
upstream: In PuTTY interop test, don't assume the PuTTY major
version is 0. Patch from cjwatson at debian.org via bz#3671.

OpenBSD-Regress-ID: 835ed03c1b04ad46be82e674495521f11b840191
2024-03-26 18:46:29 +11:00
Darren Tucker dc37d2d247
If we're using xpg4's id, remember to pass args. 2024-03-26 16:26:14 +11:00
Darren Tucker 2d7964a03e
Move xpg4 'id' handling into test-exec.sh.
Handle replacement of 'id' the same way as we do other Portable specific
replacements in test-exec.sh.  This brings percent.sh back into sync
with upstream.
2024-03-25 14:05:40 +11:00
Damien Miller 26b09b45fe
quote regexes used to test for algorithm support
Fixes test failures on Solaris 8 reported by Tom G. Christensen
2024-03-10 16:24:57 +11:00
dtucker@openbsd.org 2f9d2af5cb
upstream: Invoke ProxyCommand that uses stderr redirection via
$TEST_SHELL. Fixes test when run by a user whose login shell is tcsh.
Found by vinschen at redhat.com.

OpenBSD-Regress-ID: f68d79e7f00caa8d216ebe00ee5f0adbb944062a
2024-03-08 23:12:10 +11:00
Damien Miller d52b650921
disable RSA tests when algorithm is not supported
Unbreaks "make test" when compiled --without-openssl.

Similar treatment to how we do DSA and ECDSA.
2024-03-06 11:31:36 +11:00
dtucker@openbsd.org e27f032aa8
upstream: Always define puttysetup function.
OpenBSD-Regress-ID: b4c0ccfa4006a1bc5dfd99ccf21c854d3ce2aee0
2024-02-19 20:35:31 +11:00
dtucker@openbsd.org 84046f9991
upstream: Exapnd PuTTY test coverage.
Expand the set of ciphers, MACs and KEX methods in the PuTTY interop
tests.

OpenBSD-Regress-ID: dd28d97d48efe7329a396d0d505ee2907bf7fc57
2024-02-19 18:49:00 +11:00
dtucker@openbsd.org bbf541ee2a
upstream: Factor out PuTTY setup.
Factor out PuTTY and call only when needed.

This allows us to avoid PuTTY key setup when it's not needed, which
speeds up the overall test run by a couple of percent.

OpenBSD-Regress-ID: c25eaccc3c91bc874400f7c85ce40e9032358c1c
2024-02-19 18:48:26 +11:00
Darren Tucker 0f6a8a0d0a
Use "skip" function instead doing it ourselves. 2024-02-06 11:18:44 +11:00
Damien Miller 0d96b1506b
skip tests that use multiplexing on Windows
Some tests here use multiplexing, skip these if DISABLE_FD_PASSING
is set. Should unbreak tests on Windows.
2024-01-16 14:40:18 +11:00
djm@openbsd.org 50080fa42f
upstream: don't disable RSA test when DSA is disabled; bug introduced
in last commit

OpenBSD-Regress-ID: 8780a7250bf742b33010e9336359a1c516f2d7b5
2024-01-11 15:56:37 +11:00
djm@openbsd.org 415c94ce17
upstream: make DSA testing optional, defaulting to on
ok markus

OpenBSD-Regress-ID: dfc27b5574e3f19dc4043395594cea5f90b8572a
2024-01-11 15:55:19 +11:00
djm@openbsd.org 9707c8170c
upstream: extend ChannelTimeout regression test to exercise multiplexed
connections and the new "global" timeout type. ok dtucker@

OpenBSD-Regress-ID: f10d19f697024e9941acad7c2057f73d6eacb8a2
2024-01-10 09:25:04 +11:00
Damien Miller 698fe6fd61
update fuzzer example makefile to clang16 2024-01-08 14:46:19 +11:00
Damien Miller fc332cb2d6
unbreak fuzzers - missing pkcs11_make_cert()
provide stub for use in fuzzer harness
2024-01-08 14:45:49 +11:00
djm@openbsd.org e48cdee8e1
upstream: regress test for agent PKCS#11-backed certificates
OpenBSD-Regress-ID: 38f681777cb944a8cc3bf9d0ad62959a16764df9
2023-12-19 01:57:37 +11:00
djm@openbsd.org 2f512f862d
upstream: regress test for constrained PKCS#11 keys
OpenBSD-Regress-ID: b2f26ae95d609d12257b43aef7cd7714c82618ff
2023-12-19 01:57:16 +11:00
dtucker@openbsd.org c8ed7cc545
upstream: Specify ssh binary to use
... instead of relying on installed one.  Fixes test failures in -portable
when running tests prior to installation.

OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685
2023-11-01 13:55:45 +11:00
djm@openbsd.org 7ddf27668f
upstream: add some tests of forced commands overriding Subsystem
directives

OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b
2023-11-01 11:39:55 +11:00
dtucker@openbsd.org fb06f9b5a0
upstream: Don't try to use sudo inside sshd log wrapper.
We still need to check if we're using sudo since we don't want to chown
unecessarily, as on some platforms this causes an error which pollutes
stderr. We also don't want to unnecessarily invoke sudo, since it's
running in the context of the proxycommand, on *other* platforms it
may not be able to authenticate, and if we're using SUDO then it should
already be privileged.

OpenBSD-Regress-ID: 70d58df7503db699de579a9479300e5f3735f4ee
2023-10-31 15:35:53 +11:00
dtucker@openbsd.org fc3cc33e88
upstream: Only try to chmod logfile if we have sudo. If we don't have
sudo then we won't need to chmod.

OpenBSD-Regress-ID: dbad2f5ece839658ef8af3376cb1fb1cabe2e324
2023-10-31 14:01:25 +11:00
djm@openbsd.org 3a506598fd
upstream: move PKCS#11 setup code to test-exec.sh so it can be reused
elsewhere

OpenBSD-Regress-ID: 1d29e6be40f994419795d9e660a8d07f538f0acb
2023-10-31 10:04:32 +11:00
djm@openbsd.org f82fa227a5
upstream: tidy and refactor PKCS#11 setup code
Replace the use of a perl script to delete the controlling TTY with a
SSH_ASKPASS script to directly load the PIN.

Move PKCS#11 setup code to functions in anticipation of it being used
elsewhere in additional tests.

Reduce stdout spam

OpenBSD-Regress-ID: 07705c31de30bab9601a95daf1ee6bef821dd262
2023-10-31 04:36:27 +11:00
dtucker@openbsd.org 1d6a878ceb
upstream: Only try to chown logfiles that exist to prevent spurious
errors.

OpenBSD-Regress-ID: f1b20a476734e885078c481f1324c9ea03af991e
2023-10-29 17:33:18 +11:00
anton@openbsd.org e612376427
upstream: make use of bsd.regress.mk in extra and interop targets; ok
dtucker@

OpenBSD-Regress-ID: 7ea21b5f6fc4506165093b2123d88d20ff13a4f0
2023-10-29 17:32:47 +11:00
dtucker@openbsd.org ea00391739
upstream: Skip conch interop tests when not enabled instead of fatal.
OpenBSD-Regress-ID: b0abf81c24ac6c21f367233663228ba16fa96a46
2023-10-27 00:02:26 +11:00
anton@openbsd.org a611e4db40
upstream: ssh conch interop tests requires a controlling terminal;
ok dtucker@

OpenBSD-Regress-ID: cbf2701bc347c2f19d907f113779c666f1ecae4a
2023-10-26 23:44:53 +11:00
anton@openbsd.org da951b5e08
upstream: Use private key that is allowed by sshd defaults in conch
interop tests.

ok dtucker@

OpenBSD-Regress-ID: 3b7f65c8f409c328bcd4b704f60cb3d31746f045
2023-10-26 23:34:29 +11:00
Darren Tucker f993bb5835
Resync PuTTY and Conch path handling with upstream.
Now that configure finds these for us we can remove these -portable
specific changes.
2023-10-20 20:39:03 +11:00
dtucker@openbsd.org c54a50359b
upstream: Allow overriding the locations of the Dropbear binaries
similar to what we do for the PuTTY ones.

OpenBSD-Regress-ID: 7de0e00518fb0c8fdc5f243b7f82f523c936049c
2023-10-20 20:28:20 +11:00
dtucker@openbsd.org fbaa707d45
upstream: Add interop test with Dropbear.
Right now this is only dbclient not the Dropbear server since it won't
currently run as a ProxyCommand.

OpenBSD-Regress-ID: 8cb898c414fcdb252ca6328896b0687acdaee496
2023-10-20 18:35:32 +11:00
Damien Miller 6eee8c972d
run t-extra regress tests
This exposes the t-extra regress tests (including agent-pkcs11.sh) as
a new extra-tests target in the top level Makefile and runs them by
default. ok dtucker@
2023-10-13 15:15:05 +11:00
djm@openbsd.org c616e64688
upstream: typos and extra debug trace calls
OpenBSD-Regress-ID: 98a2a6b9333743274359e3c0f0e65cf919a591d1
2023-10-12 14:52:46 +11:00
djm@openbsd.org c49a3fbf10
upstream: ensure logs are owned by correct user; feedback/ok
dtucker@

OpenBSD-Regress-ID: c3297af8f07717f1d400a5d34529962f1a76b5a3
2023-10-12 14:52:45 +11:00
djm@openbsd.org 90b0d73d63
upstream: typo in error message
OpenBSD-Regress-ID: 6a8edf0dc39941298e3780b147b10c0a600b4fee
2023-10-06 14:33:37 +11:00
djm@openbsd.org e84517f515
upstream: Perform the softhsm2 setup as discrete steps rather than
as a long shell pipeline. Makes it easier to figure out what has happened
when it breaks.

OpenBSD-Regress-ID: b3f1292115fed65765d0a95414df16e27772d81c
2023-10-06 14:31:20 +11:00