]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
2 years agoSimply handling of SSH_CONNECTION PAM env var.
Darren Tucker [Mon, 19 Dec 2022 07:49:51 +0000 (18:49 +1100)] 
Simply handling of SSH_CONNECTION PAM env var.

Prompted by bz#3508: there's no need to cache the value of
sshpam_conninfo so remove the global.  While there, add check of
return value from pam_putenv.  ok djm@

2 years agoAdd tests for LibreSSL 3.7.0 and OpenSSL 1.1.1s.
Darren Tucker [Mon, 19 Dec 2022 07:42:34 +0000 (18:42 +1100)] 
Add tests for LibreSSL 3.7.0 and OpenSSL 1.1.1s.

2 years agoUse sudo when resetting perms on directories.
Darren Tucker [Sun, 18 Dec 2022 10:36:25 +0000 (21:36 +1100)] 
Use sudo when resetting perms on directories.

2 years agoSet group perms on regress dir.
Darren Tucker [Sun, 18 Dec 2022 10:19:33 +0000 (21:19 +1100)] 
Set group perms on regress dir.

This ensures that the tests don't fail due to StrictMode checks.

2 years agoFetch regress logs from obj dir.
Darren Tucker [Sun, 18 Dec 2022 10:13:42 +0000 (21:13 +1100)] 
Fetch regress logs from obj dir.

2 years agoobsdsnap test VMs runs-on libvirt too.
Darren Tucker [Tue, 13 Dec 2022 09:59:54 +0000 (20:59 +1100)] 
obsdsnap test VMs runs-on libvirt too.

2 years agoRun upstream obsdsnap tests on ephemeral runners.
Darren Tucker [Tue, 13 Dec 2022 09:55:37 +0000 (20:55 +1100)] 
Run upstream obsdsnap tests on ephemeral runners.

2 years agoMove obsdsnap test VMs to ephemeral runners.
Darren Tucker [Tue, 13 Dec 2022 09:48:56 +0000 (20:48 +1100)] 
Move obsdsnap test VMs to ephemeral runners.

2 years agouse calloc for allocating arc4random structs
Damien Miller [Fri, 9 Dec 2022 07:00:21 +0000 (18:00 +1100)] 
use calloc for allocating arc4random structs

ok dtucker

2 years agoupstream: Warn if no host keys for hostbased auth can be loaded.
dtucker@openbsd.org [Fri, 9 Dec 2022 00:22:29 +0000 (00:22 +0000)] 
upstream: Warn if no host keys for hostbased auth can be loaded.

OpenBSD-Commit-ID: 2a0a13132000cf8d3593133c1b49768aa3c95977

2 years agoupstream: Add server debugging for hostbased auth.
dtucker@openbsd.org [Fri, 9 Dec 2022 00:17:40 +0000 (00:17 +0000)] 
upstream: Add server debugging for hostbased auth.

auth_debug_add queues messages about the auth process which is sent to
the client after successful authentication.  This also sends those to
the server debug log to aid in debugging.  From bz#3507, ok djm@

OpenBSD-Commit-ID: 46ff67518cccf9caf47e06393e2a121ee5aa258a

2 years agoupstream: remove '?' from getopt(3) loops
cheloha@openbsd.org [Sun, 4 Dec 2022 23:50:49 +0000 (23:50 +0000)] 
upstream: remove '?' from getopt(3) loops

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@

OpenBSD-Commit-ID: b2f89346538ce4f5b33ab8011a23e0626a67e66e

2 years agoupstream: Fix comment typo.
dtucker@openbsd.org [Wed, 7 Dec 2022 11:45:43 +0000 (11:45 +0000)] 
upstream: Fix comment typo.

OpenBSD-Regress-ID: 3b04faced6511bb5e74648c6a4ef4bf2c4decf03

2 years agoAdd SANDBOX_DEBUG to the kitchensink test build.
Darren Tucker [Wed, 7 Dec 2022 07:58:25 +0000 (18:58 +1100)] 
Add SANDBOX_DEBUG to the kitchensink test build.

2 years agodisable SANDBOX_SECCOMP_FILTER_DEBUG
Damien Miller [Wed, 7 Dec 2022 07:38:25 +0000 (18:38 +1100)] 
disable SANDBOX_SECCOMP_FILTER_DEBUG

It was mistakenly enabled in 2580916e4872

Reported by Peter sec-openssh-com.22.fichtner AT 0sg.net

2 years agoUpdate autotools
Rose [Tue, 29 Nov 2022 20:12:54 +0000 (15:12 -0500)] 
Update autotools

Regenerate config files using latest autotools

2 years agoFix typo in comment. Spotted by tim@
Darren Tucker [Tue, 6 Dec 2022 01:22:36 +0000 (12:22 +1100)] 
Fix typo in comment.  Spotted by tim@

2 years agoupstream: Remove duplicate includes.
dtucker@openbsd.org [Sun, 4 Dec 2022 11:03:11 +0000 (11:03 +0000)] 
upstream: Remove duplicate includes.

 Patch from AtariDreams via github PR#364.

OpenBSD-Commit-ID: b9186638a05cb8b56ef7c0de521922b6723644ea

2 years agoupstream: make struct sshbuf private
djm@openbsd.org [Fri, 2 Dec 2022 04:40:27 +0000 (04:40 +0000)] 
upstream: make struct sshbuf private

and remove an unused field; ok dtucker

OpenBSD-Commit-ID: c7a3d77c0b8c153d463398606a8d57569186a0c3

2 years agoRestore ssh-agent permissions on exit.
Darren Tucker [Fri, 2 Dec 2022 00:43:36 +0000 (11:43 +1100)] 
Restore ssh-agent permissions on exit.

...enough that subsequent builds can overwrite ssh-agent if necessary.

2 years agoupstream: Clean up ssh-add and ssh-agent logs.
dtucker@openbsd.org [Thu, 1 Dec 2022 02:22:13 +0000 (02:22 +0000)] 
upstream: Clean up ssh-add and ssh-agent logs.

OpenBSD-Regress-ID: 9eda8e4c3714d7f943ab2e73ed58a233bd29cd2c

2 years agoupstream: Log output of ssh-agent and ssh-add
dtucker@openbsd.org [Thu, 1 Dec 2022 02:19:29 +0000 (02:19 +0000)] 
upstream: Log output of ssh-agent and ssh-add

This should  make debugging easier.

OpenBSD-Regress-ID: 5974b02651f428d7e1079b41304c498ca7e306c8

2 years agoupstream: Add void to client_repledge args to fix compiler warning. ok djm@
dtucker@openbsd.org [Tue, 29 Nov 2022 22:41:14 +0000 (22:41 +0000)] 
upstream: Add void to client_repledge args to fix compiler warning. ok djm@

OpenBSD-Commit-ID: 7e964a641ce4a0a0a11f047953b29929d7a4b866

2 years agoupstream: tighten pledge(2) after session establishment
djm@openbsd.org [Mon, 28 Nov 2022 01:38:22 +0000 (01:38 +0000)] 
upstream: tighten pledge(2) after session establishment

feedback, ok & testing in snaps deraadt@

OpenBSD-Commit-ID: aecf4d49d28586dfbcc74328d9333398fef9eb58

2 years agoupstream: New EnableEscapeCommandline ssh_config(5) option
djm@openbsd.org [Mon, 28 Nov 2022 01:37:36 +0000 (01:37 +0000)] 
upstream: New EnableEscapeCommandline ssh_config(5) option

This option (default "no") controls whether the ~C escape is available.
Turning it off by default means we will soon be able to use a stricter
default pledge(2) in the client.

feedback deraadt@ dtucker@; tested in snaps for a while

OpenBSD-Commit-ID: 7e277595d60acb8263118dcb66554472257b387a

2 years agoupstream: In channel_request_remote_forwarding the parameters for
mbuhl@openbsd.org [Fri, 18 Nov 2022 19:47:40 +0000 (19:47 +0000)] 
upstream: In channel_request_remote_forwarding the parameters for

permission_set_add are leaked as they are also duplicated in the call. Found
by CodeChecker. ok djm

OpenBSD-Commit-ID: 4aef50fa9be7c0b138188814c8fe3dccc196f61e

2 years agoUse -fzero-call-used-regs=used on clang 15.
Darren Tucker [Wed, 30 Nov 2022 00:23:11 +0000 (11:23 +1100)] 
Use -fzero-call-used-regs=used on clang 15.

clang 15 seems to have a problem with -fzero-call-used-reg=all which
causes spurious "incorrect signature" failures with ED25519.  On those
versions, use -fzero-call-used-regs=used instead.  (We may add exceptions
later if specific versions prove to be OK).  Also move the GCC version
check to match.

Initial investigation by Daniel Pouzzner (douzzer at mega nu), workaround
suggested by Bill Wendling (morbo at google com).  bz#3475, ok djm@

2 years agoSkip unit tests on slow riscv64 hardware.
Darren Tucker [Mon, 28 Nov 2022 10:09:28 +0000 (21:09 +1100)] 
Skip unit tests on slow riscv64 hardware.

2 years agoRework how selfhosted tests interact with runners.
Darren Tucker [Sun, 27 Nov 2022 04:26:22 +0000 (15:26 +1100)] 
Rework how selfhosted tests interact with runners.

Previously there was one runner per test target (mostly VMs).  This had
a few limitations:
 - multiple tests that ran on the same target (eg multiple build
   configs) were serialized on availability or that runner.
 - it needed manual balancing of VMs over host machines.

To address this, make VMs that use ephemeral disks (ie most of them)
all use a pool of runners with the "libvirt" label.  This requires that
we distinguish between "host" and "target" for those.  Native runners
and VMs with persistent disks (eg the constantly-updated snapshot ones)
specify the same host and target.

This should improve test throughput.

2 years agoRun vmstartup from temp dir.
Darren Tucker [Sun, 27 Nov 2022 01:19:37 +0000 (12:19 +1100)] 
Run vmstartup from temp dir.

This will allow us to create ephemeral disk images per-runner.

2 years agoMake "config" in matrix singular and pass in env.
Darren Tucker [Sun, 27 Nov 2022 01:14:00 +0000 (12:14 +1100)] 
Make "config" in matrix singular and pass in env.

This will allow the startup scripts to adapt their behaviour based on
the type and config.

2 years agoAdd "libvirt" label to dfly30.
Darren Tucker [Sun, 27 Nov 2022 00:42:22 +0000 (11:42 +1100)] 
Add "libvirt" label to dfly30.

2 years agoRename "os" in matrix to "target".
Darren Tucker [Sat, 26 Nov 2022 22:28:20 +0000 (09:28 +1100)] 
Rename "os" in matrix to "target".

This is in preparation to distinguish this from the host that the runner
runs on in case where they are separate (eg VMs).

2 years agoRemove unused self-hosted test targets.
Darren Tucker [Sat, 26 Nov 2022 22:23:04 +0000 (09:23 +1100)] 
Remove unused self-hosted test targets.

2 years agoRemove explicit "default" test config argument.
Darren Tucker [Sat, 26 Nov 2022 22:16:15 +0000 (09:16 +1100)] 
Remove explicit "default" test config argument.

Not specifying the test config implicitly selects default args.

2 years agoAdd fallback for old platforms w/out MAP_ANON.
Darren Tucker [Wed, 23 Nov 2022 02:18:54 +0000 (13:18 +1100)] 
Add fallback for old platforms w/out MAP_ANON.

2 years agoIf we haven't found it yet, recheck for sys/stat.h.
Darren Tucker [Wed, 23 Nov 2022 02:09:11 +0000 (13:09 +1100)] 
If we haven't found it yet, recheck for sys/stat.h.

On some very old platforms, sys/stat.h needs sys/types.h, however
autoconf 2.71's AC_CHECK_INCLUDES_DEFAULT checks for them in the
opposite order, which in combination with modern autoconf's
"present but cannot be compiled" behaviour causes it to not be
detected.

2 years agoAdd dfly62 test target.
Darren Tucker [Fri, 11 Nov 2022 00:25:37 +0000 (11:25 +1100)] 
Add dfly62 test target.

2 years agoupstream: Handle dynamic remote port forwarding in escape commandline's
dtucker@openbsd.org [Thu, 10 Nov 2022 23:03:10 +0000 (23:03 +0000)] 
upstream: Handle dynamic remote port forwarding in escape commandline's

-R processing. bz#3499, ok djm@

OpenBSD-Commit-ID: 194ee4cfe7ed0e2b8ad0727f493c798a50454208

2 years agoRemove seed passing over reexec.
Darren Tucker [Thu, 10 Nov 2022 01:44:51 +0000 (12:44 +1100)] 
Remove seed passing over reexec.

This was added for the benefit of platforms using ssh-rand-helper to
prevent a delay on each connection as sshd reseeded itself.

ssh-random-helper is long gone, and since the re-exec happens before the
chroot the re-execed sshd can reseed itself normally. ok djm@

2 years agoSkip reexec test on OpenSSL 1.1.1 specifically.
Darren Tucker [Wed, 9 Nov 2022 09:59:20 +0000 (20:59 +1100)] 
Skip reexec test on OpenSSL 1.1.1 specifically.

OpenSSL 1.1.1 has a bug in its RNG that breaks reexec fallback, so skip
that test.  See bz#3483 for details.

2 years agoupstream: Fix typo in fatal error message.
dtucker@openbsd.org [Wed, 9 Nov 2022 09:04:12 +0000 (09:04 +0000)] 
upstream: Fix typo in fatal error message.

Patch from vapier at chromium.org.

OpenBSD-Commit-ID: 8a0c164a6a25eef0eedfc30df95bfa27644e35cf

2 years agoupstream: Remove errant colon and simplify format
dtucker@openbsd.org [Wed, 9 Nov 2022 09:01:52 +0000 (09:01 +0000)] 
upstream: Remove errant colon and simplify format

string in error messages. Patch from vapier at chromium.org.

OpenBSD-Commit-ID: fc28466ebc7b74e0072331947a89bdd239c160d3

2 years agoupstream: rename client_global_hostkeys_private_confirm() to
djm@openbsd.org [Wed, 9 Nov 2022 01:37:44 +0000 (01:37 +0000)] 
upstream: rename client_global_hostkeys_private_confirm() to

client_global_hostkeys_prove_confirm(), as it handles the
"hostkeys-prove00@openssh.com" message; no functional change

OpenBSD-Commit-ID: 31e09bd3cca6eed26855b88fb8beed18e9bd026d

2 years agoupstream: typo in comment
djm@openbsd.org [Wed, 9 Nov 2022 00:15:59 +0000 (00:15 +0000)] 
upstream: typo in comment

OpenBSD-Commit-ID: 39c58f41e0f32d1ff31731fa6f5bbbc3ad25084a

2 years agoDefer seed_rng until after closefrom call.
Darren Tucker [Tue, 8 Nov 2022 22:23:47 +0000 (09:23 +1100)] 
Defer seed_rng until after closefrom call.

seed_rng will initialize OpenSSL, and some engine providers (eg Intel's
QAT) will open descriptors for their own use.  bz#3483, patch from
joel.d.schuetze at intel.com, ok djm@

2 years agoFix comment text. From emaste at freebsd.org.
Darren Tucker [Tue, 8 Nov 2022 21:27:47 +0000 (08:27 +1100)] 
Fix comment text.  From emaste at freebsd.org.

2 years agoAvoid assuming layout of fd_set
Pierre Ossman [Wed, 6 Jul 2022 11:52:10 +0000 (13:52 +0200)] 
Avoid assuming layout of fd_set

POSIX doesn't specify the internal layout of the fd_set object, so let's
not assume it is just a bit mask. This increases compatibility with
systems that have a different layout.

The assumption is also worthless as we already refuse to use file
descriptors over FD_SETSIZE anyway. Meaning that the default size of
fd_set is quite sufficient.

2 years agoShutdown any VM before trying to check out repo.
Darren Tucker [Tue, 8 Nov 2022 01:42:52 +0000 (12:42 +1100)] 
Shutdown any VM before trying to check out repo.

In the case where the previous run did not clean up, the checkout will
fail as it'll leave a stale mount.

2 years agoRun vm startup and shutdown from runner temp dir.
Darren Tucker [Tue, 8 Nov 2022 00:33:25 +0000 (11:33 +1100)] 
Run vm startup and shutdown from runner temp dir.

Should work even if the github workspace dir is on a stale sshfs mount.

2 years agoAdd valrind-5 test here too.
Darren Tucker [Tue, 8 Nov 2022 00:03:31 +0000 (11:03 +1100)] 
Add valrind-5 test here too.

2 years agoUpdate checkout and upload actions.
Darren Tucker [Mon, 7 Nov 2022 22:21:10 +0000 (09:21 +1100)] 
Update checkout and upload actions.

Update actions/checkout and actions/upload-artifact to main branch for
compatibility with node.js v16.

2 years agoSplit out rekey test since it runs the longest.
Darren Tucker [Mon, 7 Nov 2022 22:17:04 +0000 (09:17 +1100)] 
Split out rekey test since it runs the longest.

2 years agoupstream: The IdentityFile option in ssh_config can also be used to
dtucker@openbsd.org [Mon, 7 Nov 2022 10:09:28 +0000 (10:09 +0000)] 
upstream: The IdentityFile option in ssh_config can also be used to

specify a public key file, as documented in ssh.1 for the -i option. Document
this also for IdentityFile in ssh_config.5, for documentation completeness.
From laalsaas at systemli.org via portable github PR#352, ok jmc@ djm@

OpenBSD-Commit-ID: 2f943be9f96e60ef81a9a4faa25b009999f9883b

2 years agoupstream: Remove some set but otherwise unused variables, spotted
dtucker@openbsd.org [Mon, 7 Nov 2022 10:05:38 +0000 (10:05 +0000)] 
upstream: Remove some set but otherwise unused variables, spotted

in -portable by clang 16's -Wunused-but-set-variable.  ok djm@

OpenBSD-Commit-ID: 3d943ddf2369b38fbf89f5f19728e7dc1daf3982

2 years agoupstream: Check for and disallow MaxStartups values less than or
dtucker@openbsd.org [Mon, 7 Nov 2022 10:02:59 +0000 (10:02 +0000)] 
upstream: Check for and disallow MaxStartups values less than or

equal to zero during config parsing, rather than faling later at runtime.
bz#3489, ok djm@

OpenBSD-Commit-ID: d79c2b7a8601eb9be493629a91245d761154308b

2 years agoupstream: fix parsing of hex cert expiry time; was checking whether the
djm@openbsd.org [Mon, 7 Nov 2022 04:04:40 +0000 (04:04 +0000)] 
upstream: fix parsing of hex cert expiry time; was checking whether the

start time began with "0x", not the expiry time.

from Ed Maste

OpenBSD-Commit-ID: 6269242c3e1a130b47c92cfca4d661df15f05739

2 years agoFix merge conflict.
Darren Tucker [Mon, 7 Nov 2022 04:10:59 +0000 (15:10 +1100)] 
Fix merge conflict.

2 years agoBranch-specific links for master status badges.
Darren Tucker [Mon, 7 Nov 2022 04:04:33 +0000 (15:04 +1100)] 
Branch-specific links for master status badges.

2 years agoAdd CIFuzz status badge.
Darren Tucker [Mon, 7 Nov 2022 03:46:38 +0000 (14:46 +1100)] 
Add CIFuzz status badge.

2 years agoDo not run CIFuzz on selfhosted tree.
Darren Tucker [Mon, 7 Nov 2022 03:45:16 +0000 (14:45 +1100)] 
Do not run CIFuzz on selfhosted tree.

We already run it on the regular tree, no need to double up.

2 years agoWhitespace change to trigger CIFuzz workflow.
Darren Tucker [Mon, 7 Nov 2022 03:41:58 +0000 (14:41 +1100)] 
Whitespace change to trigger CIFuzz workflow.

2 years agoRun cifuzz workflow on the actions as regular CI.
Darren Tucker [Mon, 7 Nov 2022 03:34:04 +0000 (14:34 +1100)] 
Run cifuzz workflow on the actions as regular CI.

2 years agoAdd CIFuzz integration
David Korczynski [Tue, 30 Nov 2021 11:45:20 +0000 (11:45 +0000)] 
Add CIFuzz integration

2 years agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Mon, 7 Nov 2022 02:21:22 +0000 (02:21 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: b0e54ee4d703bd6929bbc624068666a7a42ecb1f

2 years agoupstream: Fix typo. From pablomh via -portable github PR#344.
dtucker@openbsd.org [Mon, 7 Nov 2022 01:53:01 +0000 (01:53 +0000)] 
upstream: Fix typo. From pablomh via -portable github PR#344.

OpenBSD-Commit-ID: d056ee2e73691dc3ecdb44a6de68e6b88cd93827

2 years agoLink to branch-specific queries for V_9_1 status.
Darren Tucker [Mon, 7 Nov 2022 01:46:58 +0000 (12:46 +1100)] 
Link to branch-specific queries for V_9_1 status.

2 years agoUse "prohibit-password" in -portable comments.
Darren Tucker [Sat, 5 Nov 2022 23:55:59 +0000 (10:55 +1100)] 
Use "prohibit-password" in -portable comments.

"without-password" is the deprecated alias for "prohibit-password",
so we should reference the latter. From emaste at freebsd.org.

2 years agoFix tracing disable on FreeBSD.
Darren Tucker [Sat, 5 Nov 2022 23:50:01 +0000 (10:50 +1100)] 
Fix tracing disable on FreeBSD.

Some versions of FreeBSD do not support using id 0 to refer to the
current pid for procctl, so pass getpid() explicitly.  From
emaste at freebsd.org.

2 years agoFix setres*id checks to work with clang-16.
Darren Tucker [Sun, 6 Nov 2022 23:39:01 +0000 (10:39 +1100)] 
Fix setres*id checks to work with clang-16.

glibc has the prototypes for setresuid and setresgid behind _GNU_SOURCE,
and clang 16 will error out on implicit function definitions, so add
_GNU_SOURCE and the required headers to the configure checks.  From
sam at @gentoo.org via bz#3497.

2 years agoconfigure.ac: Fix -Wstrict-prototypes
Sam James [Sun, 6 Nov 2022 04:52:38 +0000 (04:52 +0000)] 
configure.ac: Fix -Wstrict-prototypes

Clang 16 now warns on this and it'll be removed in C23, so let's
just be future proof. It also reduces noise when doing general
Clang 16 porting work (which is a big job as it is).  github PR#355.

Signed-off-by: Sam James <sam@gentoo.org>
2 years agoconfigure.ac: Add <pty.h> include for openpty
Sam James [Sun, 6 Nov 2022 04:47:35 +0000 (04:47 +0000)] 
configure.ac: Add <pty.h> include for openpty

Another Clang 16ish fix (which makes -Wimplicit-function-declaration
an error by default).  github PR#355.

See: 2efd71da49b9cfeab7987058cf5919e473ff466b
See: be197635329feb839865fdc738e34e24afd1fca8

2 years agoFix broken zlib link.
Rochdi Nassah [Fri, 28 Oct 2022 00:26:31 +0000 (01:26 +0100)] 
Fix broken zlib link.

2 years agoDon't run openbsd-compat tests on Cygwin.
Darren Tucker [Fri, 4 Nov 2022 05:59:26 +0000 (16:59 +1100)] 
Don't run openbsd-compat tests on Cygwin.

Add "compat-tests" to the default TEST_TARGET so we can override as
necessary.  Override TEST_TARGET for Cygwin as the tests don't currently
compile there.

2 years agoupstream: replace recently-added valid_domain() check for hostnames
djm@openbsd.org [Thu, 3 Nov 2022 21:59:20 +0000 (21:59 +0000)] 
upstream: replace recently-added valid_domain() check for hostnames

going to known_hosts with a more relaxed check for bad characters; previous
commit broke address literals. Reported by/feedback from florian@

OpenBSD-Commit-ID: 10b86dc6a4b206adaa0c11b58b6d5933898d43e0

2 years agoRerun tests on changes to Makefile.in in any dir.
Darren Tucker [Thu, 3 Nov 2022 12:07:50 +0000 (23:07 +1100)] 
Rerun tests on changes to Makefile.in in any dir.

2 years agoLink libssh into compat tests.
Darren Tucker [Thu, 3 Nov 2022 12:04:08 +0000 (23:04 +1100)] 
Link libssh into compat tests.

The cygwin compat code uses xmalloc, so add libssh.a so pick up that.

2 years agoFix compat regress to work with non-GNU make.
Darren Tucker [Thu, 3 Nov 2022 10:44:23 +0000 (21:44 +1100)] 
Fix compat regress to work with non-GNU make.

2 years agoIncrease selfhosted job timeout.
Darren Tucker [Thu, 3 Nov 2022 02:41:16 +0000 (13:41 +1100)] 
Increase selfhosted job timeout.

The default job timeout of 360 (6h) is not enough to complete the
regress tests for some of the slow VMs depending on the load on the host.
Increase to 600 (10h).

2 years agoOnly run opensslver tests if built with OpenSSL.
Darren Tucker [Wed, 2 Nov 2022 23:00:43 +0000 (10:00 +1100)] 
Only run opensslver tests if built with OpenSSL.

2 years agoAdd tests for OpenSSL 3.0.7 and LibreSSL 3.6.1.
Darren Tucker [Wed, 2 Nov 2022 03:16:04 +0000 (14:16 +1100)] 
Add tests for OpenSSL 3.0.7 and LibreSSL 3.6.1.

2 years agoRun compat regress tests too.
Darren Tucker [Wed, 2 Nov 2022 21:17:39 +0000 (08:17 +1100)] 
Run compat regress tests too.

2 years agoCompat tests need libcrypto.
Darren Tucker [Wed, 2 Nov 2022 21:14:05 +0000 (08:14 +1100)] 
Compat tests need libcrypto.

This was moved to CHANNELLIBS during the libs refactor.  Spotted by
rapier at psc.edu.

2 years agoInclude time.h when defining timegm.
Darren Tucker [Wed, 2 Nov 2022 17:24:39 +0000 (04:24 +1100)] 
Include time.h when defining timegm.

Fixes build on some platforms eg recent AIX.

2 years agoAlways use compat getentropy.
Darren Tucker [Tue, 1 Nov 2022 08:10:30 +0000 (19:10 +1100)] 
Always use compat getentropy.

Have it call native getentropy and fall back as required.  Should fix
issues of platforms where libc has getentropy but it is not implemented
in the kernel.  Based on github PR#354 from simsergey.

2 years agoCheck for sockaddr_in.sin_len.
Darren Tucker [Tue, 1 Nov 2022 23:51:48 +0000 (10:51 +1100)] 
Check for sockaddr_in.sin_len.

If found, set SOCK_HAS_LEN which is used in addr.c.  Should fix keyscan
tests on platforms with this (eg old NetBSD).

2 years agoupstream: Use variable for diff options
dtucker@openbsd.org [Sun, 30 Oct 2022 18:42:07 +0000 (18:42 +0000)] 
upstream: Use variable for diff options

instead of unconditionally specifying "-rN". This will make life easier
in -portable where not all diff's understand -N.

OpenBSD-Regress-ID: 8b8a407115546be1c6d72d350b1e4f1f960d3cd3

2 years agoOpenSSL dev branch is 302 not 320.
Darren Tucker [Sun, 30 Oct 2022 18:13:02 +0000 (05:13 +1100)] 
OpenSSL dev branch is 302 not 320.

While there, also accept 301 which it shat it was previously.

2 years agoupstream: put sshkey_check_rsa_length() back in sshkey.c to unbreak
djm@openbsd.org [Fri, 28 Oct 2022 02:47:04 +0000 (02:47 +0000)] 
upstream: put sshkey_check_rsa_length() back in sshkey.c to unbreak

OPENSSL=no builds

OpenBSD-Commit-ID: 99eec58abe382ecd14b14043b195ee1babb9cf6e

2 years agoupstream: allow ssh-keyscan(1) to accept CIDR address ranges, e.g.
djm@openbsd.org [Fri, 28 Oct 2022 02:29:34 +0000 (02:29 +0000)] 
upstream: allow ssh-keyscan(1) to accept CIDR address ranges, e.g.

ssh-keyscan 192.168.0.0/24

If a CIDR range is passed, then it will be expanded to all possible
addresses in the range including the all-0s and all-1s addresses.

bz#976 feedback/ok markus@

OpenBSD-Commit-ID: ce6c5211f936ac0053fd4a2ddb415277931e6c4b

2 years agofix merge botch
Damien Miller [Fri, 28 Oct 2022 01:54:35 +0000 (12:54 +1100)] 
fix merge botch

2 years agoupstream: refactor sshkey_private_deserialize
djm@openbsd.org [Fri, 28 Oct 2022 00:44:44 +0000 (00:44 +0000)] 
upstream: refactor sshkey_private_deserialize

feedback/ok markus@

OpenBSD-Commit-ID: f5ca6932fdaf840a5e8250becb38315a29b5fc9f

2 years agoupstream: refactor sshkey_private_serialize_opt()
djm@openbsd.org [Fri, 28 Oct 2022 00:44:17 +0000 (00:44 +0000)] 
upstream: refactor sshkey_private_serialize_opt()

feedback/ok markus@

OpenBSD-Commit-ID: 61e0fe989897901294efe7c3b6d670cefaf44cbd

2 years agoupstream: refactor certify
djm@openbsd.org [Fri, 28 Oct 2022 00:43:30 +0000 (00:43 +0000)] 
upstream: refactor certify

feedback/ok markus@

OpenBSD-Commit-ID: 35d742992e223eaca3537e6fb3d3002c08eed4f6

2 years agoupstream: refactor sshkey_sign() and sshkey_verify()
djm@openbsd.org [Fri, 28 Oct 2022 00:43:08 +0000 (00:43 +0000)] 
upstream: refactor sshkey_sign() and sshkey_verify()

feedback/ok markus@

OpenBSD-Commit-ID: 368e662c128c99d05cc043b1308d2b6c71a4d3cc

2 years agoupstream: refactor sshkey_from_blob_internal()
djm@openbsd.org [Fri, 28 Oct 2022 00:41:52 +0000 (00:41 +0000)] 
upstream: refactor sshkey_from_blob_internal()

feedback/ok markus@

OpenBSD-Commit-ID: 1f46c0cbb8060ee9666a02749594ad6658c8e283

2 years agoupstream: refactor sshkey_from_private()
djm@openbsd.org [Fri, 28 Oct 2022 00:41:17 +0000 (00:41 +0000)] 
upstream: refactor sshkey_from_private()

feedback/ok markus@

OpenBSD-Commit-ID: e5dbe7a3545930c50f70ee75c867a1e08b382b53

2 years agoupstream: factor out key generation
djm@openbsd.org [Fri, 28 Oct 2022 00:39:29 +0000 (00:39 +0000)] 
upstream: factor out key generation

feedback/ok markus@

OpenBSD-Commit-ID: 5b4211bff4de8d9adb84bc72857a8c42c44e7ceb

2 years agoupstream: refactor and simplify sshkey_read()
djm@openbsd.org [Fri, 28 Oct 2022 00:38:58 +0000 (00:38 +0000)] 
upstream: refactor and simplify sshkey_read()

feedback/ok markus@

OpenBSD-Commit-ID: 0d93b7a56e31cd06a8bb0d2191d084ce254b0971

2 years agoupstream: factor out public key serialization
djm@openbsd.org [Fri, 28 Oct 2022 00:37:24 +0000 (00:37 +0000)] 
upstream: factor out public key serialization

feedback/ok markus@

OpenBSD-Commit-ID: a3570c4b97290c5662890aea7328d87f55939033