Commit Graph

11206 Commits

Author SHA1 Message Date
djm@openbsd.org d247a73ce2 upstream: regression test for scp -3
OpenBSD-Regress-ID: b44375d125c827754a1f722ec6b6b75b634de05d
2021-08-06 16:57:37 +10:00
dtucker@openbsd.org 35c8e41a6f upstream: Document "ProxyJump none". bz#3334.
OpenBSD-Commit-ID: f78cc6f55731f2cd35c3a41d5352ac1ee419eba7
2021-08-06 16:54:34 +10:00
dtucker@openbsd.org 911ec64118 upstream: Allow for different (but POSIX compliant) behaviour of
basename(3) and prevent a use-after-free in that case in the new sftp-compat
code.

POSIX allows basename(3) to either return a pointer to static storage
or modify the passed string and return a pointer to that.  OpenBSD does
the former and works as is, but on other platforms "filename" points
into "tmp" which was just freed.  This makes the freeing of tmp
consistent with the other variable in the loop.

Pinpointed by the -portable Valgrind regress test.  ok djm@ deraadt@

OpenBSD-Commit-ID: 750f3c19bd4440e4210e30dd5d7367386e833374
2021-08-04 12:04:33 +10:00
Damien Miller 6df1fecb5d use openbsd-compat glob.h is required 2021-08-04 11:05:11 +10:00
Darren Tucker 9ebd182888 Missing space between macro arg and punctuation.
From jmc@
2021-08-03 21:03:23 +10:00
Darren Tucker 0fd3f62edd Avoid lines >80 chars. From jmc@ 2021-08-03 21:02:33 +10:00
djm@openbsd.org af5d8094d8 upstream: regression tests for scp SFTP protocol support; mostly by
Jakub Jelen in GHPR#194 ok markus

OpenBSD-Regress-ID: 36f1458525bcb111741ec8547eaf58b13cddc715
2021-08-03 11:15:06 +10:00
anton@openbsd.org e4673b7f67 upstream: Treat doas with arguments as a valid SUDO variable.
Allows one to specify SUDO="doas -n" which I do while running make regress.

ok dtucker@

OpenBSD-Regress-ID: 4fe5814b5010dbf0885500d703bea06048d11005
2021-08-03 11:08:46 +10:00
djm@openbsd.org 197e29f1cc upstream: support for using the SFTP protocol for file transfers in
scp, via a new "-M sftp" option. Marked as experimental for now.

Some corner-cases exist, in particular there is no attempt to
provide bug-compatibility with scp's weird "double shell" quoting
rules.

Mostly by Jakub Jelen in GHPR#194 with some tweaks by me. ok markus@
Thanks jmc@ for improving the scp.1 bits.

OpenBSD-Commit-ID: 6ce4c9157ff17b650ace571c9f7793d92874051c
2021-08-03 11:03:09 +10:00
jmc@openbsd.org dd533c7ab7 upstream: fix a formatting error and add some Xr; from debian at
helgefjell de

removed references to rlogin etc. as no longer relevant;
suggested by djm

ok djm dtucker

OpenBSD-Commit-ID: 3c431c303068d3aec5bb18573a0bd5e0cd77c5ae
2021-08-03 09:39:58 +10:00
jmc@openbsd.org c7cd347a88 upstream: fix a formatting error and mark up known_hosts
consistently; issues reported by debian at helgefjell de

ok djm dtucker

OpenBSD-Commit-ID: a1fd8d21dc77f507685443832df0c9700481b0ce
2021-08-03 09:39:58 +10:00
jmc@openbsd.org 4455aec2e4 upstream: no need to talk about version 2 with the -Q option, so
rewrite the text to read better;

issue reported by debian at helgefjell de
ok djm dtucker

OpenBSD-Commit-ID: 59fe2e8219c37906740ad062e0fdaea487dbe9cf
2021-08-03 09:39:57 +10:00
jmc@openbsd.org bec429338e upstream: word fix; reported by debian at helgefjell de
OpenBSD-Commit-ID: 0c6fd22142422a25343c5bd1a618f31618f41ece
2021-08-03 09:39:57 +10:00
jmc@openbsd.org efad4deb5a upstream: standardise the grammar in the options list; issue
reported by debian at helgefjell de

ok dtucker djm

OpenBSD-Commit-ID: 7ac15575045d82f4b205a42cc7d5207fe4c3f8e6
2021-08-03 09:39:57 +10:00
Darren Tucker 1e11fb2406 Check for RLIMIT_NOFILE before trying to use it. 2021-08-02 18:56:29 +10:00
Darren Tucker 0f494236b4 lastenv is only used in setenv.
Prevents an unused variable warning on platforms that have setenv but
not unsetenv.
2021-07-27 17:45:34 +10:00
Darren Tucker a1f78e08bd Move SUDO to "make test" command line.
Environment variables don't get passed by vmrun, so move to command
line.
2021-07-26 12:45:30 +10:00
Darren Tucker 02e624273b Set SUDO for tests and cleanup. 2021-07-25 23:26:36 +10:00
Darren Tucker 460ae5d930 Pass OPENSSL=no to make tests too. 2021-07-25 22:37:55 +10:00
dtucker@openbsd.org b398f499c6 upstream: Skip unit and makefile-based key conversion tests when
we're building with OPENSSL=no.

OpenBSD-Regress-ID: 20455ed9a977c93f846059d1fcb48e29e2c8d732
2021-07-25 22:37:19 +10:00
dtucker@openbsd.org 727ce36c8c upstream: Replace OPENSSL as the variable that points to the
openssl binary with OPENSSL_BIN.  This will allow us to use the OPENSSL
variable from mk.conf or the make(1) command line indicating if we're
building with our without OpenSSL, and ultimately get the regress tests
working in the OPENSSL=no configuration.

OpenBSD-Regress-ID: 2d788fade3264d7803e5b54cae8875963f688c4e
2021-07-25 22:35:24 +10:00
dtucker@openbsd.org 55e17101a9 upstream: Skip RFC4716 format import and export tests when built
without OpenSSL.

OpenBSD-Regress-ID: d2c2d5d38c1acc2b88cc99cfe00a2eb8bb39dfa4
2021-07-24 14:22:45 +10:00
dtucker@openbsd.org f5ccb5895d upstream: Don't omit ssh-keygen -y from usage when built without
OpenSSL.  It is actually available, albeit only for ed25519 keys.

OpenBSD-Commit-ID: 7a254c33d0e6a55c30c6b016a8d298d3cb7a7674
2021-07-24 14:22:26 +10:00
dtucker@openbsd.org 819d57ac23 upstream: Exclude key conversion options from usage when built
without OpenSSL since those are not available, similar to what we currently
do with the moduli screening options.  We can also use this to skip the
conversion regression tests in this case.

OpenBSD-Commit-ID: 3c82caa398cf99cd4518c23bba5a2fc66b16bafe
2021-07-24 14:22:26 +10:00
Darren Tucker b6673b1d2e Test OpenBSD upstream with and without OpenSSL. 2021-07-24 14:20:12 +10:00
djm@openbsd.org 9d38074b54 upstream: test for first-match-wins in authorized_keys environment=
options

OpenBSD-Regress-ID: 1517c90276fe84b5dc5821c59f88877fcc34c0e8
2021-07-24 12:31:05 +10:00
dtucker@openbsd.org 2b76f1dd19 upstream: Simplify keygen-convert by using $SSH_KEYTYPES directly.
OpenBSD-Regress-ID: cdbe408ec3671ea9ee9b55651ee551370d2a4108
2021-07-24 12:31:05 +10:00
djm@openbsd.org 7d64a9fb58 upstream: don't leak environment= variable when it is not the first
match

OpenBSD-Commit-ID: 7fbdc3dfe0032deaf003fd937eeb4d434ee4efe0
2021-07-24 12:30:58 +10:00
jmc@openbsd.org db2130e234 upstream: punctuation;
OpenBSD-Commit-ID: 64be152e378c45975073ab1c07e0db7eddd15806
2021-07-24 12:30:58 +10:00
djm@openbsd.org 03190d1098 upstream: mention in comment that read_passphrase(..., RP_ALLOW_STDIN)
will try to use askpass first. bz3314

convert a couple of debug() -> debug_f() while here

OpenBSD-Commit-ID: c7e812aebc28fcc5db06d4710e0f73613dee545c
2021-07-23 15:57:56 +10:00
dtucker@openbsd.org 1653ece683 upstream: Test conversion of ed25519 and ecdsa keys too.
OpenBSD-Regress-ID: 3676d2d00e58e0d6d37f2878f108cc2b83bbe4bb
2021-07-23 15:25:34 +10:00
dtucker@openbsd.org 8b7af02dcf upstream: Add test for exporting pubkey from a passphrase-protected
private key.

OpenBSD-Regress-ID: da99d93e7b235fbd5b5aaa01efc411225e6ba8ac
2021-07-23 15:25:34 +10:00
djm@openbsd.org 441095d4a3 upstream: regression test for time-limited signature keys
OpenBSD-Regress-ID: 2a6f3bd900dbee0a3c96f1ff23e032c93ab392bc
2021-07-23 15:25:34 +10:00
djm@openbsd.org 9e1882ef64 upstream: note successful authentication method in final "Authenticated
to ..." message and partial auth success messages (all at LogLevel=verbose)
ok dtucker@

OpenBSD-Commit-ID: 06834b89ceb89f8f16c5321d368a66c08f441984
2021-07-23 15:25:19 +10:00
djm@openbsd.org a917e973a1 upstream: Add a ForkAfterAuthentication ssh_config(5) counterpart
to the ssh(1) -f flag. Last part of GHPR231 from Volker Diels-Grabsch. ok
dtucker

OpenBSD-Commit-ID: b18aeda12efdebe2093d55263c90fe4ea0bce0d3
2021-07-23 14:07:19 +10:00
djm@openbsd.org e0c5088f1c upstream: Add a StdinNull directive to ssh_config(5) that allows
the config file to do the same thing as -n does on the ssh(1) commandline.
Patch from Volker Diels-Grabsch via GHPR231; ok dtucker

OpenBSD-Commit-ID: 66ddf3f15c76796d4dcd22ff464aed1edd62468e
2021-07-23 14:07:19 +10:00
djm@openbsd.org e3957e21ff upstream: make authorized_keys environment="..." directives
first-match-wins and more strictly limit their maximum number; prompted by
OOM reported by OSS-fuzz (35470).

feedback and ok dtucker@

OpenBSD-Commit-ID: 01f63fc10dcd995e7aed9c378ad879161af83121
2021-07-23 14:07:19 +10:00
djm@openbsd.org d0bb1ce731 upstream: Let allowed signers files used by ssh-keygen(1)
signatures support key lifetimes, and allow the verification mode to specify
a signature time to check at. This is intended for use by git to support
signing objects using ssh keys. ok dtucker@

OpenBSD-Commit-ID: 3e2c67b7dcd94f0610194d1e8e4907829a40cf31
2021-07-23 14:07:19 +10:00
dtucker@openbsd.org 44142068dc upstream: Use SUDO when setting up hostkey.
OpenBSD-Regress-ID: 990cf4481cab8dad62e90818a9b4b36c533851a7
2021-07-19 19:20:33 +10:00
dtucker@openbsd.org 6b67f3f1d1 upstream: Increase time margin for rekey tests. Should help
reliability on very heavily loaded hosts.

OpenBSD-Regress-ID: 4c28a0fce3ea89ebde441d7091464176e9730533
2021-07-19 17:08:56 +10:00
Darren Tucker 7953e1bfce Add sshfp-connect.sh file missed in previous. 2021-07-19 13:47:51 +10:00
dtucker@openbsd.org b75a80fa83 upstream: Ensure that all returned SSHFP records for the specified host
name and hostkey type match instead of only one.  While there, simplify the
code somewhat and add some debugging.  Based on discussion in bz#3322, ok
djm@.

OpenBSD-Commit-ID: 0a6a0a476eb7f9dfe8fe2c05a1a395e3e9b22ee4
2021-07-19 13:46:13 +10:00
dtucker@openbsd.org 1cc1fd0953 upstream: Id sync only, -portable already has this.
Put dh_set_moduli_file call inside ifdef WITH_OPENSSL. Fixes
build with OPENSSL=no.

OpenBSD-Commit-ID: af54abbebfb12bcde6219a44d544e18204defb15
2021-07-19 13:04:52 +10:00
dtucker@openbsd.org 33abbe2f41 upstream: Add test for host key verification via SSHFP records. This
requires some external setup to operate so is disabled by default (see
comments in sshfp-connect.sh).

OpenBSD-Regress-ID: c52c461bd1df3a803d17498917d156ef64512fd9
2021-07-19 13:02:55 +10:00
dtucker@openbsd.org f0cd000d8e upstream: Add ed25519 key and test SSHFP export of it. Only test
RSA SSHFP export if we have RSA functionality compiled in.

OpenBSD-Regress-ID: b4ff5181b8c9a5862e7f0ecdd96108622333a9af
2021-07-19 12:50:51 +10:00
dtucker@openbsd.org 0075511e27 upstream: Group keygen tests together.
OpenBSD-Regress-ID: 07e2d25c527bb44f03b7c329d893a1f2d6c5c40c
2021-07-19 12:50:12 +10:00
dtucker@openbsd.org 034828820c upstream: Add test for ssh-keygen printing of SSHFP records.
OpenBSD-Regress-ID: fde9566b56eeb980e149bbe157a884838507c46b
2021-07-19 09:23:57 +10:00
djm@openbsd.org 52c3b6985e upstream: wrap some long lines
OpenBSD-Commit-ID: 4f5186b1466656762dae37d3e569438d900c350d
2021-07-17 10:43:23 +10:00
djm@openbsd.org 43ec991a78 upstream: fix sftp on ControlPersist connections, broken by recent
SessionType change; spotted by sthen@

OpenBSD-Commit-ID: 4c5ddc5698790ae6ff50d2a4f8f832f0eeeaa234
2021-07-17 10:43:23 +10:00
djm@openbsd.org 073f45c236 upstream: Explicitly check for and start time-based rekeying in the
client and server mainloops.

Previously the rekey timeout could expire but rekeying would not start
until a packet was sent or received. This could cause us to spin in
select() on the rekey timeout if the connection was quiet.

ok markus@

OpenBSD-Commit-ID: 4356cf50d7900f3df0a8f2117d9e07c91b9ff987
2021-07-16 19:21:04 +10:00